Compare commits

..

2 Commits

2 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,10 @@
/**
* Author : Anatole SCHRAMM-HENRY
* Created the : 30/05/2021
* This is the source file containing the main app.
* It defines all the logic which make the weather station work.
*/
#include "definition.h"
#include "BoardConfig.h"
#include "WSPeripherals.h"
@ -7,7 +14,7 @@ BoardConfig defaultBC;
WSPeripherals WSP(defaultBC);
uint8_t sleepSlots(0), rCode(0);
DataPacket payload;
WeatherStationDataPacket payload;
void setup()
{
@ -87,7 +94,7 @@ void loop()
sleepSlots++;
}
void debugStruct(DataPacket *p)
void debugStruct(WeatherStationDataPacket *p)
{
Serial.println("##############DATA##############");
Serial.print("ID : ");

View File

@ -19,9 +19,9 @@
#define VOLTAGE_DIV_COEFF 1.3125 //(R1 + R2)/R2
//NRF Radio config part
#define RADIO_CHANNEL 108
#define RADIO_CHANNEL 108 //0-125
#define RADIO_NODE_ADDRESS "WEST1" //Weather Station 1
#define RADIO_PA_LEVEL RF24_PA_LOW //RF24_PA_MIN,RF24_PA_LOW,RF24_PA_HIGH,RF24_PA_MAX
#define RADIO_PA_LEVEL RF24_PA_HIGH //RF24_PA_MIN,RF24_PA_LOW,RF24_PA_HIGH,RF24_PA_MAX
#define ENABLE_LNA false //true or false
#define RADIO_DATARATE RF24_250KBPS
@ -58,6 +58,6 @@ typedef struct
float humidity;
float compensatedHumidity;
float htuTemp;
} DataPacket __attribute__((__packed__));
} __attribute__((__packed__)) WeatherStationDataPacket;
#endif //DEFINITION_H