mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-07-05 17:31:58 +02:00
start
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#include "station_utils.h"
|
||||
/*#include <WiFi.h>
|
||||
#include "configuration.h"
|
||||
#include "display.h"
|
||||
|
||||
extern Configuration Config;
|
||||
extern WiFiClient espClient;
|
||||
extern int internalLedPin;
|
||||
extern uint32_t lastRxTxTime;*/
|
||||
|
||||
namespace APRS_IS_Utils {
|
||||
|
||||
|
||||
void deleteNotHeardStation() {
|
||||
uint32_t minReportingTime = 30*60*1000; // 30 minutes // from .json and CONFIGURATION?????
|
||||
for (int i=0; i<lastHeardStation.size(); i++) {
|
||||
String deltaTimeString = lastHeardStation[i].substring(lastHeardStation[i].indexOf(",")+1);
|
||||
uint32_t deltaTime = deltaTimeString.toInt();
|
||||
if ((millis() - deltaTime) < minReportingTime) {
|
||||
lastHeardStation_temp.push_back(lastHeardStation[i]);
|
||||
}
|
||||
}
|
||||
lastHeardStation.clear();
|
||||
for (int j=0; j<lastHeardStation_temp.size(); j++) {
|
||||
lastHeardStation.push_back(lastHeardStation_temp[j]);
|
||||
}
|
||||
lastHeardStation_temp.clear();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef STATION_UTILS_H_
|
||||
#define STATION_UTILS_H_
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
namespace STATION_Utils {
|
||||
|
||||
void deleteNotHeardStation();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user