descriptions

This commit is contained in:
2025-07-01 02:00:51 -04:00
parent c2cc5f6063
commit 97a9389e1f

View File

@@ -67,18 +67,19 @@ The *struct* for storing motors PWM values.
The function for updating motors' PWM values. The function for updating motors' PWM values.
.. code-block:: c .. code-block:: c
// Function to send data to the receiver
void sendData (void) {
sensors_data_t buffer; // Declare data struct
buffer.crc = 0; // Function to send data to the receiver
buffer.x_axis = 240; void sendData (void) {
buffer.y_axis = 256; sensors_data_t buffer; // Declare data struct
buffer.nav_bttn = 0;
buffer.motor1_rpm_pwm = 10; buffer.crc = 0;
buffer.motor2_rpm_pwm = 0; buffer.x_axis = 0;
buffer.motor3_rpm_pwm = 0; buffer.y_axis = 0;
buffer.motor4_rpm_pwm = 0; buffer.nav_bttn = 0;
buffer.motor1_rpm_pwm = 0;
buffer.motor2_rpm_pwm = 0;
buffer.motor3_rpm_pwm = 0;
buffer.motor4_rpm_pwm = 0;
// Display brief summary of data being sent. // Display brief summary of data being sent.
ESP_LOGI(TAG, "Joystick (x,y) position ( 0x%04X, 0x%04X )", (uint8_t)buffer.x_axis, (uint8_t)buffer.y_axis); ESP_LOGI(TAG, "Joystick (x,y) position ( 0x%04X, 0x%04X )", (uint8_t)buffer.x_axis, (uint8_t)buffer.y_axis);