meier/ReactionWheelHandler #51

Merged
muellerr merged 37 commits from meier/ReactionWheelHandler into develop 2021-07-05 15:40:42 +02:00
46 changed files with 1170 additions and 398 deletions
Showing only changes of commit 67f2ed83ce - Show all commits

View File

@@ -42,13 +42,17 @@ void RwHandler::doShutDown() {
ReturnValue_t RwHandler::buildNormalDeviceCommand(DeviceCommandId_t * id) { ReturnValue_t RwHandler::buildNormalDeviceCommand(DeviceCommandId_t * id) {
switch (communicationStep) { switch (communicationStep) {
case CommunicationStep::GET_RESET_STATUS:
*id = RwDefinitions::GET_LAST_RESET_STATUS;
communicationStep = CommunicationStep::READ_TEMPERATURE;
break;
case CommunicationStep::READ_TEMPERATURE: case CommunicationStep::READ_TEMPERATURE:
*id = RwDefinitions::GET_TEMPERATURE; *id = RwDefinitions::GET_TEMPERATURE;
communicationStep = CommunicationStep::GET_RW_SATUS; communicationStep = CommunicationStep::GET_RW_SATUS;
break; break;
case CommunicationStep::GET_RW_SATUS: case CommunicationStep::GET_RW_SATUS:
*id = RwDefinitions::GET_RW_STATUS; *id = RwDefinitions::GET_RW_STATUS;
communicationStep = CommunicationStep::READ_TEMPERATURE; communicationStep = CommunicationStep::GET_RESET_STATUS;
break; break;
default: default:
sif::debug << "RwHandler::buildNormalDeviceCommand: Invalid communication step" sif::debug << "RwHandler::buildNormalDeviceCommand: Invalid communication step"

View File

@@ -90,6 +90,7 @@ private:
uint8_t commandBuffer[RwDefinitions::MAX_CMD_SIZE]; uint8_t commandBuffer[RwDefinitions::MAX_CMD_SIZE];
enum class CommunicationStep { enum class CommunicationStep {
GET_RESET_STATUS,
READ_TEMPERATURE, READ_TEMPERATURE,
GET_RW_SATUS GET_RW_SATUS
}; };