92 lines
1.9 KiB
C++
92 lines
1.9 KiB
C++
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_ACSPOLLING_H_
|
|
#define MISSION_DEVICES_DEVICEDEFINITIONS_ACSPOLLING_H_
|
|
|
|
#include "fsfw/thermal/tcsDefinitions.h"
|
|
#include "gyroAdisHelpers.h"
|
|
|
|
namespace acs {
|
|
|
|
enum SimpleSensorMode { NORMAL = 0, OFF = 1 };
|
|
|
|
struct Adis1650XRequest {
|
|
SimpleSensorMode mode;
|
|
adis1650x::Type type;
|
|
};
|
|
|
|
struct Adis1650XConfig {
|
|
uint16_t diagStat;
|
|
uint16_t filterSetting;
|
|
uint16_t rangMdl;
|
|
uint16_t mscCtrlReg;
|
|
uint16_t decRateReg;
|
|
uint16_t prodId;
|
|
};
|
|
|
|
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 dataWasSet = false;
|
|
uint16_t tempRaw = 0;
|
|
uint16_t channelsRaw[6]{};
|
|
};
|
|
|
|
} // namespace acs
|
|
|
|
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_ACSPOLLING_H_ */
|