diff options
author | Maksym Telychko <maksym.telychko@globallogic.com> | 2019-08-08 13:45:31 +0300 |
---|---|---|
committer | Maksym Telychko <maksym.telychko@globallogic.com> | 2019-08-08 13:45:31 +0300 |
commit | 4e5c4eb9d3b9a8974429810ebe5afc3387753643 (patch) | |
tree | d1b30c78bbb2e81576cf193a7be809c0a2e0676b /src/MTS_IO_TelitRadio.cpp | |
parent | f3605192c24508d4b4b4eb474ff6890a2917043c (diff) | |
download | libmts-io-4e5c4eb9d3b9a8974429810ebe5afc3387753643.tar.gz libmts-io-4e5c4eb9d3b9a8974429810ebe5afc3387753643.tar.bz2 libmts-io-4e5c4eb9d3b9a8974429810ebe5afc3387753643.zip |
MTX-2891 mpower 2-3-4g: error messages printed with printError
Diffstat (limited to 'src/MTS_IO_TelitRadio.cpp')
-rw-r--r-- | src/MTS_IO_TelitRadio.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/MTS_IO_TelitRadio.cpp b/src/MTS_IO_TelitRadio.cpp index 7e74ca6..5b8e55d 100644 --- a/src/MTS_IO_TelitRadio.cpp +++ b/src/MTS_IO_TelitRadio.cpp @@ -634,12 +634,12 @@ ICellularRadio::CODE TelitRadio::getSupportedCellularModes(CELLULAR_MODES &netwo std::string sCmd("AT+WS46=?"); std::string cmdResult = sendCommand(sCmd); if (cmdResult.find("+WS46:") == std::string::npos) { - printDebug("%s| AT+WS46=? returned unexpected response: [%s][%s]", getName().c_str(), sCmd.c_str(), cmdResult.c_str()); + printError("%s| AT+WS46=? returned unexpected response: [%s][%s]", getName().c_str(), sCmd.c_str(), cmdResult.c_str()); return FAILURE; } if (cmdResult.find('(') == std::string::npos) { - printDebug("AT+WS46: error responce %s", cmdResult.c_str()); + printError("AT+WS46: error responce %s", cmdResult.c_str()); return FAILURE; } std::string s = MTS::Text::split(cmdResult, '(')[1]; @@ -652,7 +652,7 @@ ICellularRadio::CODE TelitRadio::getSupportedCellularModes(CELLULAR_MODES &netwo const std::vector<std::string> &r = MTS::Text::split(it, "-"); int begin, end; if ( ! MTS::Text::parse(begin, r[0]) || ! MTS::Text::parse(end, r[1])) { - printDebug("AT+WS46: error parsing network mode range: %s-%s", r[0].c_str(), r[1].c_str()); + printError("AT+WS46: error parsing network mode range: %s-%s", r[0].c_str(), r[1].c_str()); return FAILURE; } for (int i = begin; i<=end; ++i) { @@ -663,14 +663,14 @@ ICellularRadio::CODE TelitRadio::getSupportedCellularModes(CELLULAR_MODES &netwo } else { int v; if ( ! MTS::Text::parse(v, it)) { - printDebug("AT+WS46: error parsing network mode: %s", it.c_str()); + printError("AT+WS46: error parsing network mode: %s", it.c_str()); return FAILURE; } m.push_back(v); } } if (m.size()>1024) { - printDebug("AT+WS46: network modes count overflow, parsing error"); + printError("AT+WS46: network modes count overflow, parsing error"); return FAILURE; } @@ -707,7 +707,7 @@ ICellularRadio::CODE TelitRadio::setCellularMode(CELLULAR_MODES networks) { sCmd += std::to_string(wds); std::string cmdResult = sendCommand(sCmd); if (cmdResult.find(ICellularRadio::RSP_OK) == std::string::npos) { - printDebug("%s| AT+WS46= returned unexpected response: [%s][%s]", getName().c_str(), sCmd.c_str(), cmdResult.c_str()); + printError("%s| AT+WS46= returned unexpected response: [%s][%s]", getName().c_str(), sCmd.c_str(), cmdResult.c_str()); return FAILURE; } return SUCCESS; @@ -735,7 +735,7 @@ ICellularRadio::CELLULAR_MODES TelitRadio::preferredNetwork(CELLULAR_MODES prefN case 41: result |= CELLULAR_MODE_2G | CELLULAR_MODE_3G | CELLULAR_MODE_5G; break; case 42: result |= CELLULAR_MODE_2G | CELLULAR_MODE_5G; break; default: - printDebug("AT+WS46: unhandled network mode: %d", wds); + printError("AT+WS46: unhandled network mode: %d", wds); break; } return static_cast<CELLULAR_MODES>(result); |