From 94ce835050e397ae939f2fb39902775c9ba00022 Mon Sep 17 00:00:00 2001 From: Thomas Tsou Date: Wed, 8 Oct 2014 11:49:08 -0700 Subject: 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 --- Transceiver52M/Transceiver.cpp | 14 ++++++++------ 1 file 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")) { -- cgit v1.2.3