otro
This commit is contained in:
parent
fdb4a069a3
commit
d907bbd587
|
|
@ -113,10 +113,7 @@ void loop() {
|
|||
if (!send_update) {
|
||||
GPS_Utils::calculateHeadingDelta(currentSpeed);
|
||||
}
|
||||
if (!send_update && lastTx >= Config.standingUpdateTime*60*1000) {
|
||||
send_update = true;
|
||||
sendStandingUpdate = true;
|
||||
}
|
||||
STATION_Utils::checkStandingUpdateTime();
|
||||
}
|
||||
|
||||
STATION_Utils::checkSmartBeaconState();
|
||||
|
|
|
|||
|
|
@ -16,8 +16,12 @@ extern String fourthNearTracker;
|
|||
|
||||
extern uint32_t lastDeleteListenedTracker;
|
||||
extern uint32_t lastTxTime;
|
||||
|
||||
extern bool send_update;
|
||||
extern bool sendStandingUpdate;
|
||||
|
||||
extern uint32_t txInterval;
|
||||
extern uint32_t lastTx;
|
||||
|
||||
namespace STATION_Utils {
|
||||
|
||||
|
|
@ -341,6 +345,13 @@ void checkSmartBeaconInterval(int speed) {
|
|||
}
|
||||
}
|
||||
|
||||
void checkStandingUpdateTime() {
|
||||
if (!send_update && lastTx >= Config.standingUpdateTime*60*1000) {
|
||||
send_update = true;
|
||||
sendStandingUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
void checkSmartBeaconState() {
|
||||
if (!currentBeacon->smartBeaconState) {
|
||||
uint32_t lastTxSmartBeacon = millis() - lastTxTime;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ void deleteListenedTrackersbyTime();
|
|||
void checkListenedTrackersByTimeAndDelete();
|
||||
void orderListenedTrackersByDistance(String callsign, float distance, float course);
|
||||
void checkSmartBeaconInterval(int speed);
|
||||
void checkStandingUpdateTime();
|
||||
void checkSmartBeaconState();
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue