From a271adad3b9d53b950ed3a699990040cb686879f Mon Sep 17 00:00:00 2001 From: NP v/d Spek Date: Tue, 27 Aug 2024 15:09:02 +0200 Subject: [PATCH] trying fix the packet structure issue --- esphome/components/espnow/espnow.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/components/espnow/espnow.h b/esphome/components/espnow/espnow.h index 1a09a21061..4334273861 100644 --- a/esphome/components/espnow/espnow.h +++ b/esphome/components/espnow/espnow.h @@ -58,11 +58,11 @@ struct ESPNowPacket { uint16_t crc16 = 0x1234; uint8_t data[MAX_ESPNOW_DATA_SIZE]; uint8_t space = 0; - } __attribute__((packed)); + }; }; - ESPNowPacket() ESPHOME_ALWAYS_INLINE : retrys(0) {} - ESPNowPacket(uint64_t mac64, const uint8_t *data, uint8_t size, uint32_t app_id); + inline ESPNowPacket() ESPHOME_ALWAYS_INLINE : retrys(0) {} + inline ESPNowPacket(uint64_t mac64, const uint8_t *data, uint8_t size, uint32_t app_id); inline void info(std::string place);