Skip to content

Commit

Permalink
Merge pull request itead#34 from hxming123456/update_items_based_on_ide
Browse files Browse the repository at this point in the history
Update items based on ide
  • Loading branch information
神农民 authored Jan 6, 2017
2 parents e26f025 + 268d352 commit 5a5cf0a
Show file tree
Hide file tree
Showing 365 changed files with 5,467 additions and 1,659 deletions.
83 changes: 3 additions & 80 deletions doc/Documentation/_comp_button_8ino-example.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,92 +67,15 @@
<div class="contents">
<dl class="section user"><dt>How to Use</dt><dd>This example shows that when the button component on the Nextion screen is released, the text of this button will plus one every time.</dd></dl>
<dl class="section author"><dt>Author</dt><dd>Wu Pengfei (email:<a href="#" onclick="location.href='mai'+'lto:'+'pen'+'gf'+'ei.'+'wu'+'@it'+'ea'+'d.c'+'c'; return false;">pengf<span style="display: none;">.nosp@m.</span>ei.w<span style="display: none;">.nosp@m.</span>u@ite<span style="display: none;">.nosp@m.</span>ad.c<span style="display: none;">.nosp@m.</span>c</a>) </dd></dl>
<dl class="section date"><dt>Date</dt><dd>2015/7/10 </dd></dl>
<dl class="section date"><dt>Date</dt><dd>2015/7/10 2016/12/25 bring HMI up to v0.32 to avoid too old issues by Patrick Martin, no other changes made </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. <br />
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</dd></dl>
<div class="fragment"><div class="line"></div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="_nextion_8h.html">Nextion.h</a>&quot;</span></div>
<div class="line"></div>
<div class="line"><span class="comment">/*</span></div>
<div class="line"><span class="comment"> * Declare a button object [page id:0,component id:1, component name: &quot;b0&quot;]. </span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"><a name="_a0"></a><a class="code" href="class_nex_button.html">NexButton</a> b0 = <a class="code" href="class_nex_button.html">NexButton</a>(0, 1, <span class="stringliteral">&quot;b0&quot;</span>);</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">char</span> buffer[100] = {0};</div>
<div class="line"></div>
<div class="line"><span class="comment">/*</span></div>
<div class="line"><span class="comment"> * Register a button object to the touch event list. </span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"><a name="_a1"></a><a class="code" href="class_nex_touch.html">NexTouch</a> *nex_listen_list[] = </div>
<div class="line">{</div>
<div class="line"> &amp;b0,</div>
<div class="line"> NULL</div>
<div class="line">};</div>
<div class="line"></div>
<div class="line"><span class="comment">/*</span></div>
<div class="line"><span class="comment"> * Button component pop callback function. </span></div>
<div class="line"><span class="comment"> * In this example,the button&#39;s text value will plus one every time when it is released. </span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"><span class="keywordtype">void</span> b0PopCallback(<span class="keywordtype">void</span> *ptr)</div>
<div class="line">{</div>
<div class="line"> uint16_t len;</div>
<div class="line"> uint16_t number;</div>
<div class="line"> <a class="code" href="class_nex_button.html">NexButton</a> *btn = (<a class="code" href="class_nex_button.html">NexButton</a> *)ptr;</div>
<div class="line"> dbSerialPrintln(<span class="stringliteral">&quot;b0PopCallback&quot;</span>);</div>
<div class="line"> dbSerialPrint(<span class="stringliteral">&quot;ptr=&quot;</span>);</div>
<div class="line"> dbSerialPrintln((uint32_t)ptr); </div>
<div class="line"> memset(buffer, 0, <span class="keyword">sizeof</span>(buffer));</div>
<div class="line"></div>
<div class="line"> <span class="comment">/* Get the text value of button component [the value is string type]. */</span></div>
<div class="line"> btn-&gt;<a name="a2"></a><a class="code" href="class_nex_button.html#a5ba1f74aa94b41b98172e42583ee13d6">getText</a>(buffer, <span class="keyword">sizeof</span>(buffer));</div>
<div class="line"> </div>
<div class="line"> number = atoi(buffer);</div>
<div class="line"> number += 1;</div>
<div class="line"></div>
<div class="line"> memset(buffer, 0, <span class="keyword">sizeof</span>(buffer));</div>
<div class="line"> itoa(number, buffer, 10);</div>
<div class="line"></div>
<div class="line"> <span class="comment">/* Set the text value of button component [the value is string type]. */</span></div>
<div class="line"> btn-&gt;<a name="a3"></a><a class="code" href="class_nex_button.html#a649dafc5afb1dc7f1fc1bde1e6270290">setText</a>(buffer);</div>
<div class="line">}</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">void</span> setup(<span class="keywordtype">void</span>)</div>
<div class="line">{ </div>
<div class="line"> <span class="comment">/* Set the baudrate which is for debug and communicate with Nextion screen. */</span></div>
<div class="line"> <a name="a4"></a><a class="code" href="group___core_a_p_i.html#gab09ddba6b72334d30ae091a7b038d790">nexInit</a>();</div>
<div class="line"></div>
<div class="line"> <span class="comment">/* Register the pop event callback function of the current button component. */</span></div>
<div class="line"> b0.<a name="a5"></a><a class="code" href="class_nex_touch.html#a4da1c4fcdfadb7eabfb9ccaba9ecad11">attachPop</a>(b0PopCallback, &amp;b0);</div>
<div class="line"> </div>
<div class="line"> dbSerialPrintln(<span class="stringliteral">&quot;setup done&quot;</span>); </div>
<div class="line">}</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">void</span> loop(<span class="keywordtype">void</span>)</div>
<div class="line">{ </div>
<div class="line"> <span class="comment">/*</span></div>
<div class="line"><span class="comment"> * When a pop or push event occured every time,</span></div>
<div class="line"><span class="comment"> * the corresponding component[right page id and component id] in touch event list will be asked.</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"> <a name="a6"></a><a class="code" href="group___core_a_p_i.html#ga91c549e696b0ca035cf18901e6a50d5a">nexLoop</a>(nex_listen_list);</div>
<div class="line">}</div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
</div><!-- fragment --> </div><!-- contents -->
<div class="fragment"></div><!-- fragment --> </div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated on Thu Dec 8 2016 14:46:05 for Documentation by
<li class="footer">Generated on Fri Jan 6 2017 14:00:35 for Documentation by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.7 </li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion doc/Documentation/_comp_button_8ino_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_13cb27e7707bad7dfc51e3225831c378.html">examples</a></li><li class="navelem"><a class="el" href="dir_a6c6ee996e64a0a9573e0623ecba0f92.html">CompButton</a></li><li class="navelem"><b>CompButton.ino</b></li>
<li class="footer">Generated on Thu Dec 8 2016 14:46:06 for Documentation by
<li class="footer">Generated on Fri Jan 6 2017 08:58:29 for Documentation by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.7 </li>
</ul>
Expand Down
Loading

0 comments on commit 5a5cf0a

Please sign in to comment.