2023-02-26 14:55:33 +01:00
|
|
|
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_ACSPOLLING_H_
|
|
|
|
#define MISSION_DEVICES_DEVICEDEFINITIONS_ACSPOLLING_H_
|
|
|
|
|
2023-04-02 20:12:24 +02:00
|
|
|
#include <mission/acs/defs.h>
|
|
|
|
|
2023-02-26 21:26:49 +01:00
|
|
|
#include "fsfw/thermal/tcsDefinitions.h"
|
2023-02-26 14:55:33 +01:00
|
|
|
#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;
|
|
|
|
};
|
|
|
|
|
2023-06-06 16:02:11 +02:00
|
|
|
struct Adis1650XRequest {
|
|
|
|
SimpleSensorMode mode;
|
|
|
|
adis1650x::Type type;
|
|
|
|
Adis1650XConfig cfg;
|
|
|
|
};
|
|
|
|
|
2023-02-26 14:55:33 +01:00
|
|
|
struct Adis1650XData {
|
2023-02-26 21:26:49 +01:00
|
|
|
double sensitivity = 0.0;
|
2023-02-26 14:55:33 +01:00
|
|
|
// Angular velocities in all axes (X, Y and Z)
|
2023-02-26 21:26:49 +01:00
|
|
|
int16_t angVelocities[3]{};
|
|
|
|
double accelScaling = 0.0;
|
2023-02-26 14:55:33 +01:00
|
|
|
// Accelerations in all axes
|
2023-02-26 21:26:49 +01:00
|
|
|
int16_t accelerations[3]{};
|
|
|
|
int16_t temperatureRaw = thermal::INVALID_TEMPERATURE;
|
2023-02-26 14:55:33 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Adis1650XReply {
|
|
|
|
bool cfgWasSet = false;
|
|
|
|
Adis1650XConfig cfg;
|
|
|
|
bool dataWasSet = false;
|
|
|
|
Adis1650XData data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct GyroL3gRequest {
|
2023-02-26 21:26:49 +01:00
|
|
|
SimpleSensorMode mode = SimpleSensorMode::OFF;
|
|
|
|
uint8_t ctrlRegs[5]{};
|
2023-02-26 14:55:33 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
struct GyroL3gReply {
|
2023-02-26 21:26:49 +01:00
|
|
|
bool cfgWasSet = false;
|
2023-02-26 14:55:33 +01:00
|
|
|
uint8_t statusReg;
|
|
|
|
// Angular velocities in all axes (X, Y and Z)
|
2023-02-26 21:26:49 +01:00
|
|
|
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;
|
2023-02-26 14:55:33 +01:00
|
|
|
};
|
|
|
|
|
2023-02-28 19:14:15 +01:00
|
|
|
struct SusRequest {
|
|
|
|
SimpleSensorMode mode = SimpleSensorMode::OFF;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct SusReply {
|
2023-03-01 16:36:21 +01:00
|
|
|
bool cfgWasSet = false;
|
2023-02-28 19:14:15 +01:00
|
|
|
bool dataWasSet = false;
|
|
|
|
uint16_t tempRaw = 0;
|
|
|
|
uint16_t channelsRaw[6]{};
|
|
|
|
};
|
|
|
|
|
2023-02-26 14:55:33 +01:00
|
|
|
} // namespace acs
|
|
|
|
|
|
|
|
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_ACSPOLLING_H_ */
|