Systemsatus - add support older version of PQWME
Add support of older (shorter) version of PQWME strings from modem. Systemstatus currently discards those shorter strings. This change is to fill out all zeros in those missing fields instead of discarding the whole sentence. Change-Id: I31c42b6de53c3002f598cfd815304086bba056f9 CRs-Fixed: 2153513
This commit is contained in:
parent
4bab73548d
commit
8a752aa1b3
1 changed files with 14 additions and 9 deletions
|
@ -157,6 +157,7 @@ private:
|
|||
eAgcGlo = 20,
|
||||
eAgcBds = 21,
|
||||
eAgcGal = 22,
|
||||
eMax0 = eAgcGal,
|
||||
eLeapSeconds = 23,
|
||||
eLeapSecUnc = 24,
|
||||
eGloBpAmpI = 25,
|
||||
|
@ -205,7 +206,7 @@ public:
|
|||
: SystemStatusNmeaBase(str_in, len_in)
|
||||
{
|
||||
memset(&mM1, 0, sizeof(mM1));
|
||||
if (mField.size() < eMax) {
|
||||
if (mField.size() <= eMax0) {
|
||||
LOC_LOGE("PQWM1parser - invalid size=%zu", mField.size());
|
||||
mM1.mTimeValid = 0;
|
||||
return;
|
||||
|
@ -232,14 +233,18 @@ public:
|
|||
mM1.mAgcGlo = atof(mField[eAgcGlo].c_str());
|
||||
mM1.mAgcBds = atof(mField[eAgcBds].c_str());
|
||||
mM1.mAgcGal = atof(mField[eAgcGal].c_str());
|
||||
mM1.mLeapSeconds = atoi(mField[eLeapSeconds].c_str());
|
||||
mM1.mLeapSecUnc = atoi(mField[eLeapSecUnc].c_str());
|
||||
mM1.mGloBpAmpI = atoi(mField[eGloBpAmpI].c_str());
|
||||
mM1.mGloBpAmpQ = atoi(mField[eGloBpAmpQ].c_str());
|
||||
mM1.mBdsBpAmpI = atoi(mField[eBdsBpAmpI].c_str());
|
||||
mM1.mBdsBpAmpQ = atoi(mField[eBdsBpAmpQ].c_str());
|
||||
mM1.mGalBpAmpI = atoi(mField[eGalBpAmpI].c_str());
|
||||
mM1.mGalBpAmpQ = atoi(mField[eGalBpAmpQ].c_str());
|
||||
if (mField.size() > eLeapSecUnc) {
|
||||
mM1.mLeapSeconds = atoi(mField[eLeapSeconds].c_str());
|
||||
mM1.mLeapSecUnc = atoi(mField[eLeapSecUnc].c_str());
|
||||
}
|
||||
if (mField.size() > eGalBpAmpQ) {
|
||||
mM1.mGloBpAmpI = atoi(mField[eGloBpAmpI].c_str());
|
||||
mM1.mGloBpAmpQ = atoi(mField[eGloBpAmpQ].c_str());
|
||||
mM1.mBdsBpAmpI = atoi(mField[eBdsBpAmpI].c_str());
|
||||
mM1.mBdsBpAmpQ = atoi(mField[eBdsBpAmpQ].c_str());
|
||||
mM1.mGalBpAmpI = atoi(mField[eGalBpAmpI].c_str());
|
||||
mM1.mGalBpAmpQ = atoi(mField[eGalBpAmpQ].c_str());
|
||||
}
|
||||
}
|
||||
|
||||
inline SystemStatusPQWM1& get() { return mM1;} //getparser
|
||||
|
|
Loading…
Reference in a new issue