improvements for L3GD20H device handler

This commit is contained in:
2021-09-15 17:18:47 +02:00
parent 23c562bb67
commit a6e4eb9ad4
2 changed files with 25 additions and 28 deletions

View File

@ -7,10 +7,6 @@
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
#ifndef FSFW_HAL_L3GD20_GYRO_DEBUG
#define FSFW_HAL_L3GD20_GYRO_DEBUG 0
#endif /* FSFW_HAL_L3GD20_GYRO_DEBUG */
/**
* @brief Device Handler for the L3GD20H gyroscope sensor
* (https://www.st.com/en/mems-and-sensors/l3gd20h.html)
@ -23,9 +19,12 @@
class GyroHandlerL3GD20H: public DeviceHandlerBase {
public:
GyroHandlerL3GD20H(object_id_t objectId, object_id_t deviceCommunication,
CookieIF* comCookie);
CookieIF* comCookie, uint8_t switchId, uint32_t transitionDelayMs = 10000);
virtual ~GyroHandlerL3GD20H();
/**
* @brief Configure device handler to go to normal mode immediately
*/
void setGoNormalModeAtStartup();
protected:
@ -51,6 +50,8 @@ protected:
LocalDataPoolManager &poolManager) override;
private:
uint8_t switchId = 0;
uint32_t transitionDelayMs = 0;
GyroPrimaryDataset dataset;
enum class InternalState {