Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: libmDot-Custom MTS-Serial
Fork of mDot_AT_firmware_CUSTOM by
To change channel plans replace AS923 with AU915, EU868, KR920 or US915 on line 15
#define CHANNEL_PLAN CP_AS923
Diff: CommandTerminal/CmdJoinRx2Datarate.cpp
- Revision:
- 15:36db31c18231
- Parent:
- 14:e80ace5a6834
--- a/CommandTerminal/CmdJoinRx2Datarate.cpp Mon Aug 29 10:05:41 2016 -0500 +++ b/CommandTerminal/CmdJoinRx2Datarate.cpp Wed Aug 31 11:57:27 2016 -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; }