283 lines
18 KiB
HTML
283 lines
18 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||
|
<meta name="generator" content="Doxygen 1.8.13"/>
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||
|
<title>Arduino {code}racer API: Getters and setters</title>
|
||
|
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="../../jquery.js"></script>
|
||
|
<script type="text/javascript" src="../../dynsections.js"></script>
|
||
|
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="../../resize.js"></script>
|
||
|
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||
|
<script type="text/javascript" src="../../navtree.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(initResizable);
|
||
|
</script>
|
||
|
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||
|
<script type="text/javascript" src="../../search/search.js"></script>
|
||
|
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||
|
<div id="titlearea">
|
||
|
<table cellspacing="0" cellpadding="0">
|
||
|
<tbody>
|
||
|
<tr style="height: 56px;">
|
||
|
<td id="projectlogo"><img alt="Logo" src="../../coderace_logo.JPG"/></td>
|
||
|
<td id="projectalign" style="padding-left: 0.5em;">
|
||
|
<div id="projectname">Arduino {code}racer API
|
||
|
</div>
|
||
|
<div id="projectbrief">... better know the details.</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<!-- end header part -->
|
||
|
<!-- Generated by Doxygen 1.8.13 -->
|
||
|
<script type="text/javascript">
|
||
|
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||
|
</script>
|
||
|
<script type="text/javascript" src="../../menudata.js"></script>
|
||
|
<script type="text/javascript" src="../../menu.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(function() {
|
||
|
initMenu('../../',true,false,'search.php','Search');
|
||
|
$(document).ready(function() { init_search(); });
|
||
|
});
|
||
|
</script>
|
||
|
<div id="main-nav"></div>
|
||
|
</div><!-- top -->
|
||
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||
|
<div id="nav-tree">
|
||
|
<div id="nav-tree-contents">
|
||
|
<div id="nav-sync" class="sync"></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="splitbar" style="-moz-user-select:none;"
|
||
|
class="ui-resizable-handle">
|
||
|
</div>
|
||
|
</div>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function(){initNavTree('d7/d45/group__higherlevelgetters.html','../../');});
|
||
|
</script>
|
||
|
<div id="doc-content">
|
||
|
<!-- window showing the filter options -->
|
||
|
<div id="MSearchSelectWindow"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||
|
</div>
|
||
|
|
||
|
<!-- iframe showing the search results (closed by default) -->
|
||
|
<div id="MSearchResultsWindow">
|
||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||
|
name="MSearchResults" id="MSearchResults">
|
||
|
</iframe>
|
||
|
</div>
|
||
|
|
||
|
<div class="header">
|
||
|
<div class="summary">
|
||
|
<a href="#func-members">Functions</a> </div>
|
||
|
<div class="headertitle">
|
||
|
<div class="title">Getters and setters<div class="ingroups"><a class="el" href="../../d9/d80/group__higherlevel.html">Higher level methods, setters and getters</a></div></div> </div>
|
||
|
</div><!--header-->
|
||
|
<div class="contents">
|
||
|
<table class="memberdecls">
|
||
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||
|
Functions</h2></td></tr>
|
||
|
<tr class="memitem:gae8b8c0ab24ccb572281785aeca8541e1"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d45/group__higherlevelgetters.html#gae8b8c0ab24ccb572281785aeca8541e1">CodeRacer::stopped_at_min_distance</a> ()</td></tr>
|
||
|
<tr class="memdesc:gae8b8c0ab24ccb572281785aeca8541e1"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the racer was stopped at minimum distance. This set to false each time start_stop_at_min_distance() is called. <a href="#gae8b8c0ab24ccb572281785aeca8541e1">More...</a><br /></td></tr>
|
||
|
<tr class="separator:gae8b8c0ab24ccb572281785aeca8541e1"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga33dcd96e9b12dec794c56be85ec1ee05"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d45/group__higherlevelgetters.html#ga33dcd96e9b12dec794c56be85ec1ee05">CodeRacer::is_driving</a> ()</td></tr>
|
||
|
<tr class="memdesc:ga33dcd96e9b12dec794c56be85ec1ee05"><td class="mdescLeft"> </td><td class="mdescRight">Return true if the racer is driving - forward or backward. <a href="#ga33dcd96e9b12dec794c56be85ec1ee05">More...</a><br /></td></tr>
|
||
|
<tr class="separator:ga33dcd96e9b12dec794c56be85ec1ee05"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:gaf04fd16ca0e2ace656f9549c43d16459"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d45/group__higherlevelgetters.html#gaf04fd16ca0e2ace656f9549c43d16459">CodeRacer::turn_left_for_ms</a> ()</td></tr>
|
||
|
<tr class="memdesc:gaf04fd16ca0e2ace656f9549c43d16459"><td class="mdescLeft"> </td><td class="mdescRight">Returns the duration of time that is internally stored and used for turning the racer left. <a href="#gaf04fd16ca0e2ace656f9549c43d16459">More...</a><br /></td></tr>
|
||
|
<tr class="separator:gaf04fd16ca0e2ace656f9549c43d16459"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:gac0698f02f6a21d9d1f5b9cf2820306cf"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d45/group__higherlevelgetters.html#gac0698f02f6a21d9d1f5b9cf2820306cf">CodeRacer::turn_right_for_ms</a> ()</td></tr>
|
||
|
<tr class="memdesc:gac0698f02f6a21d9d1f5b9cf2820306cf"><td class="mdescLeft"> </td><td class="mdescRight">Returns the duration of time that is internally stored and used for turning the racer left. <a href="#gac0698f02f6a21d9d1f5b9cf2820306cf">More...</a><br /></td></tr>
|
||
|
<tr class="separator:gac0698f02f6a21d9d1f5b9cf2820306cf"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga62f1c0eea56e27d0853cb58f30eb140d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d45/group__higherlevelgetters.html#ga62f1c0eea56e27d0853cb58f30eb140d">CodeRacer::set_inactive</a> ()</td></tr>
|
||
|
<tr class="memdesc:ga62f1c0eea56e27d0853cb58f30eb140d"><td class="mdescLeft"> </td><td class="mdescRight">Sets the coderracer_active state to inactive. If start_stop() is used - the inactive mode will be entered. <a href="#ga62f1c0eea56e27d0853cb58f30eb140d">More...</a><br /></td></tr>
|
||
|
<tr class="separator:ga62f1c0eea56e27d0853cb58f30eb140d"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga415c69930f291d5e06b7211b31843310"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d45/group__higherlevelgetters.html#ga415c69930f291d5e06b7211b31843310">CodeRacer::set_active</a> ()</td></tr>
|
||
|
<tr class="memdesc:ga415c69930f291d5e06b7211b31843310"><td class="mdescLeft"> </td><td class="mdescRight">Sets the coderracer_active state to active. If start_stop() is used - the active mode will be entered. <a href="#ga415c69930f291d5e06b7211b31843310">More...</a><br /></td></tr>
|
||
|
<tr class="separator:ga415c69930f291d5e06b7211b31843310"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:gaa0ab4d6a754a23ea13664a553bcc8ff2"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d45/group__higherlevelgetters.html#gaa0ab4d6a754a23ea13664a553bcc8ff2">CodeRacer::is_active</a> ()</td></tr>
|
||
|
<tr class="memdesc:gaa0ab4d6a754a23ea13664a553bcc8ff2"><td class="mdescLeft"> </td><td class="mdescRight">Checks if coderracer_activ is set. <a href="#gaa0ab4d6a754a23ea13664a553bcc8ff2">More...</a><br /></td></tr>
|
||
|
<tr class="separator:gaa0ab4d6a754a23ea13664a553bcc8ff2"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
</table>
|
||
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||
|
<h2 class="groupheader">Function Documentation</h2>
|
||
|
<a id="gae8b8c0ab24ccb572281785aeca8541e1"></a>
|
||
|
<h2 class="memtitle"><span class="permalink"><a href="#gae8b8c0ab24ccb572281785aeca8541e1">◆ </a></span>stopped_at_min_distance()</h2>
|
||
|
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool CodeRacer::stopped_at_min_distance </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Returns true if the racer was stopped at minimum distance. This set to false each time start_stop_at_min_distance() is called. </p>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>True if stopped. </dd></dl>
|
||
|
|
||
|
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00380">380</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||
|
<div class="fragment"><div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  {</div><div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  <span class="keywordflow">return</span>(_coderacer_stopped_at_min_distance);</div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span> }</div></div><!-- fragment -->
|
||
|
</div>
|
||
|
</div>
|
||
|
<a id="ga33dcd96e9b12dec794c56be85ec1ee05"></a>
|
||
|
<h2 class="memtitle"><span class="permalink"><a href="#ga33dcd96e9b12dec794c56be85ec1ee05">◆ </a></span>is_driving()</h2>
|
||
|
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool CodeRacer::is_driving </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Return true if the racer is driving - forward or backward. </p>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>True if driving forward or backward </dd></dl>
|
||
|
|
||
|
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00387">387</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||
|
<div class="fragment"><div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  {</div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  <span class="keywordflow">return</span>(_drive);</div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span> }</div></div><!-- fragment -->
|
||
|
</div>
|
||
|
</div>
|
||
|
<a id="gaf04fd16ca0e2ace656f9549c43d16459"></a>
|
||
|
<h2 class="memtitle"><span class="permalink"><a href="#gaf04fd16ca0e2ace656f9549c43d16459">◆ </a></span>turn_left_for_ms()</h2>
|
||
|
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">unsigned long CodeRacer::turn_left_for_ms </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Returns the duration of time that is internally stored and used for turning the racer left. </p>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>Time to turn left in ms </dd></dl>
|
||
|
|
||
|
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00394">394</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||
|
<div class="fragment"><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  {</div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  <span class="keywordflow">return</span>(_turn_left_for_ms);</div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span> }</div></div><!-- fragment -->
|
||
|
</div>
|
||
|
</div>
|
||
|
<a id="gac0698f02f6a21d9d1f5b9cf2820306cf"></a>
|
||
|
<h2 class="memtitle"><span class="permalink"><a href="#gac0698f02f6a21d9d1f5b9cf2820306cf">◆ </a></span>turn_right_for_ms()</h2>
|
||
|
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">unsigned long CodeRacer::turn_right_for_ms </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Returns the duration of time that is internally stored and used for turning the racer left. </p>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>Time to turn left in ms </dd></dl>
|
||
|
|
||
|
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00401">401</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||
|
<div class="fragment"><div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  {</div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  <span class="keywordflow">return</span>(_turn_right_for_ms);</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span> }</div></div><!-- fragment -->
|
||
|
</div>
|
||
|
</div>
|
||
|
<a id="ga62f1c0eea56e27d0853cb58f30eb140d"></a>
|
||
|
<h2 class="memtitle"><span class="permalink"><a href="#ga62f1c0eea56e27d0853cb58f30eb140d">◆ </a></span>set_inactive()</h2>
|
||
|
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void CodeRacer::set_inactive </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Sets the coderracer_active state to inactive. If start_stop() is used - the inactive mode will be entered. </p>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||
|
|
||
|
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00408">408</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||
|
<div class="fragment"><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  {</div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  coderracer_activ = <span class="keyword">false</span>;</div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span> }</div></div><!-- fragment -->
|
||
|
</div>
|
||
|
</div>
|
||
|
<a id="ga415c69930f291d5e06b7211b31843310"></a>
|
||
|
<h2 class="memtitle"><span class="permalink"><a href="#ga415c69930f291d5e06b7211b31843310">◆ </a></span>set_active()</h2>
|
||
|
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void CodeRacer::set_active </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Sets the coderracer_active state to active. If start_stop() is used - the active mode will be entered. </p>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
|
||
|
|
||
|
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00415">415</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||
|
<div class="fragment"><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  {</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  coderracer_activ = <span class="keyword">true</span>;</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span> }</div></div><!-- fragment -->
|
||
|
</div>
|
||
|
</div>
|
||
|
<a id="gaa0ab4d6a754a23ea13664a553bcc8ff2"></a>
|
||
|
<h2 class="memtitle"><span class="permalink"><a href="#gaa0ab4d6a754a23ea13664a553bcc8ff2">◆ </a></span>is_active()</h2>
|
||
|
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">bool CodeRacer::is_active </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Checks if coderracer_activ is set. </p>
|
||
|
<p>coderracer_activ is toggled each time the button is pressed. After power on coderracer_activ is set to False. </p><dl class="section return"><dt>Returns</dt><dd>True id coderracer_activ is set - False if not. </dd></dl>
|
||
|
|
||
|
<p class="definition">Definition at line <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html#l00424">424</a> of file <a class="el" href="../../d4/da7/_code_racer_8cpp_source.html">CodeRacer.cpp</a>.</p>
|
||
|
<div class="fragment"><div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  {</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  <span class="keywordflow">return</span>(coderracer_activ);</div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span> }</div></div><!-- fragment -->
|
||
|
</div>
|
||
|
</div>
|
||
|
</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 by
|
||
|
<a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|