diff options
author | Thomas Tsou <tom@tsou.cc> | 2014-10-08 11:49:08 -0700 |
---|---|---|
committer | Thomas Tsou <tom@tsou.cc> | 2014-10-08 12:11:21 -0700 |
commit | 94ce835050e397ae939f2fb39902775c9ba00022 (patch) | |
tree | 782ed46e24d2813acb3f1b6a1fbd164f808be571 /Transceiver52M/Transceiver.cpp | |
parent | 09befd7a06877094653456942605b63c6dccb1d4 (diff) |
ms: Specify SETRXMASK argument with hex mask
Use a 64-bit hex value as the mask specifier because the integer string
is rather unwieldly. Fix 64-bit register handling on the mask check.
Receive burst masking is only available on in MS tracking mode (post SCH
acquisition).
Modulus values greater than 64 remain unsupported.
Signed-off-by: Thomas Tsou <tom@tsou.cc>
Diffstat (limited to 'Transceiver52M/Transceiver.cpp')
-rw-r--r-- | Transceiver52M/Transceiver.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp index e5223b7..2b89a6f 100644 --- a/Transceiver52M/Transceiver.cpp +++ b/Transceiver52M/Transceiver.cpp @@ -319,7 +319,8 @@ Transceiver::CorrType Transceiver::expectedCorrType(GSM::Time currTime, return OFF; int modFN = burstFN % state->fillerModulus[burstTN]; - if ((1 << modFN) & mRxSlotMask[burstTN]) + unsigned long long reg = (unsigned long long) 1 << modFN; + if (reg & mRxSlotMask[burstTN]) return TSC; else return OFF; @@ -606,9 +607,10 @@ SoftVector *Transceiver::pullRadioVector(GSM::Time &wTime, int &RSSI, type = SCH; break; case TRX_MODE_MS_TRACK: - if (!gsm_sch_check_fn(burst_time.FN())) - goto release; - type = SCH; + if (gsm_sch_check_fn(burst_time.FN())) + type = SCH; + else if (type == OFF) + goto release; break; case TRX_MODE_BTS: if ((type == TSC) || (type == RACH)) @@ -893,12 +895,12 @@ void Transceiver::driveControl(size_t chan) else if (!strcmp(command,"SETRXMASK")) { int slot; unsigned long long mask; - sscanf(buffer,"%3s %s %d %llu", cmdcheck, command, &slot, &mask); + sscanf(buffer,"%3s %s %d 0x%llx", cmdcheck, command, &slot, &mask); if ((slot < 0) || (slot > 7)) { sprintf(response, "RSP SETRXMASK 1"); } else { mRxSlotMask[slot] = mask; - sprintf(response, "RSP SETRXMASK 0 %d %llu", slot, mask); + sprintf(response, "RSP SETRXMASK 0 %d 0x%llx", slot, mask); } } else if (!strcmp(command, "SYNC")) { |