diff options
author | Mike Fiore <mfiore@multitech.com> | 2015-12-02 16:50:07 -0600 |
---|---|---|
committer | Mike Fiore <mfiore@multitech.com> | 2015-12-02 16:50:07 -0600 |
commit | 29960cf233c3ccf8c938764052feddfdac113d1d (patch) | |
tree | 72be89d6e03774f941826aee30beed9e559ee854 /CommandTerminal | |
parent | 85a5200fe6e04ed51a97f289261bef3c84ffa18c (diff) | |
download | mtdot-box-evb-factory-firmware-29960cf233c3ccf8c938764052feddfdac113d1d.tar.gz mtdot-box-evb-factory-firmware-29960cf233c3ccf8c938764052feddfdac113d1d.tar.bz2 mtdot-box-evb-factory-firmware-29960cf233c3ccf8c938764052feddfdac113d1d.zip |
implement AT command to delete survey data file
Diffstat (limited to 'CommandTerminal')
-rw-r--r-- | CommandTerminal/CmdDeleteSurveyDataFile.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/CommandTerminal/CmdDeleteSurveyDataFile.cpp b/CommandTerminal/CmdDeleteSurveyDataFile.cpp index d6eca22..325ee7c 100644 --- a/CommandTerminal/CmdDeleteSurveyDataFile.cpp +++ b/CommandTerminal/CmdDeleteSurveyDataFile.cpp @@ -1,4 +1,5 @@ #include "CmdDeleteSurveyDataFile.h" +#include "FileName.h" CmdDeleteSurveyDataFile::CmdDeleteSurveyDataFile(mDot* dot, mts::MTSSerial& serial) : Command(dot, "Delete Survey Data File", "AT+DSDF", "Delete the survey data file"), _serial(serial) @@ -8,14 +9,12 @@ CmdDeleteSurveyDataFile::CmdDeleteSurveyDataFile(mDot* dot, mts::MTSSerial& seri uint32_t CmdDeleteSurveyDataFile::action(std::vector<std::string> args) { -//ToDo: Delete the file. - if (!_dot->saveConfig()) { - setErrorMessage("Failed to save to flash"); - return 1; - } - - return 0; + if (!_dot->deleteUserFile(file_name)) { + setErrorMessage("Failed to delete survey data file"); + return 1; + } + return 0; } |