Skip to content

Commit

Permalink
deploy: 01b0c1f
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-8 committed May 8, 2024
1 parent e18bacd commit 8f1471a
Show file tree
Hide file tree
Showing 16 changed files with 296 additions and 133 deletions.
243 changes: 135 additions & 108 deletions byte-sized-encoder-decoder_8h_source.html

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions class_byte_sized_encoder_decoder-members.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,17 @@
<tr class="even"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#afef9f4cf7f22319d4dd75a6580370aaa">bitCount</a>(uint8_t b)</td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">protected</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#aac6513e044ae1c3ee1e63272cc788bb2">ByteSizedEncoderDecoder</a>(TwoWire *_wire, uint8_t _address=14)</td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#a953eb0c40592ac84136ca855d93ceea2">encoderCount</a></td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#a5b18fe5295c0a4efd9597de5b6a487ba">getEncoderPosition</a>(uint8_t n, boolean read=false)</td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#aaaedba3e69d158d0a1cfa0c32dbca7d1">encoderOverflows</a></td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#a5b18fe5295c0a4efd9597de5b6a487ba">getEncoderPosition</a>(uint8_t n, boolean read=false)</td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#a9b588371a362708547faebbc9d81764d">getEncoderPositionWithOverflows</a>(uint8_t n, boolean read=false)</td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#a63045fd8fa427538e7266c57fb8cd052">isEncoderActive</a>(uint8_t n)</td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#ac7d24b65ed8c985c9499a22eda839138">resetEncoderPositions</a>()</td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#a66211cb3263c7a7a4856f19d5976d927">run</a>()</td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#aab6833c82200891fc1f5d52e1c5bbca8">setWhichEncoders</a>(uint8_t mask)</td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#a67c9ba4274ce78ba3ebbdddd3dcd5997">whichEncodersMask</a></td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#a9f53f3b9b3726f333c94a122b70010c4">wire</a></td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#ada95cb18bd4b4728f16f394977c46018">write</a>(uint8_t data)</td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">protected</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#ae3d2c555633d22b41be5bc5d787b35d4">lastEncoderCount</a></td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#a286a9e23a046d770d8bd45177df1a65c">resetEncoderPositions</a>(boolean resetVariables=true)</td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#a66211cb3263c7a7a4856f19d5976d927">run</a>()</td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#aab6833c82200891fc1f5d52e1c5bbca8">setWhichEncoders</a>(uint8_t mask)</td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#a67c9ba4274ce78ba3ebbdddd3dcd5997">whichEncodersMask</a></td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#a9f53f3b9b3726f333c94a122b70010c4">wire</a></td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html#ada95cb18bd4b4728f16f394977c46018">write</a>(uint8_t data)</td><td class="entry"><a class="el" href="class_byte_sized_encoder_decoder.html">ByteSizedEncoderDecoder</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">protected</span></td></tr>
</table></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Expand Down
130 changes: 124 additions & 6 deletions class_byte_sized_encoder_decoder.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,15 @@
<tr class="memitem:a66211cb3263c7a7a4856f19d5976d927" id="r_a66211cb3263c7a7a4856f19d5976d927"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_byte_sized_encoder_decoder.html#a66211cb3263c7a7a4856f19d5976d927">run</a> ()</td></tr>
<tr class="memdesc:a66211cb3263c7a7a4856f19d5976d927"><td class="mdescLeft">&#160;</td><td class="mdescRight">reads the encoder positions from the board <br /></td></tr>
<tr class="separator:a66211cb3263c7a7a4856f19d5976d927"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b588371a362708547faebbc9d81764d" id="r_a9b588371a362708547faebbc9d81764d"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_byte_sized_encoder_decoder.html#a9b588371a362708547faebbc9d81764d">getEncoderPositionWithOverflows</a> (uint8_t n, boolean read=false)</td></tr>
<tr class="memdesc:a9b588371a362708547faebbc9d81764d"><td class="mdescLeft">&#160;</td><td class="mdescRight">gets the position of an encoder as a 32 bit signed integer (it counts how many times the 16 bit number has overflowed) <br /></td></tr>
<tr class="separator:a9b588371a362708547faebbc9d81764d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b18fe5295c0a4efd9597de5b6a487ba" id="r_a5b18fe5295c0a4efd9597de5b6a487ba"><td class="memItemLeft" align="right" valign="top">int16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_byte_sized_encoder_decoder.html#a5b18fe5295c0a4efd9597de5b6a487ba">getEncoderPosition</a> (uint8_t n, boolean read=false)</td></tr>
<tr class="memdesc:a5b18fe5295c0a4efd9597de5b6a487ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">gets the position of an encoder <br /></td></tr>
<tr class="separator:a5b18fe5295c0a4efd9597de5b6a487ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7d24b65ed8c985c9499a22eda839138" id="r_ac7d24b65ed8c985c9499a22eda839138"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_byte_sized_encoder_decoder.html#ac7d24b65ed8c985c9499a22eda839138">resetEncoderPositions</a> ()</td></tr>
<tr class="memdesc:ac7d24b65ed8c985c9499a22eda839138"><td class="mdescLeft">&#160;</td><td class="mdescRight">resets all encoder positions to 0 <br /></td></tr>
<tr class="separator:ac7d24b65ed8c985c9499a22eda839138"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a286a9e23a046d770d8bd45177df1a65c" id="r_a286a9e23a046d770d8bd45177df1a65c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_byte_sized_encoder_decoder.html#a286a9e23a046d770d8bd45177df1a65c">resetEncoderPositions</a> (boolean resetVariables=true)</td></tr>
<tr class="memdesc:a286a9e23a046d770d8bd45177df1a65c"><td class="mdescLeft">&#160;</td><td class="mdescRight">resets all encoder positions to 0 <br /></td></tr>
<tr class="separator:a286a9e23a046d770d8bd45177df1a65c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab6833c82200891fc1f5d52e1c5bbca8" id="r_aab6833c82200891fc1f5d52e1c5bbca8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_byte_sized_encoder_decoder.html#aab6833c82200891fc1f5d52e1c5bbca8">setWhichEncoders</a> (uint8_t mask)</td></tr>
<tr class="memdesc:aab6833c82200891fc1f5d52e1c5bbca8"><td class="mdescLeft">&#160;</td><td class="mdescRight">set which encoders you want to receive data from <br /></td></tr>
<tr class="separator:aab6833c82200891fc1f5d52e1c5bbca8"><td class="memSeparator" colspan="2">&#160;</td></tr>
Expand All @@ -117,10 +120,17 @@
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a67f158ba45e9058deb13c0dd74f65d77" id="r_a67f158ba45e9058deb13c0dd74f65d77"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_byte_sized_encoder_decoder.html#a67f158ba45e9058deb13c0dd74f65d77">address</a></td></tr>
<tr class="memdesc:a67f158ba45e9058deb13c0dd74f65d77"><td class="mdescLeft">&#160;</td><td class="mdescRight">I2C address of the Byte Sized Encoder Decoder board (as selected by the jumpers) <br /></td></tr>
<tr class="separator:a67f158ba45e9058deb13c0dd74f65d77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a953eb0c40592ac84136ca855d93ceea2" id="r_a953eb0c40592ac84136ca855d93ceea2"><td class="memItemLeft" align="right" valign="top">int16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_byte_sized_encoder_decoder.html#a953eb0c40592ac84136ca855d93ceea2">encoderCount</a> [8]</td></tr>
<tr class="memdesc:a953eb0c40592ac84136ca855d93ceea2"><td class="mdescLeft">&#160;</td><td class="mdescRight">array of 8 numbers representing the number of steps each encoder has taken <br /></td></tr>
<tr class="separator:a953eb0c40592ac84136ca855d93ceea2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaaedba3e69d158d0a1cfa0c32dbca7d1" id="r_aaaedba3e69d158d0a1cfa0c32dbca7d1"><td class="memItemLeft" align="right" valign="top">int16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_byte_sized_encoder_decoder.html#aaaedba3e69d158d0a1cfa0c32dbca7d1">encoderOverflows</a> [8]</td></tr>
<tr class="memdesc:aaaedba3e69d158d0a1cfa0c32dbca7d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">array of 8 numbers representing the number of times each encoder's counter variable has overflowed <br /></td></tr>
<tr class="separator:aaaedba3e69d158d0a1cfa0c32dbca7d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3d2c555633d22b41be5bc5d787b35d4" id="r_ae3d2c555633d22b41be5bc5d787b35d4"><td class="memItemLeft" align="right" valign="top">int16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_byte_sized_encoder_decoder.html#ae3d2c555633d22b41be5bc5d787b35d4">lastEncoderCount</a> [8]</td></tr>
<tr class="memdesc:ae3d2c555633d22b41be5bc5d787b35d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">array of 8 numbers representing the last encoder count read from the board <br /></td></tr>
<tr class="separator:ae3d2c555633d22b41be5bc5d787b35d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f53f3b9b3726f333c94a122b70010c4" id="r_a9f53f3b9b3726f333c94a122b70010c4"><td class="memItemLeft" align="right" valign="top">TwoWire *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_byte_sized_encoder_decoder.html#a9f53f3b9b3726f333c94a122b70010c4">wire</a></td></tr>
<tr class="memdesc:a9f53f3b9b3726f333c94a122b70010c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">I2C bus to communicate over. <br /></td></tr>
<tr class="separator:a9f53f3b9b3726f333c94a122b70010c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
Expand Down Expand Up @@ -287,6 +297,57 @@ <h2 class="memtitle"><span class="permalink"><a href="#a5b18fe5295c0a4efd9597de5
</dd>
</dl>

