mirror of
https://github.com/timmbogner/Farm-Data-Relay-System
synced 2024-11-10 07:10:42 +00:00
removed unused data type
This commit is contained in:
parent
ef5829efdc
commit
f103ecad72
@ -11,33 +11,12 @@ bool ESP_FDRSGateWay::is_init = false;
|
||||
std::vector<Peer_t> ESP_FDRSGateWay::peer_list;
|
||||
std::vector<Peer_t> ESP_FDRSGateWay::unknow_peer;
|
||||
|
||||
uint8_t newData = 0;
|
||||
uint8_t ln = 0;
|
||||
DataReading_t theData[256];
|
||||
|
||||
DataReadingBuffer_t MQTTbuffer;
|
||||
uint32_t timeMQTT = 0;
|
||||
|
||||
DataReadingBuffer_t LORAGbuffer;
|
||||
uint32_t timeLORAG = 0;
|
||||
|
||||
DataReadingBuffer_t LORA1buffer;
|
||||
uint32_t timeLORA1 = 0;
|
||||
|
||||
DataReadingBuffer_t LORA2buffer;
|
||||
uint32_t timeLORA2 = 0;
|
||||
|
||||
// Set ESP-NOW send and receive callbacks for either ESP8266 or ESP32
|
||||
void ESP_FDRSGateWay::OnDataRecv(uint8_t * mac, const uint8_t *incomingData, int len){
|
||||
|
||||
|
||||
DataReading_t data;
|
||||
|
||||
//memcpy(&data, incomingData, sizeof(theData));
|
||||
|
||||
uint32_t i = 0;
|
||||
|
||||
|
||||
uint8_t d = len / sizeof(DataReading_t);
|
||||
|
||||
for(i = 0; i < d; i++){
|
||||
@ -494,6 +473,8 @@ void LoRa_FDRSGateWay::get(void){
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t theData[packetSize - 5];
|
||||
|
||||
memcpy(&incLORAMAC, &packet[3], 2); //Split off address portion of packet
|
||||
memcpy(&theData, &packet[5], packetSize - 5); //Split off data portion of packet
|
||||
|
||||
|
12
fdrs_types.h
12
fdrs_types.h
@ -12,18 +12,6 @@ typedef struct __attribute__((packed)) DataReading_t {
|
||||
}
|
||||
} DataReading_t;
|
||||
|
||||
|
||||
typedef struct DataReadingBuffer_t{
|
||||
DataReading_t buffer[256];
|
||||
uint16_t len;
|
||||
|
||||
DataReadingBuffer_t(){
|
||||
|
||||
}
|
||||
|
||||
}DataReadingBuffer_t;
|
||||
|
||||
|
||||
typedef struct Peer_t{
|
||||
|
||||
uint8_t peer[6];
|
||||
|
Loading…
Reference in New Issue
Block a user