apply afmt
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-irini This commit looks good

This commit is contained in:
Robin Müller 2022-08-31 16:12:32 +02:00
parent 839851914a
commit 7c15ecbad2
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
4 changed files with 9 additions and 9 deletions

View File

@ -41,7 +41,6 @@ ReturnValue_t ScexUartReader::performOperation(uint8_t operationCode) {
if (bytesRead == 0) { if (bytesRead == 0) {
MutexGuard mg(lock); MutexGuard mg(lock);
if (state == States::FINISH) { if (state == States::FINISH) {
sif::debug << "ScexUartReader::performOperation:finish detected" << std::endl;
state = States::IDLE; state = States::IDLE;
break; break;
} }

View File

@ -132,8 +132,8 @@ void ScexDeviceHandler::fillCommandAndReplyMap() {
insertInCommandAndReplyMap(scex::Cmds::ALL_CELLS_CMD, 0, nullptr, 0, true, false, insertInCommandAndReplyMap(scex::Cmds::ALL_CELLS_CMD, 0, nullptr, 0, true, false,
scex::Cmds::ALL_CELLS_CMD, &finishCountdown); scex::Cmds::ALL_CELLS_CMD, &finishCountdown);
insertInCommandAndReplyMap(scex::Cmds::ONE_CELL, 0, nullptr, 0, true, false, insertInCommandAndReplyMap(scex::Cmds::ONE_CELL, 0, nullptr, 0, true, false, scex::Cmds::ONE_CELL,
scex::Cmds::ONE_CELL, &finishCountdown); &finishCountdown);
insertInCommandAndReplyMap(scex::Cmds::FRAM, 0, nullptr, 0, true, false, scex::Cmds::FRAM, insertInCommandAndReplyMap(scex::Cmds::FRAM, 0, nullptr, 0, true, false, scex::Cmds::FRAM,
&finishCountdown); &finishCountdown);
@ -260,15 +260,15 @@ ReturnValue_t ScexDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, cons
status = oneFileHandler("exp_status_"); status = oneFileHandler("exp_status_");
break; break;
} }
case(FRAM): { case (FRAM): {
status = multiFileHandler("fram_"); status = multiFileHandler("fram_");
break; break;
} }
case(ONE_CELL): { case (ONE_CELL): {
status = multiFileHandler("one_cell_"); status = multiFileHandler("one_cell_");
break; break;
} }
case(ALL_CELLS_CMD): { case (ALL_CELLS_CMD): {
status = multiFileHandler("multi_cell_"); status = multiFileHandler("multi_cell_");
break; break;
} }
@ -280,10 +280,9 @@ ReturnValue_t ScexDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, cons
reader.finish(); reader.finish();
commandActive = false; commandActive = false;
if (id != PING) { if (id != PING) {
sif::info << "ScexDeviceHandler::interpretDeviceReply:Reader is finished" << std::endl;
fileNameSet = false; fileNameSet = false;
} }
if(id == FRAM or id == ALL_CELLS_CMD or id == ONE_CELL) { if (id == FRAM or id == ALL_CELLS_CMD or id == ONE_CELL) {
triggerEvent(MULTI_PACKET_COMMAND_DONE, id); triggerEvent(MULTI_PACKET_COMMAND_DONE, id);
updatePeriodicReply(false, id); updatePeriodicReply(false, id);
} }

View File

@ -4,6 +4,7 @@
#include <fsfw/devicehandlers/DeviceHandlerBase.h> #include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include <linux/devices/ScexHelper.h> #include <linux/devices/ScexHelper.h>
#include <linux/devices/ScexUartReader.h> #include <linux/devices/ScexUartReader.h>
#include "commonSubsystemIds.h" #include "commonSubsystemIds.h"
class SdCardMountedIF; class SdCardMountedIF;

View File

@ -16,7 +16,8 @@ static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::SCEX_HANDLER;
static constexpr Event MISSING_PACKET = event::makeEvent(SUBSYSTEM_ID, 0, severity::LOW); static constexpr Event MISSING_PACKET = event::makeEvent(SUBSYSTEM_ID, 0, severity::LOW);
static constexpr Event EXPERIMENT_TIMEDOUT = event::makeEvent(SUBSYSTEM_ID, 1, severity::LOW); static constexpr Event EXPERIMENT_TIMEDOUT = event::makeEvent(SUBSYSTEM_ID, 1, severity::LOW);
//! FRAM, One Cell or All cells command finished. P1: Command ID //! FRAM, One Cell or All cells command finished. P1: Command ID
static constexpr Event MULTI_PACKET_COMMAND_DONE = event::makeEvent(SUBSYSTEM_ID, 2, severity::INFO); static constexpr Event MULTI_PACKET_COMMAND_DONE =
event::makeEvent(SUBSYSTEM_ID, 2, severity::INFO);
enum Cmds : DeviceCommandId_t { enum Cmds : DeviceCommandId_t {
PING = 0b00111, PING = 0b00111,