diff options
| author | Jeff Hatch <Jeff.Hatch@multitech.com> | 2018-06-25 13:20:43 -0500 | 
|---|---|---|
| committer | Jeff Hatch <Jeff.Hatch@multitech.com> | 2018-06-25 13:20:43 -0500 | 
| commit | 472b181a37d5abf81a698caea1379d12ef91d4ee (patch) | |
| tree | 52c0ede3a3058be18c5995910d6dd604f04410e2 /src | |
| parent | 5d78c924aab3cbb35f09c911534d2c2ce763457e (diff) | |
| download | libmts-io-472b181a37d5abf81a698caea1379d12ef91d4ee.tar.gz libmts-io-472b181a37d5abf81a698caea1379d12ef91d4ee.tar.bz2 libmts-io-472b181a37d5abf81a698caea1379d12ef91d4ee.zip | |
Update convertModelToMtsShortCode signature to support LNA3 and LAT3 radios1.0.11
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) { | 
