Added missing header files.
This commit is contained in:
parent
ad70fdccea
commit
6930494e0c
42
src/app/definition.h
Normal file
42
src/app/definition.h
Normal file
@ -0,0 +1,42 @@
|
||||
#ifndef DEFINITION_H
|
||||
#define DEFINITION_H
|
||||
|
||||
#include "packet_format.h"
|
||||
|
||||
//Payload structure
|
||||
typedef struct
|
||||
{
|
||||
uint16_t id;
|
||||
HEADER_e header : 6;
|
||||
} __attribute__((__packed__)) DataPacket;
|
||||
|
||||
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;
|
||||
} __attribute__((__packed__)) WeatherStationDataPacket;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MAILBOX_LETTER = 0,
|
||||
MAILBOX_PACKAGE,
|
||||
MAILBOX_COLLECTED,
|
||||
MAILBOX_UNKNOWN,
|
||||
} MAILBOX_EVENT_e;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t id;
|
||||
HEADER_e header : 6;
|
||||
float battery;
|
||||
MAILBOX_EVENT_e mailbox_event;
|
||||
} __attribute__((__packed__)) MailboxDataPacket;
|
||||
|
||||
#endif //DEFINITION_H
|
6
src/app/packet_format.h
Normal file
6
src/app/packet_format.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef PACKET_FORMAT_H
|
||||
#define PACKET_FORMAT_H
|
||||
|
||||
enum HEADER_e {WEATHER_STATION = 0, CONNECTED_MAILBOX};
|
||||
|
||||
#endif //PACKET_FORMAT_H
|
Loading…
Reference in New Issue
Block a user