This commit is contained in:
richonguzman 2023-06-24 12:21:37 -04:00
parent 90888e5a28
commit fdb4a069a3
2 changed files with 3 additions and 13 deletions

View File

@ -5,7 +5,7 @@
"symbol": "j",
"comment": "",
"smart_beacon": {
"active": false,
"active": true,
"slowRate": 120,
"slowSpeed": 3,
"fastRate": 60,

View File

@ -92,6 +92,8 @@ void setup() {
}
void loop() {
currentBeacon = &Config.beacons[myBeaconsIndex];
powerManagement.batteryManager();
userButton.tick();
utils::checkDisplayEcoMode();
@ -100,23 +102,11 @@ void loop() {
bool gps_time_update = gps.time.isUpdated();
bool gps_loc_update = gps.location.isUpdated();
GPS_Utils::setDateFromData();
currentBeacon = &Config.beacons[myBeaconsIndex];
MSG_Utils::checkReceivedMessage(LoRa_Utils::receivePacket());
STATION_Utils::checkListenedTrackersByTimeAndDelete();
int currentSpeed = (int)gps.speed.kmph();
/*if (gps_loc_update != gps_loc_update_valid) {
gps_loc_update_valid = gps_loc_update;
if (gps_loc_update) {
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Loop", "GPS fix state went to VALID");
} else {
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Loop", "GPS fix state went to INVALID");
}
}*/
lastTx = millis() - lastTxTime;
if (!send_update && gps_loc_update && currentBeacon->smartBeaconState) {
GPS_Utils::calculateDistanceTraveled();