This commit is contained in:
Robin Müller 2020-12-29 01:15:35 +01:00 committed by Robin Mueller
parent b3047c4ab6
commit a817f43ae9
2 changed files with 5 additions and 5 deletions

View File

@ -171,11 +171,11 @@ ReturnValue_t GyroHandler::interpretDeviceReply(DeviceCommandId_t id,
int8_t temperaturOffset = (-1) * packet[L3GD20H::TEMPERATURE_IDX];
float temperature = 25.0 + temperaturOffset;
ReturnValue_t result = dataset.read(20);
result = dataset.read(20);
if(result == HasReturnvaluesIF::RETURN_OK) {
dataset.angVelocX = angVelocX;
dataset.angVelocY = angVelocX;
dataset.angVelocZ = angVelocX;
dataset.angVelocY = angVelocY;
dataset.angVelocZ = angVelocZ;
dataset.temperature = temperature;
dataset.setValidity(true, true);
result = dataset.commit(20);

View File

@ -14,7 +14,7 @@ static constexpr uint8_t WHO_AM_I_REG = 0b0000'1111;
static constexpr uint8_t WHO_AM_I_VAL = 0b1101'0111;
/*------------------------------------------------------------------------*/
/* Control registers
/* Control registers */
/*------------------------------------------------------------------------*/
static constexpr uint8_t CTRL_REG_1 = 0b0010'0000;
static constexpr uint8_t CTRL_REG_2 = 0b0010'0001;
@ -88,7 +88,7 @@ static constexpr uint8_t OUT_Z_L = 13;
static constexpr uint8_t OUT_Z_H = 14;
/*------------------------------------------------------------------------*/
/* Device Handler specific
/* Device Handler specific */
/*------------------------------------------------------------------------*/
static constexpr DeviceCommandId_t READ_REGS = 0;
static constexpr DeviceCommandId_t CONFIGURE_CTRL_REGS = 1;