apply clang format
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
@ -1,10 +1,11 @@
|
||||
#include "SusHandler.h"
|
||||
#include "OBSWConfig.h"
|
||||
|
||||
#include <fsfw/datapool/PoolReadGuard.h>
|
||||
#include <fsfw/globalfunctions/arrayprinter.h>
|
||||
#include <fsfw_hal/linux/spi/SpiComIF.h>
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
|
||||
SusHandler::SusHandler(object_id_t objectId, object_id_t comIF, CookieIF *comCookie,
|
||||
LinuxLibgpioIF *gpioComIF, gpioId_t chipSelectId)
|
||||
: DeviceHandlerBase(objectId, comIF, comCookie), divider(5), dataset(this) {}
|
||||
@ -69,7 +70,7 @@ ReturnValue_t SusHandler::buildNormalDeviceCommand(DeviceCommandId_t *id) {
|
||||
}
|
||||
case (ComStates::EXT_CLOCKED_TEMP): {
|
||||
*id = SUS::READ_EXT_TIMED_TEMPS;
|
||||
return buildCommandFromCommand(*id , nullptr, 0);
|
||||
return buildCommandFromCommand(*id, nullptr, 0);
|
||||
}
|
||||
}
|
||||
return NOTHING_TO_SEND;
|
||||
@ -139,9 +140,9 @@ void SusHandler::fillCommandAndReplyMap() {
|
||||
insertInCommandAndReplyMap(SUS::WRITE_SETUP, 1);
|
||||
insertInCommandAndReplyMap(SUS::START_INT_TIMED_CONVERSIONS, 1);
|
||||
insertInCommandAndReplyMap(SUS::READ_INT_TIMED_CONVERSIONS, 1, &dataset,
|
||||
SUS::SIZE_READ_INT_CONVERSIONS);
|
||||
SUS::SIZE_READ_INT_CONVERSIONS);
|
||||
insertInCommandAndReplyMap(SUS::READ_EXT_TIMED_CONVERSIONS, 1, &dataset,
|
||||
SUS::SIZE_READ_EXT_CONVERSIONS);
|
||||
SUS::SIZE_READ_EXT_CONVERSIONS);
|
||||
insertInCommandAndReplyMap(SUS::READ_EXT_TIMED_TEMPS, 1);
|
||||
}
|
||||
|
||||
@ -184,7 +185,7 @@ ReturnValue_t SusHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8
|
||||
dataset.ain4 = (packet[9] << 8) | packet[10];
|
||||
dataset.ain5 = (packet[11] << 8) | packet[12];
|
||||
// Read temperature in next read cycle
|
||||
if(clkMode == ClkModes::EXT_CLOCKED_WITH_TEMP) {
|
||||
if (clkMode == ClkModes::EXT_CLOCKED_WITH_TEMP) {
|
||||
comState = ComStates::EXT_CLOCKED_TEMP;
|
||||
}
|
||||
printDataset();
|
||||
|
@ -5,8 +5,8 @@
|
||||
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
|
||||
|
||||
#include "devicedefinitions/SusDefinitions.h"
|
||||
#include "mission/devices/max1227.h"
|
||||
#include "fsfw/globalfunctions/PeriodicOperationDivider.h"
|
||||
#include "mission/devices/max1227.h"
|
||||
|
||||
/**
|
||||
* @brief This is the device handler class for the SUS sensor based on the MAX1227 ADC.
|
||||
@ -63,7 +63,7 @@ class SusHandler : public DeviceHandlerBase {
|
||||
IDLE,
|
||||
WRITE_SETUP,
|
||||
EXT_CLOCKED_CONVERSIONS,
|
||||
EXT_CLOCKED_TEMP,
|
||||
EXT_CLOCKED_TEMP,
|
||||
START_INT_CLOCKED_CONVERSIONS,
|
||||
READ_INT_CLOCKED_CONVERSIONS
|
||||
};
|
||||
|
Reference in New Issue
Block a user