This commit is contained in:
parent
2386944ed8
commit
b58fc90879
@ -28,6 +28,7 @@ void ScexDeviceHandler::doStartUp() { setMode(MODE_ON); }
|
|||||||
void ScexDeviceHandler::doShutDown() {
|
void ScexDeviceHandler::doShutDown() {
|
||||||
reader.reset();
|
reader.reset();
|
||||||
commandActive = false;
|
commandActive = false;
|
||||||
|
fileNameSet = false;
|
||||||
multiFileFinishOutstanding = false;
|
multiFileFinishOutstanding = false;
|
||||||
setMode(_MODE_POWER_DOWN);
|
setMode(_MODE_POWER_DOWN);
|
||||||
}
|
}
|
||||||
@ -208,7 +209,11 @@ ReturnValue_t ScexDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, cons
|
|||||||
ReturnValue_t status = OK;
|
ReturnValue_t status = OK;
|
||||||
auto multiFileHandler = [&](const char* cmdName) {
|
auto multiFileHandler = [&](const char* cmdName) {
|
||||||
if ((helper.getPacketCounter() == 1) or (not fileNameSet)) {
|
if ((helper.getPacketCounter() == 1) or (not fileNameSet)) {
|
||||||
return generateNewScexFile(cmdName);
|
status = generateNewScexFile(cmdName);
|
||||||
|
if(status != returnvalue::OK) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
fileNameSet = true;
|
||||||
} else {
|
} else {
|
||||||
ofstream out(fileName,
|
ofstream out(fileName,
|
||||||
ofstream::binary | ofstream::app); // append
|
ofstream::binary | ofstream::app); // append
|
||||||
|
Loading…
Reference in New Issue
Block a user