few changes for RTS/CTS control
Dependencies: MTS-Serial libmDot mbed-rtos mbed
Fork of mDot_AT_firmware by
Diff: CommandTerminal/CmdTxNextMs.cpp
- Revision:
- 1:e52ae6584f1c
- Child:
- 2:e5eebd74d36d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CommandTerminal/CmdTxNextMs.cpp Thu Jun 25 10:23:41 2015 -0500 @@ -0,0 +1,26 @@ +#include "CmdTxNextMs.h" + +CmdTxNextMs::CmdTxNextMs(mDot* dot, mts::MTSSerial& serial) +: Command(dot, "Tx Next", "AT+TXN", "Get time in ms until next free channel"), _serial(serial) { + _help = std::string(text()) + ": " + std::string(desc()); + _usage = "(0-)"; + _queryable = true; +} + +uint32_t CmdTxNextMs::action(std::vector<std::string> args) { + + if (_dot->getVerbose()) + _serial.writef("Next Tx in: "); + + _serial.writef("%lu\r\n", _dot->getNextTxMs()); + + return 0; +} + +bool CmdTxNextMs::verify(std::vector<std::string> args) { + + if (args.size() > 1) + return false; + + return true; +}