read callsing index1

This commit is contained in:
richonguzman 2023-09-11 11:31:42 -03:00
parent a01137b55a
commit 38f443a239
3 changed files with 14 additions and 0 deletions

View File

@ -88,6 +88,7 @@ void setup() {
GPS_Utils::setup();
LoRa_Utils::setup();
BME_Utils::setup();
STATION_Utils::loadCallsignIndex();
WiFi.mode(WIFI_OFF);
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Main", "WiFi controller stopped");

View File

@ -19,6 +19,7 @@ extern PowerManagement powerManagement;
extern std::vector<String> lastHeardStation;
extern std::vector<String> lastHeardStation_temp;
extern String fourthLine;
extern int myBeaconsIndex;
extern String firstNearTracker;
extern String secondNearTracker;
@ -457,4 +458,15 @@ namespace STATION_Utils {
fileCallsignIndex.close();
}
void loadCallsignIndex() {
if(!SPIFFS.begin(true)) {
Serial.println("An Error has occurred while mounting SPIFFS");
myBeaconsIndex = 0;
}
// aqui las otras cosas que pasan si pilla o no el archivo
}
}

View File

@ -18,6 +18,7 @@ void checkStandingUpdateTime();
void checkSmartBeaconState();
void sendBeacon();
void saveCallsingIndex(int index);
void loadCallsignIndex();
}