few changes for RTS/CTS control
Dependencies: MTS-Serial libmDot mbed-rtos mbed
Fork of mDot_AT_firmware by
Diff: CommandTerminal/CmdTimeOnAir.cpp
- Revision:
- 9:ff62b20f7000
- Parent:
- 1:e52ae6584f1c
--- a/CommandTerminal/CmdTimeOnAir.cpp Mon Apr 04 13:17:44 2016 +0000 +++ b/CommandTerminal/CmdTimeOnAir.cpp Mon Apr 04 09:00:31 2016 -0500 @@ -14,9 +14,9 @@ if (_dot->getVerbose()) _serial.writef("Time on air: "); - uint16_t bytes; + int bytes; - sscanf(args[1].c_str(), "%hu", &bytes); + sscanf(args[1].c_str(), "%d", &bytes); _serial.writef("%lu\r\n", _dot->getTimeOnAir(bytes + 13)); @@ -30,11 +30,11 @@ return false; } - uint16_t bytes; + int bytes; - sscanf(args[1].c_str(), "%hu", &bytes); + sscanf(args[1].c_str(), "%d", &bytes); - if (bytes > 242) { + if (bytes < 0 || bytes > 242) { setErrorMessage("Invalid parameter, expects (0-242)"); return false; }