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: MTS-Serial libmDot-mbed5
Fork of Dot-AT-Firmware by
Diff: CommandTerminal/CmdTimeOnAir.cpp
- Revision:
- 9:ff62b20f7000
- Parent:
- 1:e52ae6584f1c
- Child:
- 14:f9a77400b622
--- 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;
}
