MTDOT-BOX-EVB-Factory-Firmware
Dependencies: NCP5623B GpsParser ISL29011 libmDot-mbed5 MTS-Serial MMA845x DOGS102 MPL3115A2
CommandTerminal/CmdTxFrequency.cpp@7:a31236c2e75c, 2016-11-04 (annotated)
- Committer:
- Mike Fiore
- Date:
- Fri Nov 04 17:27:05 2016 -0500
- Revision:
- 7:a31236c2e75c
update from git revision 2.1.2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Mike Fiore |
7:a31236c2e75c | 1 | #include "CmdTxFrequency.h" |
Mike Fiore |
7:a31236c2e75c | 2 | #include <climits> |
Mike Fiore |
7:a31236c2e75c | 3 | |
Mike Fiore |
7:a31236c2e75c | 4 | |
Mike Fiore |
7:a31236c2e75c | 5 | CmdTxFrequency::CmdTxFrequency(mDot* dot) : |
Mike Fiore |
7:a31236c2e75c | 6 | Command(dot, "Tx Frequency", "AT+TXF", "Set Tx frequency") { |
Mike Fiore |
7:a31236c2e75c | 7 | } |
Mike Fiore |
7:a31236c2e75c | 8 | |
Mike Fiore |
7:a31236c2e75c | 9 | uint32_t CmdTxFrequency::action(std::vector<std::string> args) |
Mike Fiore |
7:a31236c2e75c | 10 | { |
Mike Fiore |
7:a31236c2e75c | 11 | if (args.size() == 2) |
Mike Fiore |
7:a31236c2e75c | 12 | { |
Mike Fiore |
7:a31236c2e75c | 13 | int frequency = 0; |
Mike Fiore |
7:a31236c2e75c | 14 | |
Mike Fiore |
7:a31236c2e75c | 15 | sscanf(args[1].c_str(), "%d", &frequency); |
Mike Fiore |
7:a31236c2e75c | 16 | _dot->setTxFrequency(frequency); |
Mike Fiore |
7:a31236c2e75c | 17 | } |
Mike Fiore |
7:a31236c2e75c | 18 | |
Mike Fiore |
7:a31236c2e75c | 19 | return 0; |
Mike Fiore |
7:a31236c2e75c | 20 | } |
Mike Fiore |
7:a31236c2e75c | 21 | |
Mike Fiore |
7:a31236c2e75c | 22 | bool CmdTxFrequency::verify(std::vector<std::string> args) |
Mike Fiore |
7:a31236c2e75c | 23 | { |
Mike Fiore |
7:a31236c2e75c | 24 | return true; |
Mike Fiore |
7:a31236c2e75c | 25 | } |
Mike Fiore |
7:a31236c2e75c | 26 |