Move type into its own header file so gateways and sensors can share it

This commit is contained in:
DevilBinder 2022-06-21 21:08:31 +02:00
parent 551948ff84
commit 609efe0d40
2 changed files with 4 additions and 6 deletions

View File

@ -9,6 +9,8 @@
#ifndef __FDRS_SENSOR__H__
#define __FDRS_SENSOR__H__
#include "fdrs_types.h"
#define USE_LORA
#if defined(ESP8266)
@ -67,12 +69,6 @@ extern const uint8_t prefix[5];
#define ESP_GATEWAY_ADDRESS_SIZE 6
#define LORA_GATEWAY_ADDRESS_SIZE 3
typedef struct __attribute__((packed)) DataReading {
float data;
uint16_t id;
uint8_t type;
} DataReading;
class FDRSBase{
public:

View File

@ -1,5 +1,7 @@
#ifndef __FDRS_TYPES_H__
#include <stdint.h>
typedef struct __attribute__((packed)) DataReading {
float data;
uint16_t id;