![](/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/CmdSessionDataRate.cpp
- Revision:
- 14:f9a77400b622
- Parent:
- 9:ff62b20f7000
diff -r b0f5ae12dc05 -r f9a77400b622 CommandTerminal/CmdSessionDataRate.cpp --- a/CommandTerminal/CmdSessionDataRate.cpp Fri Nov 04 19:10:24 2016 +0000 +++ b/CommandTerminal/CmdSessionDataRate.cpp Fri Nov 04 14:25:43 2016 -0500 @@ -1,23 +1,16 @@ #include "CmdSessionDataRate.h" -CmdSessionDataRate::CmdSessionDataRate(mDot* dot, mts::MTSSerial& serial) -: - Command(dot, "Session Data Rate", "AT+SDR", "Get the current datarate"), - _serial(serial) +CmdSessionDataRate::CmdSessionDataRate() +: Command("Session Data Rate", "AT+SDR", "Get the current datarate", "US:(7-10|DR0-DR4|DR8-DR13)) EU:(7-12|DR0-DR7))") { - _help = std::string(text()) + ": " + std::string(desc()); _queryable = true; } uint32_t CmdSessionDataRate::action(std::vector<std::string> args) { if (args.size() == 1) { - if (_dot->getVerbose()) - _serial.writef("Session Data Rate: "); - - _serial.writef("%s\r\n", mDot::DataRateStr(_dot->getSessionDataRate()).c_str()); + CommandTerminal::Serial()->writef("DR%d - %s\r\n", CommandTerminal::Dot()->getSessionDataRate(), CommandTerminal::Dot()->getDateRateDetails(CommandTerminal::Dot()->getSessionDataRate()).c_str()); } - return 0; } @@ -25,6 +18,6 @@ if (args.size() == 1) return true; - setErrorMessage("Invalid arguments"); + CommandTerminal::setErrorMessage("Invalid arguments"); return false; }