compiling for windows again
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
64
linux/devices/devicedefinitions/StarTrackerDefinitions.h
Normal file
64
linux/devices/devicedefinitions/StarTrackerDefinitions.h
Normal file
@ -0,0 +1,64 @@
|
||||
#ifndef MISSION_STARTRACKER_DEFINITIONS_H_
|
||||
#define MISSION_STARTRACKER_DEFINITIONS_H_
|
||||
|
||||
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
|
||||
#include <fsfw/datapoollocal/LocalPoolVariable.h>
|
||||
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
||||
#include "objects/systemObjectList.h"
|
||||
|
||||
namespace StarTracker {
|
||||
|
||||
/** This is the address of the star tracker */
|
||||
static const uint8_t ADDRESS = 33;
|
||||
|
||||
enum PoolIds: lp_id_t {
|
||||
STATUS,
|
||||
TICKS,
|
||||
TIME,
|
||||
MCU_TEMPERATURE,
|
||||
CMOS_TEMPERATURE
|
||||
};
|
||||
|
||||
|
||||
|
||||
static const DeviceCommandId_t REQ_TEMPERATURE = 25;
|
||||
|
||||
static const uint32_t TEMPERATURE_SET_ID = REQ_TEMPERATURE;
|
||||
|
||||
/** Max size of unencoded frame */
|
||||
static const size_t MAX_FRAME_SIZE = 1200;
|
||||
|
||||
static const uint8_t TEMPERATURE_SET_ENTRIES = 5;
|
||||
|
||||
/**
|
||||
* @brief This dataset can be used to store the temperature of a reaction wheel.
|
||||
*/
|
||||
class TemperatureSet:
|
||||
public StaticLocalDataSet<TEMPERATURE_SET_ENTRIES> {
|
||||
public:
|
||||
|
||||
TemperatureSet(HasLocalDataPoolIF* owner):
|
||||
StaticLocalDataSet(owner, TEMPERATURE_SET_ID) {
|
||||
}
|
||||
|
||||
TemperatureSet(object_id_t objectId):
|
||||
StaticLocalDataSet(sid_t(objectId, TEMPERATURE_SET_ID)) {
|
||||
}
|
||||
|
||||
lp_var_t<uint8_t> status = lp_var_t<uint8_t>(sid.objectId,
|
||||
PoolIds::STATUS, this);
|
||||
lp_var_t<uint32_t> ticks = lp_var_t<uint32_t>(sid.objectId,
|
||||
PoolIds::TICKS, this);
|
||||
/** Unix time in microseconds */
|
||||
lp_var_t<uint64_t> time = lp_var_t<uint64_t>(sid.objectId,
|
||||
PoolIds::TIME, this);
|
||||
lp_var_t<float> mcuTemperature = lp_var_t<float>(sid.objectId,
|
||||
PoolIds::MCU_TEMPERATURE, this);
|
||||
lp_var_t<float> cmosTemperature = lp_var_t<float>(sid.objectId,
|
||||
PoolIds::CMOS_TEMPERATURE, this);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* MISSION_STARTRACKER_DEFINITIONS_H_ */
|
||||
|
Reference in New Issue
Block a user