important correction
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build queued...

This commit is contained in:
Robin Müller 2023-04-01 14:40:34 +02:00
parent 2386944ed8
commit b58fc90879
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -28,6 +28,7 @@ void ScexDeviceHandler::doStartUp() { setMode(MODE_ON); }
void ScexDeviceHandler::doShutDown() {
reader.reset();
commandActive = false;
fileNameSet = false;
multiFileFinishOutstanding = false;
setMode(_MODE_POWER_DOWN);
}
@ -208,7 +209,11 @@ ReturnValue_t ScexDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, cons
ReturnValue_t status = OK;
auto multiFileHandler = [&](const char* cmdName) {
if ((helper.getPacketCounter() == 1) or (not fileNameSet)) {
return generateNewScexFile(cmdName);
status = generateNewScexFile(cmdName);
if(status != returnvalue::OK) {
return status;
}
fileNameSet = true;
} else {
ofstream out(fileName,
ofstream::binary | ofstream::app); // append