</div>
</div>
<a id="a9b588371a362708547faebbc9d81764d" name="a9b588371a362708547faebbc9d81764d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b588371a362708547faebbc9d81764d">&#9670;&#160;</a></span>getEncoderPositionWithOverflows()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int32_t ByteSizedEncoderDecoder::getEncoderPositionWithOverflows </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>n</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">boolean&#160;</td>
<td class="paramname"><em>read</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">

<p>gets the position of an encoder as a 32 bit signed integer (it counts how many times the 16 bit number has overflowed) </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">n</td><td>encoder number (1-8), other values will return 0 </td></tr>
<tr><td class="paramname">read</td><td>whether to read the encoder positions from the board before returning the value, default is false </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">int32_t</td><td>the number of steps the encoder has taken </td></tr>
</table>
</dd>
</dl>

</div>
</div>
<a id="a63045fd8fa427538e7266c57fb8cd052" name="a63045fd8fa427538e7266c57fb8cd052"></a>
Expand Down Expand Up @@ -329,8 +390,8 @@ <h2 class="memtitle"><span class="permalink"><a href="#a63045fd8fa427538e7266c57

</div>
</div>
<a id="ac7d24b65ed8c985c9499a22eda839138" name="ac7d24b65ed8c985c9499a22eda839138"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac7d24b65ed8c985c9499a22eda839138">&#9670;&#160;</a></span>resetEncoderPositions()</h2>
<a id="a286a9e23a046d770d8bd45177df1a65c" name="a286a9e23a046d770d8bd45177df1a65c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a286a9e23a046d770d8bd45177df1a65c">&#9670;&#160;</a></span>resetEncoderPositions()</h2>

<div class="memitem">
<div class="memproto">
Expand All @@ -341,7 +402,8 @@ <h2 class="memtitle"><span class="permalink"><a href="#ac7d24b65ed8c985c9499a22e
<tr>
<td class="memname">void ByteSizedEncoderDecoder::resetEncoderPositions </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td class="paramtype">boolean&#160;</td>
<td class="paramname"><em>resetVariables</em> = <code>true</code></td><td>)</td>
<td></td>
</tr>
</table>
Expand All @@ -353,6 +415,12 @@ <h2 class="memtitle"><span class="permalink"><a href="#ac7d24b65ed8c985c9499a22e
</div><div class="memdoc">

<p>resets all encoder positions to 0 </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">resetVariables</td><td>whether to reset the encoderCount and encoderOverflows variables, default is true </td></tr>
</table>
</dd>
</dl>

</div>
</div>
Expand Down Expand Up @@ -465,6 +533,8 @@ <h2 class="memtitle"><span class="permalink"><a href="#a67f158ba45e9058deb13c0dd
</table>
</div><div class="memdoc">

<p>I2C address of the Byte Sized Encoder Decoder board (as selected by the jumpers) </p>

</div>
</div>
<a id="a953eb0c40592ac84136ca855d93ceea2" name="a953eb0c40592ac84136ca855d93ceea2"></a>
Expand All @@ -489,6 +559,54 @@ <h2 class="memtitle"><span class="permalink"><a href="#a953eb0c40592ac84136ca855

<p>array of 8 numbers representing the number of steps each encoder has taken </p>

</div>
</div>
<a id="aaaedba3e69d158d0a1cfa0c32dbca7d1" name="aaaedba3e69d158d0a1cfa0c32dbca7d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaaedba3e69d158d0a1cfa0c32dbca7d1">&#9670;&#160;</a></span>encoderOverflows</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int16_t ByteSizedEncoderDecoder::encoderOverflows[8]</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">

<p>array of 8 numbers representing the number of times each encoder's counter variable has overflowed </p>

</div>
</div>
<a id="ae3d2c555633d22b41be5bc5d787b35d4" name="ae3d2c555633d22b41be5bc5d787b35d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae3d2c555633d22b41be5bc5d787b35d4">&#9670;&#160;</a></span>lastEncoderCount</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int16_t ByteSizedEncoderDecoder::lastEncoderCount[8]</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">

<p>array of 8 numbers representing the last encoder count read from the board </p>

</div>
</div>
<a id="a67c9ba4274ce78ba3ebbdddd3dcd5997" name="a67c9ba4274ce78ba3ebbdddd3dcd5997"></a>
Expand Down
Loading

0 comments on commit 8f1471a

Please sign in to comment.