MTDOT-BOX-EVB-Factory-Firmware
Dependencies: NCP5623B GpsParser ISL29011 libmDot-mbed5 MTS-Serial MMA845x DOGS102 MPL3115A2
Diff: CommandTerminal/CmdTxFrequency.cpp
- Revision:
- 7:a31236c2e75c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CommandTerminal/CmdTxFrequency.cpp Fri Nov 04 17:27:05 2016 -0500 @@ -0,0 +1,26 @@ +#include "CmdTxFrequency.h" +#include <climits> + + +CmdTxFrequency::CmdTxFrequency(mDot* dot) : + Command(dot, "Tx Frequency", "AT+TXF", "Set Tx frequency") { +} + +uint32_t CmdTxFrequency::action(std::vector<std::string> args) +{ + if (args.size() == 2) + { + int frequency = 0; + + sscanf(args[1].c_str(), "%d", &frequency); + _dot->setTxFrequency(frequency); + } + + return 0; +} + +bool CmdTxFrequency::verify(std::vector<std::string> args) +{ + return true; +} +