mirror of
https://github.com/lora-aprs/LoRa_APRS_iGate.git
synced 2026-04-10 00:45:18 +00:00
fixing APRS-IS lib
This commit is contained in:
parent
00603fe2c3
commit
4a39c5e2f2
3 changed files with 25 additions and 15 deletions
|
|
@ -42,7 +42,13 @@ bool AprsIsTask::loop(System &system) {
|
|||
|
||||
bool AprsIsTask::connect(System &system) {
|
||||
system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_INFO, getName(), "connecting to APRS-IS server: %s on port: %d", system.getUserConfig()->aprs_is.server, system.getUserConfig()->aprs_is.port);
|
||||
if (!_aprs_is.connect(system.getUserConfig()->aprs_is.server, system.getUserConfig()->aprs_is.port)) {
|
||||
APRS_IS::ConnectionStatus status = _aprs_is.connect(system.getUserConfig()->aprs_is.server, system.getUserConfig()->aprs_is.port);
|
||||
if (status == APRS_IS::ERROR_CONNECTION) {
|
||||
system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, getName(), "Something went wrong on connecting! Is the server reachable?");
|
||||
system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, getName(), "Connection failed.");
|
||||
return false;
|
||||
} else if (status == APRS_IS::ERROR_PASSCODE) {
|
||||
system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, getName(), "User can not be verified with passcode!");
|
||||
system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, getName(), "Connection failed.");
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue