firm newest
Dependencies: MTS-Serial libmDot-dev-mbed5-deprecated
CommandTerminal/CmdFrequencyBand.cpp@1:c1c6549b9333, 2018-10-22 (annotated)
- Committer:
- nguyenhoang9x5555
- Date:
- Mon Oct 22 01:56:09 2018 +0000
- Revision:
- 1:c1c6549b9333
- Parent:
- 0:3c869a8cb8f8
hey
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 1 | #include "CmdFrequencyBand.h" |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 2 | |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 3 | CmdFrequencyBand::CmdFrequencyBand() : |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 4 | 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)") |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 5 | { |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 6 | _queryable = true; |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 7 | } |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 8 | |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 9 | uint32_t CmdFrequencyBand::action(std::vector<std::string> args) |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 10 | { |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 11 | if (args.size() == 1) |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 12 | { |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 13 | // using getChannelPlanName here instead of mDot::FrequencyBandStr allows AT firmware to properly display custom channel plan names |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 14 | ;//CommandTerminal::Serial()->writef("%s\r\n", CommandTerminal::Dot()->getChannelPlanName().c_str()); |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 15 | } |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 16 | |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 17 | return 0; |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 18 | } |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 19 | |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 20 | bool CmdFrequencyBand::verify(std::vector<std::string> args) |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 21 | { |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 22 | if (args.size() == 1) |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 23 | return true; |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 24 | |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 25 | CommandTerminal::setErrorMessage("Invalid arguments"); |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 26 | return false; |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 27 | } |