From 22c3a57351a9dba33bc890c398a04d846e44185c Mon Sep 17 00:00:00 2001 From: Alexandre Bobkov Date: Sat, 5 Jul 2025 17:23:38 -0400 Subject: [PATCH] . --- ESP-IDF_Robot/tutorial/docs/source/data.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ESP-IDF_Robot/tutorial/docs/source/data.rst b/ESP-IDF_Robot/tutorial/docs/source/data.rst index 0c9ac04f3..3cfcdc64a 100644 --- a/ESP-IDF_Robot/tutorial/docs/source/data.rst +++ b/ESP-IDF_Robot/tutorial/docs/source/data.rst @@ -38,7 +38,9 @@ This enables fine-grained speed control, supports differential drive configurati Why Use __attribute((packed))? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The *packed* attribute tells the compiler not to add any padding between fields in memory. This makes the struct: +ESP-NOW uses fixed-size data packets (up to 250 bytes). The *__attribute__((packed))* removes compiler-added padding for precise byte alignment. + +As *packed* attribute tells the compiler not to add any padding between fields in memory. This makes the struct: - Compact - Predictable for serialization over protocols like UART or ESP-NOW