-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c3971b
commit f6296fb
Showing
13 changed files
with
243 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | ||
<head> | ||
<title>lua-lcdproc documentation</title> | ||
<link rel="stylesheet" href="../ldoc.css" type="text/css" /> | ||
</head> | ||
<body> | ||
|
||
<div id="container"> | ||
|
||
<div id="product"> | ||
<div id="product_logo"></div> | ||
<div id="product_name"><big><b></b></big></div> | ||
<div id="product_description"></div> | ||
</div> <!-- id="product" --> | ||
|
||
|
||
<div id="main"> | ||
|
||
|
||
<!-- Menu --> | ||
|
||
<div id="navigation"> | ||
<br/> | ||
<h1>lua-lcdproc</h1> | ||
|
||
<ul> | ||
<li><a href="../index.html">Index</a></li> | ||
</ul> | ||
|
||
|
||
|
||
<h2>Examples</h2> | ||
<ul class="nowrap"> | ||
<li><strong>simple.lua</strong></li> | ||
</ul> | ||
<h2>Modules</h2> | ||
<ul class="nowrap"> | ||
<li><a href="../modules/lcdproc.html">lcdproc</a></li> | ||
<li><a href="../modules/lcdproc.menu.html">lcdproc.menu</a></li> | ||
<li><a href="../modules/lcdproc.screen.html">lcdproc.screen</a></li> | ||
<li><a href="../modules/lcdproc.widgets.html">lcdproc.widgets</a></li> | ||
</ul> | ||
<h2>Topics</h2> | ||
<ul class=""> | ||
<li><a href="../topics/README.md.html">README</a></li> | ||
</ul> | ||
|
||
</div> | ||
|
||
<div id="content"> | ||
|
||
<h2>simple.lua</h2> | ||
<pre> | ||
<span class="global">package</span>.path = <span class="global">package</span>.path .. <span class="string">";../src/?.lua"</span> | ||
|
||
<span class="keyword">local</span> LCDproc = <span class="global">require</span> <span class="string">"lcdproc"</span> | ||
|
||
<span class="keyword">local</span> lcd = LCDproc.new(<span class="string">"172.30.5.252"</span>, <span class="number">13666</span>) | ||
lcd:set_name(<span class="string">"Simple Clock"</span>) | ||
|
||
<span class="comment">-- create clock screen | ||
</span><span class="keyword">local</span> screen = lcd:add_screen(<span class="string">"clock_screen"</span>) | ||
screen:add_title(<span class="string">"one"</span>, <span class="string">"Simple Clock"</span>) | ||
screen:add_string(<span class="string">"time"</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="global">os</span>.date(<span class="string">"%H:%M:%S"</span>)) | ||
|
||
<span class="keyword">local</span> active = <span class="keyword">false</span> | ||
|
||
<span class="comment">-- toggle active variable if screen is currenly being shown or ignored | ||
</span>lcd:on_listen(<span class="keyword">function</span> () active = <span class="keyword">true</span> <span class="keyword">end</span>) | ||
lcd:on_ignore(<span class="keyword">function</span> () active = <span class="keyword">false</span> <span class="keyword">end</span>) | ||
|
||
<span class="keyword">while</span> <span class="keyword">true</span> <span class="keyword">do</span> | ||
<span class="keyword">if</span> active <span class="keyword">then</span> | ||
<span class="comment">-- update time only when screen is active | ||
</span> screen.widgets.time:set_text(<span class="global">os</span>.date(<span class="string">"%H:%M:%S"</span>)) | ||
<span class="keyword">end</span> | ||
|
||
<span class="comment">-- poll LCDproc server once per second | ||
</span> lcd:poll() | ||
<span class="keyword">end</span> | ||
|
||
<span class="comment">-- close connection to LCDproc server | ||
</span>lcd:close()</pre> | ||
|
||
|
||
</div> <!-- id="content" --> | ||
</div> <!-- id="main" --> | ||
<div id="about"> | ||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> | ||
<i style="float:right;">Last updated 2020-02-27 14:53:59 </i> | ||
</div> <!-- id="about" --> | ||
</div> <!-- id="container" --> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.