![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Fork to see if I can get working
Dependencies: BufferedSerial OneWire WinbondSPIFlash libxDot-dev-mbed5-deprecated
Fork of xDotBridge_update_test20180823 by
Diff: xDotBridge/src/SerialTermMgr.cpp
- Revision:
- 99:83b54c851187
- Parent:
- 98:3609f600c2f5
--- a/xDotBridge/src/SerialTermMgr.cpp Tue Nov 28 14:31:54 2017 -0700 +++ b/xDotBridge/src/SerialTermMgr.cpp Wed Nov 29 20:51:33 2017 +0000 @@ -91,6 +91,7 @@ mCurrScreen = enterProgModeScreenId; break; case '3': + seedSaveSettings(); mCurrScreen = settingsScreenId; break; // Future @@ -172,9 +173,9 @@ } mPc->printf("\r\n\r\n"); mPc->printf("===============================================\r\n"); - mPc->printf("= General Info (ESC to return to main menu) =\r\n", mFwVersion); + mPc->printf("= General Info (ESC to return to main menu) =\r\n"); mPc->printf("===============================================\r\n"); - mPc->printf("= Press r to sample user switch values =\r\n"); // FIXME + mPc->printf("= Press r to sample user switch values =\r\n"); mPc->printf("===============================================\r\n"); mPc->printf("===============================================\r\n"); mPc->printf("= Firmware version: v%0.2f =\r\n", mFwVersion); @@ -192,7 +193,8 @@ mPc->printf("= Currently no rotary switches apply for TX =\r\n"); } else { - mPc->printf("= Rotary 1 hold setting is %0.1f seconds =\r\n", HoldTimeSetting::rotVal2Sec(mBbio->rotarySwitch1())); + mPc->printf("= Rotary 1 hold setting is %05.1f seconds =\r\n", + HoldTimeSetting::rotVal2Sec(mBbio->rotarySwitch1())); mPc->printf("= Rotary 2 currently does not apply for RX =\r\n"); } mPc->printf("===============================================\r\n"); @@ -217,10 +219,15 @@ break; case '1': mSaveIsCCNO = !mSaveIsCCNO; + break; case '2': mSaveIsTx = !mSaveIsTx; + break; case '3': - mSaveRot1 = (++mSaveRot1) % 10; + if (!mSaveIsTx) { + mSaveRot1 = (++mSaveRot1) % 10; + } + break; default: mPc->printf("Invalid key.\r\n"); } @@ -234,24 +241,24 @@ } mPc->printf("\r\n\r\n"); mPc->printf("===============================================\r\n"); - mPc->printf("= Settings (ESC to return to main menu) =\r\n", mFwVersion); + mPc->printf("= Settings (ESC to return to main menu) =\r\n"); mPc->printf("===============================================\r\n"); mPc->printf("= Press r to sample user switch values =\r\n"); - mPc->printf("= Press <ctrl>-s to save values =\r\n"); + mPc->printf("= Press <ctrl>-s to save values =\r\n"); mPc->printf("===============================================\r\n"); mPc->printf("===============================================\r\n"); - mPc->printf("= Setting: current value [Modify Key], save value =\r\n", mFwVersion); - mPc->printf("= Contact closure [1]: %s, %s =\r\n", + mPc->printf("= Setting [Mod Key]: curr value, save value =\r\n"); + mPc->printf("= Contact closure [1]: %s, %s =\r\n", mBbio->isCCNO() ? "NO" : "NC", mSaveIsCCNO ? "NO" : "NC"); - mPc->printf("= WB Mode [2]: %s, %s =\r\n", - mBbio->isTx() ? "Transmitter" : "Receiver ", - mSaveIsTx ? "Transmitter" : "Receiver "); + mPc->printf("= WB Mode [2]: %s, %s =\r\n", + mBbio->isTx() ? "TX" : "RX", + mSaveIsTx ? "TX" : "RX"); if (mSaveIsTx) { mPc->printf("= Currently no rotary switches apply for TX =\r\n"); } else { - mPc->printf("= Rotary 1 hold setting: %0.1f secs, %0.1f =\r\n", + mPc->printf("= Rotary 1 hold setting [3]: %05.1fs, %05.1fs =\r\n", HoldTimeSetting::rotVal2Sec(mBbio->rotarySwitch1()), HoldTimeSetting::rotVal2Sec(mSaveRot1)); mPc->printf("= Rotary 2 currently does not apply for RX =\r\n");