summaryrefslogtreecommitdiff
path: root/CommandTerminal/CmdGetSurveyDataFile.cpp
blob: 11d9ae3b2efbcd3acaa2db176b1ed63a6c34ae77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "CmdGetSurveyDataFile.h"

CmdGetSurveyDataFile::CmdGetSurveyDataFile(mDot* dot, mts::MTSSerial& serial) :
        Command(dot, "Get Survey Data File", "AT+GSDF", "Outputs the survey data file to the command port"), _serial(serial)
{
    _help = std::string(text()) + ": " + std::string(desc());
}

uint32_t CmdGetSurveyDataFile::action(std::vector<std::string> args)
{
//ToDo: Output the file contents line by line.
    if (!_dot->saveConfig()) {
      setErrorMessage("Failed to save to flash");
      return 1;
    }
    
    return 0;

}