ok this should work
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
parent
e31aaf5b97
commit
59a8003ad8
@ -228,15 +228,15 @@ ReturnValue_t GyroADIS1650XHandler::interpretDeviceReply(DeviceCommandId_t id,
|
||||
static_cast<ADIS1650X::RangMdlBitfield>((rangMdlRaw >> 2) & 0b11);
|
||||
switch (bitfield) {
|
||||
case (ADIS1650X::RangMdlBitfield::RANGE_125_1BMLZ): {
|
||||
range = GyroRange::MODEL_1BMLZ;
|
||||
rangeMultiplicator = RANGE_1BMLZ;
|
||||
break;
|
||||
}
|
||||
case (ADIS1650X::RangMdlBitfield::RANGE_500_2BMLZ): {
|
||||
range = GyroRange::MODEL_2BMLZ;
|
||||
rangeMultiplicator = RANGE_2BMLZ;
|
||||
break;
|
||||
}
|
||||
case (ADIS1650X::RangMdlBitfield::RANGE_2000_3BMLZ): {
|
||||
range = GyroRange::MODEL_3BMLZ;
|
||||
rangeMultiplicator = RANGE_3BMLZ;
|
||||
break;
|
||||
}
|
||||
case (RangMdlBitfield::RESERVED): {
|
||||
@ -298,11 +298,14 @@ ReturnValue_t GyroADIS1650XHandler::handleSensorData(const uint8_t *packet) {
|
||||
{
|
||||
PoolReadGuard pg(&primaryDataset);
|
||||
int16_t angVelocXRaw = packet[4] << 8 | packet[5];
|
||||
primaryDataset.angVelocX.value = static_cast<float>(angVelocXRaw) / INT16_MAX * range;
|
||||
primaryDataset.angVelocX.value =
|
||||
static_cast<float>(angVelocXRaw) / static_cast<float>(INT16_MAX) * rangeMultiplicator;
|
||||
int16_t angVelocYRaw = packet[6] << 8 | packet[7];
|
||||
primaryDataset.angVelocY.value = static_cast<float>(angVelocYRaw) / INT16_MAX * range;
|
||||
primaryDataset.angVelocY.value =
|
||||
static_cast<float>(angVelocYRaw) / static_cast<float>(INT16_MAX) * rangeMultiplicator;
|
||||
int16_t angVelocZRaw = packet[8] << 8 | packet[9];
|
||||
primaryDataset.angVelocZ.value = static_cast<float>(angVelocZRaw) / INT16_MAX * range;
|
||||
primaryDataset.angVelocZ.value =
|
||||
static_cast<float>(angVelocZRaw) / static_cast<float>(INT16_MAX) * rangeMultiplicator;
|
||||
|
||||
float accelScaling = 0;
|
||||
if (adisType == ADIS1650X::Type::ADIS16507) {
|
||||
|
@ -46,7 +46,7 @@ class GyroADIS1650XHandler : public DeviceHandlerBase {
|
||||
ADIS1650X::Type adisType;
|
||||
AdisGyroPrimaryDataset primaryDataset;
|
||||
AdisGyroConfigDataset configDataset;
|
||||
ADIS1650X::GyroRange range = ADIS1650X::GyroRange::UNSET;
|
||||
double rangeMultiplicator = ADIS1650X::RANGE_UNSET;
|
||||
|
||||
bool goToNormalMode = false;
|
||||
bool warningSwitch = true;
|
||||
|
@ -13,7 +13,11 @@ enum class Type { ADIS16505, ADIS16507 };
|
||||
static constexpr size_t MAXIMUM_REPLY_SIZE = 64;
|
||||
static constexpr uint8_t WRITE_MASK = 0b1000'0000;
|
||||
|
||||
enum GyroRange { UNSET = 0, MODEL_1BMLZ = 125, MODEL_2BMLZ = 500, MODEL_3BMLZ = 2000 };
|
||||
// Ranges in deg / s
|
||||
static constexpr double RANGE_UNSET = 0.0;
|
||||
static constexpr double RANGE_1BMLZ = 125.0;
|
||||
static constexpr double RANGE_2BMLZ = 500.0;
|
||||
static constexpr double RANGE_3BMLZ = 2000.0;
|
||||
|
||||
enum RangMdlBitfield {
|
||||
RANGE_125_1BMLZ = 0b00,
|
||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
||||
Subproject commit c9790911ef085cd60c7d8a8a4bf75cc9c0f14c93
|
||||
Subproject commit 118b439272a1f541a0ba9ba5a2ffd992190d7ea7
|
Loading…
Reference in New Issue
Block a user