eive-obsw/mission/acs/acsBoardPolling.h
meggert 6a2d5b8161
All checks were successful
EIVE/eive-obsw/pipeline/pr-v3.0.0-dev This commit looks good
well this doesnt work
2023-06-06 16:02:11 +02:00

94 lines
1.9 KiB
C++

#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_ACSPOLLING_H_
#define MISSION_DEVICES_DEVICEDEFINITIONS_ACSPOLLING_H_
#include <mission/acs/defs.h>
#include "fsfw/thermal/tcsDefinitions.h"
#include "gyroAdisHelpers.h"
namespace acs {
struct Adis1650XConfig {
uint16_t diagStat;
uint16_t filterSetting;
uint16_t rangMdl;
uint16_t mscCtrlReg;
uint16_t decRateReg;
uint16_t prodId;
};
struct Adis1650XRequest {
SimpleSensorMode mode;
adis1650x::Type type;
Adis1650XConfig cfg;
};
struct Adis1650XData {
double sensitivity = 0.0;
// Angular velocities in all axes (X, Y and Z)
int16_t angVelocities[3]{};
double accelScaling = 0.0;
// Accelerations in all axes
int16_t accelerations[3]{};
int16_t temperatureRaw = thermal::INVALID_TEMPERATURE;
};
struct Adis1650XReply {
bool cfgWasSet = false;
Adis1650XConfig cfg;
bool dataWasSet = false;
Adis1650XData data;
};
struct GyroL3gRequest {
SimpleSensorMode mode = SimpleSensorMode::OFF;
uint8_t ctrlRegs[5]{};
};
struct GyroL3gReply {
bool cfgWasSet = false;
uint8_t statusReg;
// Angular velocities in all axes (X, Y and Z)
int16_t angVelocities[3]{};
int8_t tempOffsetRaw = 0;
uint8_t ctrlRegs[5]{};
float sensitivity = 0.0;
};
struct MgmRm3100Request {
SimpleSensorMode mode = SimpleSensorMode::OFF;
};
struct MgmRm3100Reply {
bool dataWasRead = false;
float scaleFactors[3]{};
int32_t mgmValuesRaw[3]{};
};
struct MgmLis3Request {
SimpleSensorMode mode = SimpleSensorMode::OFF;
};
struct MgmLis3Reply {
bool dataWasSet = false;
float sensitivity = 0.0;
int16_t mgmValuesRaw[3]{};
bool temperatureWasSet = false;
int16_t temperatureRaw = thermal::INVALID_TEMPERATURE;
};
struct SusRequest {
SimpleSensorMode mode = SimpleSensorMode::OFF;
};
struct SusReply {
bool cfgWasSet = false;
bool dataWasSet = false;
uint16_t tempRaw = 0;
uint16_t channelsRaw[6]{};
};
} // namespace acs
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_ACSPOLLING_H_ */