diff --git a/ESP-IDF_Robot/tutorial/docs/build/doctrees/environment.pickle b/ESP-IDF_Robot/tutorial/docs/build/doctrees/environment.pickle index 8a61932d8..92524fff4 100644 Binary files a/ESP-IDF_Robot/tutorial/docs/build/doctrees/environment.pickle and b/ESP-IDF_Robot/tutorial/docs/build/doctrees/environment.pickle differ diff --git a/ESP-IDF_Robot/tutorial/docs/build/doctrees/index.doctree b/ESP-IDF_Robot/tutorial/docs/build/doctrees/index.doctree index 2703d0c39..bd353c999 100644 Binary files a/ESP-IDF_Robot/tutorial/docs/build/doctrees/index.doctree and b/ESP-IDF_Robot/tutorial/docs/build/doctrees/index.doctree differ diff --git a/ESP-IDF_Robot/tutorial/docs/build/html/_sources/index.rst.txt b/ESP-IDF_Robot/tutorial/docs/build/html/_sources/index.rst.txt index a363a912d..1d9207ca6 100644 --- a/ESP-IDF_Robot/tutorial/docs/build/html/_sources/index.rst.txt +++ b/ESP-IDF_Robot/tutorial/docs/build/html/_sources/index.rst.txt @@ -9,7 +9,8 @@ ByteRider documentation .. image:: _static/ESP-IDF_Robot.jpg .. toctree:: - :maxdepth: 2 + :maxdepth: 3 + :numbered: intro overview diff --git a/ESP-IDF_Robot/tutorial/docs/build/html/data.html b/ESP-IDF_Robot/tutorial/docs/build/html/data.html index 380c6aad3..8fe676431 100644 --- a/ESP-IDF_Robot/tutorial/docs/build/html/data.html +++ b/ESP-IDF_Robot/tutorial/docs/build/html/data.html @@ -5,7 +5,7 @@ - DATA STRUCTS — Byte Rider 06-2025 documentation + 3. DATA STRUCTS — Byte Rider 06-2025 documentation @@ -14,8 +14,8 @@ - - + + @@ -34,7 +34,7 @@
-

DATA STRUCTS

+

3. DATA STRUCTS

The struct serves as the data payload for sending control signals from the transmitting device to the receiver using ESP-NOW. In addition, it may contain additional data such as telemetry, battery status, etc. The sensors_data_t struct encapsulates all control commands and sensor states relevant to the vehicle’s operation. It’s intended to be sent from a transmitting device (like a remote control) to a receiver @@ -70,14 +70,14 @@ powerful in systems programming, embedded projects, and when dealing with raw bi ESP-NOW.

-

Data Payload

+

3.1. Data Payload

x_axis and y_axis fields capture analog input from a joystick, determining direction and speed. nav_bttn represents a joystick push-button.

led allows the transmitter to toggle an onboard LED and is used for status indication (e.g. pairing, battery warning, etc).

motor1_rpm_pwm to motor4_rpm_pwm 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.

-

Why use __attribute((packed))?

+

3.1.1. Why use __attribute((packed))?

ESP-NOW uses fixed-size data packets (up to 250 bytes). The __attribute__((packed)) removes compiler-added padding for precise byte alignment.

As packed attribute tells the compiler not to add any padding between fields in memory, this makes the struct:

@@ -119,24 +119,27 @@ This enables fine-grained speed control, supports differential drive configurati

Navigation