From 4e5c4eb9d3b9a8974429810ebe5afc3387753643 Mon Sep 17 00:00:00 2001 From: Maksym Telychko Date: Thu, 8 Aug 2019 13:45:31 +0300 Subject: MTX-2891 mpower 2-3-4g: error messages printed with printError --- src/MTS_IO_CellularRadio.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/MTS_IO_CellularRadio.cpp') diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp index e171341..6df92e0 100644 --- a/src/MTS_IO_CellularRadio.cpp +++ b/src/MTS_IO_CellularRadio.cpp @@ -774,7 +774,7 @@ ICellularRadio::CODE CellularRadio::getCellularMode(CELLULAR_MODES &networks) { networks = CELLULAR_MODE_NA; std::string cmdResult = sendCommand("AT+COPS?"); if (cmdResult.find(ICellularRadio::RSP_OK) == std::string::npos) { - printDebug("%s| AT+COPS returned unexpected response: AT+COPS? [%s]", getName().c_str(), cmdResult.c_str()); + printError("%s| AT+COPS returned unexpected response: AT+COPS? [%s]", getName().c_str(), cmdResult.c_str()); return FAILURE; } @@ -782,7 +782,7 @@ ICellularRadio::CODE CellularRadio::getCellularMode(CELLULAR_MODES &networks) { const std::vector &reply = MTS::Text::split(MTS::Text::getLine(MTS::Text::trim(cmdResult), cursor, cursor), ','); uint8_t op; if (reply.size() < 4 || !MTS::Text::parse(op, reply[3])) { - printDebug("Error parsing reply from AT+COPS"); + printError("%s| AT+COPS Error parsing reply [AT+COPS?][%s]", getName().c_str(), cmdResult.c_str()); return FAILURE; } if (op == 0) { @@ -792,7 +792,7 @@ ICellularRadio::CODE CellularRadio::getCellularMode(CELLULAR_MODES &networks) { } else if (op == 7) { networks = CELLULAR_MODE_4G; } else { - printDebug("Error: AT+COPS unknown Radio Access Technology"); + printError("%s| AT+COPS unknown Radio Access Technology [AT+COPS?][%s]", getName().c_str(), cmdResult.c_str()); return FAILURE; } return SUCCESS; -- cgit v1.2.3