Merge branch 'One_GateWay_to_Rulle_Them_All'

This commit is contained in:
DevilBinder 2022-06-24 20:33:59 +02:00
commit 4c378ab1dd
2 changed files with 2 additions and 33 deletions

View File

@ -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

View File

@ -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];