![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
AT terminal for the mDot using the USB debug port instead of the serial port.
Dependencies: MTS-Serial libmDot-mbed5
Fork of Dot-AT-Firmware by
Diff: CommandTerminal/CmdJoinRx2Datarate.cpp
- Revision:
- 16:d5cf2af81a6d
- Parent:
- 14:f9a77400b622
--- a/CommandTerminal/CmdJoinRx2Datarate.cpp Fri Nov 04 17:04:54 2016 -0500 +++ b/CommandTerminal/CmdJoinRx2Datarate.cpp Mon Jun 19 14:33:21 2017 -0500 @@ -30,7 +30,7 @@ } if (CommandTerminal::Dot()->setJoinRx2DataRate(datarate) != mDot::MDOT_OK) { - CommandTerminal::setErrorMessage(CommandTerminal::Dot()->getLastError());; + CommandTerminal::setErrorMessage(CommandTerminal::Dot()->getLastError()); return 1; } } @@ -43,35 +43,6 @@ return true; if (args.size() == 2) { - std::string dr = mts::Text::toUpper(args[1]); - - uint8_t i; - int datarate = -1; - - int res = sscanf(dr.c_str(), "%d", &datarate); - - if (res == 0) { - for (i = 0; i < 16; i++) { - if (mDot::DataRateStr(i).find(dr) != std::string::npos) { - datarate = i; - break; - } - } - } - - if (CommandTerminal::Dot()->getFrequencyBand() == mDot::FB_US915 || CommandTerminal::Dot()->getFrequencyBand() == mDot::FB_AU915) { - // DR8-13 used for P2P modes - if (datarate < 8 || datarate > 13) { - CommandTerminal::setErrorMessage("Invalid data rate, expects (DR8-DR13)"); - return false; - } - } else { - if (datarate < 0 || datarate > 7) { - CommandTerminal::setErrorMessage("Invalid data rate, expects (DR0-DR7)"); - return false; - } - } - return true; }