kopia lustrzana https://github.com/lora-aprs/LoRa_APRS_iGate
Change logger and correct corrupt source.
rodzic
804a0afe05
commit
d0deb99668
|
@ -20,7 +20,7 @@ bool BeaconTask::setup(System &system) {
|
||||||
if (system.getBoardConfig()->GpsRx != 0) {
|
if (system.getBoardConfig()->GpsRx != 0) {
|
||||||
ss.begin(9600, SERIAL_8N1, system.getBoardConfig()->GpsTx, system.getBoardConfig()->GpsRx);
|
ss.begin(9600, SERIAL_8N1, system.getBoardConfig()->GpsTx, system.getBoardConfig()->GpsRx);
|
||||||
} else {
|
} else {
|
||||||
logPrintlnD("NO GPS found.");
|
system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_INFO, getName(), "NO GPS found.");
|
||||||
gpsok = false;
|
gpsok = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,12 +44,11 @@ bool BeaconTask::loop(System &system) {
|
||||||
}
|
}
|
||||||
|
|
||||||
setBeacon(system);
|
setBeacon(system);
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t diff = _beacon_timer.getTriggerTimeInSec();
|
uint32_t diff = _beacon_timer.getTriggerTimeInSec();
|
||||||
_stateInfo = "beacon " + String(uint32_t(diff / 600)) + String(uint32_t(diff / 60) % 10) + ":" + String(uint32_t(diff / 10) % 6) + String(uint32_t(diff % 10));
|
_stateInfo = "beacon " + String(uint32_t(diff / 600)) + String(uint32_t(diff / 60) % 10) + ":" + String(uint32_t(diff / 10) % 6) + String(uint32_t(diff % 10));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
String create_lat_aprs(double lat) {
|
String create_lat_aprs(double lat) {
|
||||||
|
@ -96,8 +95,7 @@ void BeaconTask::setBeacon(System &system) {
|
||||||
}
|
}
|
||||||
_beaconMsg->getBody()->setData(String("=") + create_lat_aprs(lat) + "L" + create_long_aprs(lng) + "&" + system.getUserConfig()->beacon.message);
|
_beaconMsg->getBody()->setData(String("=") + create_lat_aprs(lat) + "L" + create_long_aprs(lng) + "&" + system.getUserConfig()->beacon.message);
|
||||||
|
|
||||||
logPrintD("[" + timeString() + "] ");
|
system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_INFO, getName(), "[%s]%s", timeString(), _beaconMsg->encode());
|
||||||
logPrintlnD(_beaconMsg->encode());
|
|
||||||
|
|
||||||
if (system.getUserConfig()->aprs_is.active)
|
if (system.getUserConfig()->aprs_is.active)
|
||||||
_toAprsIs.addElement(_beaconMsg);
|
_toAprsIs.addElement(_beaconMsg);
|
||||||
|
|
Ładowanie…
Reference in New Issue