mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-09 16:15:26 +00:00
.
This commit is contained in:
15
ESP-IDF_Robot/tutorial/docs/build/html/data.html
vendored
15
ESP-IDF_Robot/tutorial/docs/build/html/data.html
vendored
@@ -56,6 +56,20 @@ It’s intended to be sent from a transmitting device (like a remote control or
|
||||
<p><em>x_axis</em> and <em>y_axis</em> fields capture analog input from a joystick, determining direction and speed.
|
||||
<em>nav_bttn</em> represents a joystick push-button.</p>
|
||||
<p><em>led</em> allows the transmitter to toggle an onboard LED and is used for status indication (e.g. pairing, battery warning, etc).</p>
|
||||
<p><em>motor1_rpm_pwm</em> to <em>motor4_rpm_pwm</em> provide individual PWM signals to four DC motors.
|
||||
This enables fine-grained speed control, supports differential drive configurations, and even allows for maneuvering in multi-directional platforms like omni-wheel robots.</p>
|
||||
</section>
|
||||
<section id="why-use-attribute-packed">
|
||||
<h2>Why Use __attribute((packed))?<a class="headerlink" href="#why-use-attribute-packed" title="Link to this heading">¶</a></h2>
|
||||
<p>The packed attribute tells the compiler not to add any padding between fields in memory. This makes the struct:</p>
|
||||
<blockquote>
|
||||
<div><ul class="simple">
|
||||
<li><p>Compact</p></li>
|
||||
<li><p>Predictable for serialization over protocols like UART or ESP-NOW</p></li>
|
||||
<li><p>Ideal for low-latency transmission in embedded systems</p></li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
<p>This ensures the receiver interprets the exact byte layout you expect, minimizing bandwidth and maximizing compatibility across platforms.</p>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@@ -90,6 +104,7 @@ It’s intended to be sent from a transmitting device (like a remote control or
|
||||
<li class="toctree-l1"><a class="reference internal" href="overview.html">HOW DOES IT WORK?</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">DATA STRUCT</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#struct-walkthrough">Struct Walkthrough</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#why-use-attribute-packed">Why Use __attribute((packed))?</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="transmitter.html">TRANSMITTER</a></li>
|
||||
|
Reference in New Issue
Block a user