mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-08 06:18:57 +00:00
.
This commit is contained in:
@@ -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.
|
||||
|
||||
|
Reference in New Issue
Block a user