diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/MTS_IO_CellularRadio.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp index 1842c23..a29ef2d 100644 --- a/src/MTS_IO_CellularRadio.cpp +++ b/src/MTS_IO_CellularRadio.cpp @@ -283,7 +283,7 @@ CellularRadio::CODE CellularRadio::getModel(std::string& sModel) { return SUCCESS; } -CellularRadio::CODE CellularRadio::convertModelToMtsShortCode(const std::string& sModel, std::string& sCode) { +CellularRadio::CODE CellularRadio::convertModelToMtsShortCode(const std::string& sModel, std::string& sCode, CellularRadio *radioObject) { CODE eCode = FAILURE; if(sModel.find("HE910-D") == 0) { @@ -302,13 +302,17 @@ CellularRadio::CODE CellularRadio::convertModelToMtsShortCode(const std::string& sCode = "LAT1"; eCode = SUCCESS; } else if (sModel.find("LE910-NA1") == 0) { - std::string cmd = "radio-query --active-firmware"; - std::string result; - int32_t code = MTS::System::cmd(cmd, result); - if (!code) { - sCode = "LNA3"; + if (NULL == radioObject) { + sCode = VALUE_NOT_SUPPORTED; + eCode = ERROR; } else { - sCode = "LAT3"; + std::string sValue; + eCode = radioObject->getActiveFirmware(sValue); + if (eCode == SUCCESS) { + sCode = "LNA3"; + } else { + sCode = "LAT3"; + } } eCode = SUCCESS; } else if (sModel.find("LE910-SVG") == 0) { |