started gyro handler, renamed
This commit is contained in:
parent
7aceb6a658
commit
2203b8ed53
@ -1,4 +1,4 @@
|
|||||||
#include "GyroHandler.h"
|
#include <mission/devices/GyroL3GD20Handler.h>
|
||||||
|
|
||||||
GyroHandler::GyroHandler(object_id_t objectId, object_id_t deviceCommunication,
|
GyroHandler::GyroHandler(object_id_t objectId, object_id_t deviceCommunication,
|
||||||
CookieIF *comCookie):
|
CookieIF *comCookie):
|
||||||
@ -8,11 +8,20 @@ GyroHandler::GyroHandler(object_id_t objectId, object_id_t deviceCommunication,
|
|||||||
GyroHandler::~GyroHandler() {}
|
GyroHandler::~GyroHandler() {}
|
||||||
|
|
||||||
void GyroHandler::doStartUp() {
|
void GyroHandler::doStartUp() {
|
||||||
|
if(internalState == InternalState::STATE_NONE) {
|
||||||
|
internalState = InternalState::STATE_CONFIGURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(internalState == InternalState::STATE_CONFIGURE) {
|
||||||
|
if(commandExecuted) {
|
||||||
|
internalState = InternalState::STATE_NORMAL;
|
||||||
|
commandExecuted = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GyroHandler::doShutDown() {
|
void GyroHandler::doShutDown() {
|
||||||
|
setMode(_MODE_POWER_DOWN);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t GyroHandler::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
ReturnValue_t GyroHandler::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef MISSION_DEVICES_GYROHANDLER_H_
|
#ifndef MISSION_DEVICES_GYROL3GD20HANDLER_H_
|
||||||
#define MISSION_DEVICES_GYROHANDLER_H_
|
#define MISSION_DEVICES_GYROL3GD20HANDLER_H_
|
||||||
|
|
||||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||||
|
|
||||||
@ -41,8 +41,16 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
enum InternalState {
|
||||||
|
STATE_NONE,
|
||||||
|
STATE_CONFIGURE,
|
||||||
|
STATE_NORMAL
|
||||||
|
};
|
||||||
|
InternalState internalState = InternalState::STATE_NONE;
|
||||||
|
bool commandExecuted = false;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* MISSION_DEVICES_GYROHANDLER_H_ */
|
#endif /* MISSION_DEVICES_GYROL3GD20HANDLER_H_ */
|
11
mission/devices/devicedefinitions/GyroL3GD20Definitions.h
Normal file
11
mission/devices/devicedefinitions/GyroL3GD20Definitions.h
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_GYROL3GD20DEFINITIONS_H_
|
||||||
|
#define MISSION_DEVICES_DEVICEDEFINITIONS_GYROL3GD20DEFINITIONS_H_
|
||||||
|
|
||||||
|
namespace L3GD20H {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_GYROL3GD20DEFINITIONS_H_ */
|
Loading…
Reference in New Issue
Block a user