rm3100 continued

This commit is contained in:
2020-12-21 23:09:35 +01:00
parent 24cf9a661f
commit 8ecd0ec551
13 changed files with 282 additions and 52 deletions

View File

@ -4,8 +4,12 @@
#include "devicedefinitions/MGMHandlerRM3100Definitions.h"
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include <OBSWConfig.h>
class MGMHandlerRM3100: public DeviceHandlerBase {
public:
static const uint8_t INTERFACE_ID = CLASS_ID::MGM_RM3100;
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::MGM_RM3100;
MGMHandlerRM3100(object_id_t objectId, object_id_t deviceCommunication,
CookieIF* comCookie);
@ -45,11 +49,25 @@ private:
InternalState internalState = InternalState::STATE_NONE;
bool commandExecuted = false;
uint8_t commandBuffer[9];
uint8_t commandBuffer[10];
uint8_t commandBufferLen = 0;
uint8_t cmmRegValue = RM3100::CMM_VALUE;
uint8_t tmrcRegValue = RM3100::TMRC_DEFAULT_VALUE;
uint16_t cycleCountRegValueX = RM3100::CYCLE_COUNT_VALUE;
uint16_t cycleCountRegValueY = RM3100::CYCLE_COUNT_VALUE;
uint16_t cycleCountRegValueZ = RM3100::CYCLE_COUNT_VALUE;
float scaleFactorX = 1 / RM3100::DEFAULT_GAIN;
float scaleFactorY = 1 / RM3100::DEFAULT_GAIN;
float scaleFactorZ = 1 / RM3100::DEFAULT_GAIN;
ReturnValue_t handleCycleCountConfigCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData,size_t commandDataLen);
ReturnValue_t handleCycleCommand(bool oneCycleValue,
const uint8_t *commandData, size_t commandDataLen);
ReturnValue_t handleTmrcConfigCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData,size_t commandDataLen);
};
#endif /* MISSION_DEVICEHANDLING_MGMRM3100HANDLER_H_ */