applied formatting
Some checks failed
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
2022-01-17 15:58:27 +01:00
parent 975b3cd294
commit 77c45c0de9
206 changed files with 28883 additions and 30263 deletions

View File

@ -1,18 +1,15 @@
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_MAX13865DEFINITIONS_H_
#define MISSION_DEVICES_DEVICEDEFINITIONS_MAX13865DEFINITIONS_H_
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
#include <fsfw/datapoollocal/LocalPoolVariable.h>
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
#include "objects/systemObjectList.h"
namespace Max31865Definitions {
enum PoolIds: lp_id_t {
RTD_VALUE,
TEMPERATURE_C,
FAULT_BYTE
};
enum PoolIds : lp_id_t { RTD_VALUE, TEMPERATURE_C, FAULT_BYTE };
static constexpr DeviceCommandId_t CONFIG_CMD = 0x80;
static constexpr DeviceCommandId_t WRITE_HIGH_THRESHOLD = 0x83;
@ -31,35 +28,26 @@ static constexpr uint8_t CLEAR_FAULT_BIT_VAL = 0b0000'0010;
static constexpr size_t MAX_REPLY_SIZE = 5;
class Max31865Set:
public StaticLocalDataSet<sizeof(float) + sizeof(uint8_t)> {
public:
/**
* Constructor used by owner and data creators like device handlers.
* @param owner
* @param setId
*/
Max31865Set(HasLocalDataPoolIF* owner):
StaticLocalDataSet(owner, MAX31865_SET_ID) {
}
class Max31865Set : public StaticLocalDataSet<sizeof(float) + sizeof(uint8_t)> {
public:
/**
* Constructor used by owner and data creators like device handlers.
* @param owner
* @param setId
*/
Max31865Set(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, MAX31865_SET_ID) {}
/**
* Constructor used by data users like controllers.
* @param sid
*/
Max31865Set(object_id_t objectId):
StaticLocalDataSet(sid_t(objectId, MAX31865_SET_ID)) {
}
/**
* Constructor used by data users like controllers.
* @param sid
*/
Max31865Set(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, MAX31865_SET_ID)) {}
lp_var_t<float> rtdValue = lp_var_t<float>(sid.objectId,
PoolIds::RTD_VALUE, this);
lp_var_t<float> temperatureCelcius = lp_var_t<float>(sid.objectId,
PoolIds::TEMPERATURE_C, this);
lp_var_t<uint8_t> errorByte = lp_var_t<uint8_t>(sid.objectId,
PoolIds::FAULT_BYTE, this);
lp_var_t<float> rtdValue = lp_var_t<float>(sid.objectId, PoolIds::RTD_VALUE, this);
lp_var_t<float> temperatureCelcius = lp_var_t<float>(sid.objectId, PoolIds::TEMPERATURE_C, this);
lp_var_t<uint8_t> errorByte = lp_var_t<uint8_t>(sid.objectId, PoolIds::FAULT_BYTE, this);
};
}
} // namespace Max31865Definitions
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_MAX13865DEFINITIONS_H_ */