This commit is contained in:
2025-07-05 17:25:58 -04:00
parent 84c8aabaca
commit 5c535c4968
10 changed files with 54 additions and 61 deletions

View File

@@ -25,7 +25,7 @@ When used with communication protocols like ESP-NOW, this struct is **encoded**
**decoded** on the receiving end to control hardware.
Struct Walkthrough
^^^^^^^^^^^^^^^^^^
------------------
*x_axis* and *y_axis* fields capture analog input from a joystick, determining direction and speed.
*nav_bttn* represents a joystick push-button.
@@ -36,7 +36,7 @@ Struct Walkthrough
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))?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ESP-NOW uses fixed-size data packets (up to 250 bytes). The *__attribute__((packed))* removes compiler-added padding for precise byte alignment.