mirror of
https://github.com/timmbogner/Farm-Data-Relay-System
synced 2024-11-10 07:10:42 +00:00
Move type into its own header file so gateways and sensors can share it
This commit is contained in:
parent
551948ff84
commit
609efe0d40
@ -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:
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#ifndef __FDRS_TYPES_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct __attribute__((packed)) DataReading {
|
||||
float data;
|
||||
uint16_t id;
|
||||
|
Loading…
Reference in New Issue
Block a user