From e7325a04a38989f1f71dbc6bff823263e1f82311 Mon Sep 17 00:00:00 2001 From: Th3maz1ng Date: Sat, 5 Jun 2021 23:31:59 +0200 Subject: [PATCH] Updated the definition.h file : added the data structure which is what is sent over the air by the radio module --- src/tests/definition.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/tests/definition.h b/src/tests/definition.h index 357ab32..b498ecb 100644 --- a/src/tests/definition.h +++ b/src/tests/definition.h @@ -8,9 +8,10 @@ #include #include +#include "packet_format.h" //Serial debug config part -#define SERIAL_DEBUG_ENABLED 0 +#define SERIAL_DEBUG_ENABLED 1 #define SERIAL_BAUD_RATE 115200 //Battery config part @@ -23,6 +24,9 @@ #define RADIO_PA_LEVEL RF24_PA_MAX #define RADIO_DATARATE RF24_250KBPS +//Seep config part +#define SLEEP_4_SEC_INTERVAL 1//15 + //Pin config part typedef enum { @@ -40,4 +44,18 @@ typedef enum A1_LDR_V_SENS = A1, } Pin; +//Payload structure +typedef struct +{ + uint16_t id; + HEADER_e header : 6; + unsigned int ldr : 10; + float battery; + float bmpTemp; + float bmpPress; + float humidity; + float compensatedHumidity; + float htuTemp; +} DataPacket __attribute__((__packed__)); + #endif //DEFINITION_H