From db67bd53fcafff73eb27bd7077fcc7f7bec1789f Mon Sep 17 00:00:00 2001 From: Alexandre Bobkov Date: Sat, 5 Jul 2025 23:55:06 -0400 Subject: [PATCH] manual --- ESP-IDF_Robot/tutorial/docs/source/data.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ESP-IDF_Robot/tutorial/docs/source/data.rst b/ESP-IDF_Robot/tutorial/docs/source/data.rst index 1dea1ad94..843e5874c 100644 --- a/ESP-IDF_Robot/tutorial/docs/source/data.rst +++ b/ESP-IDF_Robot/tutorial/docs/source/data.rst @@ -20,6 +20,15 @@ It's intended to be sent from a transmitting device (like a remote control or ma uint8_t motor4_rpm_pwm; } __attribute__((packed)) sensors_data_t; +.. code-block:: c + + struct motors_rpm { + int motor1_rpm_pwm; + int motor2_rpm_pwm; + int motor3_rpm_pwm; + int motor4_rpm_pwm; + }; + When used with communication protocols like ESP-NOW, this struct is **encoded** into a byte stream, then **transmitted** at regular intervals or in response to user input, and finally **decoded** on the receiving end to control hardware.