AT terminal for the mDot using the USB debug port instead of the serial port.
Dependencies: MTS-Serial libmDot-mbed5
Fork of Dot-AT-Firmware by
CommandTerminal/CmdFrequencyBand.cpp
- Committer:
- jenkins@jenkinsdm1
- Date:
- 2017-06-19
- Revision:
- 16:d5cf2af81a6d
- Parent:
- 14:f9a77400b622
File content as of revision 16:d5cf2af81a6d:
#include "CmdFrequencyBand.h" CmdFrequencyBand::CmdFrequencyBand() : Command("Current Frequency Band", "AT+FREQ", "Current Frequency Band of Device 'US915', 'AU915', 'EU868', 'AS923', 'KR920', or 'AS923-JAPAN'", "(US915,AU915,EU868,AS923,KR920,AS923-JAPAN)") { _queryable = true; } uint32_t CmdFrequencyBand::action(std::vector<std::string> args) { if (args.size() == 1) { // using getChannelPlanName here instead of mDot::FrequencyBandStr allows AT firmware to properly display custom channel plan names CommandTerminal::Serial()->writef("%s\r\n", CommandTerminal::Dot()->getChannelPlanName().c_str()); } return 0; } bool CmdFrequencyBand::verify(std::vector<std::string> args) { if (args.size() == 1) return true; CommandTerminal::setErrorMessage("Invalid arguments"); return false; }