sensor handling moved to separate function

This commit is contained in:
Robin Müller 2021-05-24 20:59:19 +02:00 committed by Robin Mueller
parent 0fa32ef2ea
commit 853a22c55a
2 changed files with 36 additions and 30 deletions

View File

@ -116,6 +116,15 @@ ReturnValue_t GyroADIS16507Handler::interpretDeviceReply(DeviceCommandId_t id,
break;
}
case(ADIS16507::READ_SENSOR_DATA): {
return handleSensorData(packet);
}
}
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t GyroADIS16507Handler::handleSensorData(const uint8_t *packet) {
BurstModes burstMode = getBurstMode();
switch(burstMode) {
case(BurstModes::BURST_16_BURST_SEL_1):
@ -139,16 +148,12 @@ ReturnValue_t GyroADIS16507Handler::interpretDeviceReply(DeviceCommandId_t id,
#endif
return HasReturnvaluesIF::RETURN_FAILED;
}
break;
}
case(BurstModes::BURST_32_BURST_SEL_0): {
break;
}
}
}
}
return HasReturnvaluesIF::RETURN_OK;
}

View File

@ -61,6 +61,7 @@ private:
const uint8_t *sendData, size_t sendLen, void* args);
#endif
ReturnValue_t handleSensorData(const uint8_t* packet);
};