This commit is contained in:
2025-07-05 23:55:55 -04:00
parent aec79b192a
commit 37db6d80bd
16 changed files with 80 additions and 23 deletions

View File

@@ -5,7 +5,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>DATA STRUCT &#8212; Byte Rider 06-2025 documentation</title>
<title>DATA STRUCTS &#8212; Byte Rider 06-2025 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=5ecbeea2" />
<link rel="stylesheet" type="text/css" href="_static/basic.css?v=b08954a9" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=27fed22d" />
@@ -33,8 +33,8 @@
<div class="body" role="main">
<section id="data-struct">
<h1>DATA STRUCT<a class="headerlink" href="#data-struct" title="Link to this heading"></a></h1>
<section id="data-structs">
<h1>DATA STRUCTS<a class="headerlink" href="#data-structs" title="Link to this heading"></a></h1>
<p>The struct serves as the data payload for sending control signals from transmitting device to the receiver using ESP-NOW.
In addition, it may contain additional data such as telemetry, battery status, etc.</p>
<p>The <em>sensors_data_t</em> struct is designed as a data payload that encapsulates all control commands and sensor states relevant to the vehicles operation.
@@ -51,6 +51,14 @@ Its intended to be sent from a transmitting device (like a remote control or
<span class="p">}</span><span class="w"> </span><span class="n">__attribute__</span><span class="p">((</span><span class="n">packed</span><span class="p">))</span><span class="w"> </span><span class="n">sensors_data_t</span><span class="p">;</span>
</pre></div>
</div>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="k">struct</span><span class="w"> </span><span class="nc">motors_rpm</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">motor1_rpm_pwm</span><span class="p">;</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">motor2_rpm_pwm</span><span class="p">;</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">motor3_rpm_pwm</span><span class="p">;</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">motor4_rpm_pwm</span><span class="p">;</span>
<span class="p">};</span>
</pre></div>
</div>
<p>When used with communication protocols like ESP-NOW, this struct is <strong>encoded</strong> into a byte stream, then
<strong>transmitted</strong> at regular intervals or in response to user input, and finally
<strong>decoded</strong> on the receiving end to control hardware.</p>
@@ -104,15 +112,16 @@ This enables fine-grained speed control, supports differential drive configurati
</search>
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="intro.html">INTRODUCTION</a></li>
<li class="toctree-l1"><a class="reference internal" href="intro.html">OVERVIEW</a></li>
<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-l1 current"><a class="current reference internal" href="#">DATA STRUCTS</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#data-payload">Data Payload</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="transmitter.html">TRANSMITTER</a></li>
<li class="toctree-l1"><a class="reference internal" href="receiver.html">RECEIVER</a></li>
<li class="toctree-l1"><a class="reference internal" href="progress.html">WORK-IN-PROGRESS WALK THROUGH</a></li>
<li class="toctree-l1"><a class="reference internal" href="references.html">REFERENCES</a></li>
</ul>
<div class="relations">