mDot AT-Firmware for testing
Dependencies: MTS-Serial libmDot-mbed5
Fork of Dot-AT-Firmware by
CommandTerminal/CmdSaveConfig.cpp@16:3b1d46c1db11, 2017-08-14 (annotated)
- Committer:
- Fran6
- Date:
- Mon Aug 14 12:40:21 2017 +0000
- Revision:
- 16:3b1d46c1db11
- Parent:
- 14:f9a77400b622
mDot AT-Firmware
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Mike Fiore |
1:e52ae6584f1c | 1 | #include "CmdSaveConfig.h" |
Mike Fiore |
1:e52ae6584f1c | 2 | |
Mike Fiore |
14:f9a77400b622 | 3 | CmdSaveConfig::CmdSaveConfig() : Command("Save Configuration", "AT&W", "Save configuration to flash memory", "NONE") |
Mike Fiore |
1:e52ae6584f1c | 4 | { |
Mike Fiore |
1:e52ae6584f1c | 5 | } |
Mike Fiore |
1:e52ae6584f1c | 6 | |
Mike Fiore |
1:e52ae6584f1c | 7 | |
Mike Fiore |
1:e52ae6584f1c | 8 | uint32_t CmdSaveConfig::action(std::vector<std::string> args) |
Mike Fiore |
1:e52ae6584f1c | 9 | { |
Mike Fiore |
14:f9a77400b622 | 10 | if (!CommandTerminal::Dot()->saveConfig()) { |
Mike Fiore |
14:f9a77400b622 | 11 | CommandTerminal::setErrorMessage("Failed to save to flash"); |
Mike Fiore |
1:e52ae6584f1c | 12 | return 1; |
Mike Fiore |
1:e52ae6584f1c | 13 | } |
Mike Fiore |
1:e52ae6584f1c | 14 | |
Mike Fiore |
1:e52ae6584f1c | 15 | return 0; |
Mike Fiore |
1:e52ae6584f1c | 16 | } |