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

@@ -1,5 +1,5 @@
DATA STRUCT
===========
DATA STRUCTS
============
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.
@@ -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.

View File

@@ -19,6 +19,15 @@ Configuration Variables
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;
};
Receiving & De-Ecapsulating Data
--------------------------------