Merge pull request 'Update FSFW' (#51) from mueller/master into eive/develop
Reviewed-on: #51
This commit is contained in:
commit
318cd8e244
@ -16,12 +16,9 @@ class Gpio {
|
|||||||
sif::error << "Gpio::Gpio: Invalid GpioIF" << std::endl;
|
sif::error << "Gpio::Gpio: Invalid GpioIF" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ReturnValue_t pullHigh() {
|
ReturnValue_t pullHigh() { return gpioIF->pullHigh(gpioId); }
|
||||||
return gpioIF->pullHigh(gpioId);
|
ReturnValue_t pullLow() { return gpioIF->pullLow(gpioId); }
|
||||||
}
|
|
||||||
ReturnValue_t pullLow() {
|
|
||||||
return gpioIF->pullLow(gpioId);
|
|
||||||
}
|
|
||||||
private:
|
private:
|
||||||
gpioId_t gpioId = gpio::NO_GPIO;
|
gpioId_t gpioId = gpio::NO_GPIO;
|
||||||
GpioIF* gpioIF = nullptr;
|
GpioIF* gpioIF = nullptr;
|
||||||
|
@ -18,8 +18,7 @@ class CommandActionHelper {
|
|||||||
virtual ~CommandActionHelper();
|
virtual ~CommandActionHelper();
|
||||||
ReturnValue_t commandAction(object_id_t commandTo, ActionId_t actionId,
|
ReturnValue_t commandAction(object_id_t commandTo, ActionId_t actionId,
|
||||||
const uint8_t* data = nullptr, uint32_t size = 0);
|
const uint8_t* data = nullptr, uint32_t size = 0);
|
||||||
ReturnValue_t commandAction(object_id_t commandTo, ActionId_t actionId,
|
ReturnValue_t commandAction(object_id_t commandTo, ActionId_t actionId, SerializeIF* data);
|
||||||
SerializeIF* data);
|
|
||||||
ReturnValue_t initialize();
|
ReturnValue_t initialize();
|
||||||
ReturnValue_t handleReply(CommandMessage* reply);
|
ReturnValue_t handleReply(CommandMessage* reply);
|
||||||
uint8_t getCommandCount() const;
|
uint8_t getCommandCount() const;
|
||||||
|
@ -125,7 +125,8 @@ ReturnValue_t DeviceHandlerBase::initialize() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
if (this->fdirInstance == nullptr) {
|
if (this->fdirInstance == nullptr) {
|
||||||
this->fdirInstance = new DeviceHandlerFailureIsolation(this->getObjectId(), defaultFdirParentId);
|
this->fdirInstance =
|
||||||
|
new DeviceHandlerFailureIsolation(this->getObjectId(), defaultFdirParentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->parent != objects::NO_OBJECT) {
|
if (this->parent != objects::NO_OBJECT) {
|
||||||
@ -361,14 +362,12 @@ void DeviceHandlerBase::doStateMachine() {
|
|||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case _MODE_WAIT_OFF: {
|
case _MODE_WAIT_OFF: {
|
||||||
uint32_t currentUptime;
|
|
||||||
Clock::getUptime(¤tUptime);
|
|
||||||
|
|
||||||
if (powerSwitcher == nullptr) {
|
if (powerSwitcher == nullptr) {
|
||||||
setMode(MODE_OFF);
|
setMode(MODE_OFF);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
uint32_t currentUptime;
|
||||||
|
Clock::getUptime(¤tUptime);
|
||||||
if (currentUptime - timeoutStart >= powerSwitcher->getSwitchDelayMs()) {
|
if (currentUptime - timeoutStart >= powerSwitcher->getSwitchDelayMs()) {
|
||||||
triggerEvent(MODE_TRANSITION_FAILED, PowerSwitchIF::SWITCH_TIMEOUT, 0);
|
triggerEvent(MODE_TRANSITION_FAILED, PowerSwitchIF::SWITCH_TIMEOUT, 0);
|
||||||
setMode(MODE_ERROR_ON);
|
setMode(MODE_ERROR_ON);
|
||||||
@ -468,8 +467,7 @@ size_t DeviceHandlerBase::getNextReplyLength(DeviceCommandId_t commandId) {
|
|||||||
DeviceCommandMap::iterator command = cookieInfo.pendingCommand;
|
DeviceCommandMap::iterator command = cookieInfo.pendingCommand;
|
||||||
if (command->second.useAlternativeReplyId) {
|
if (command->second.useAlternativeReplyId) {
|
||||||
replyId = command->second.alternativeReplyId;
|
replyId = command->second.alternativeReplyId;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
replyId = commandId;
|
replyId = commandId;
|
||||||
}
|
}
|
||||||
DeviceReplyIter iter = deviceReplyMap.find(replyId);
|
DeviceReplyIter iter = deviceReplyMap.find(replyId);
|
||||||
@ -1522,4 +1520,6 @@ void DeviceHandlerBase::setCustomFdir(FailureIsolationBase* fdir) { this->fdirIn
|
|||||||
|
|
||||||
void DeviceHandlerBase::setParent(object_id_t parent) { this->parent = parent; }
|
void DeviceHandlerBase::setParent(object_id_t parent) { this->parent = parent; }
|
||||||
|
|
||||||
void DeviceHandlerBase::setPowerSwitcher(PowerSwitchIF* switcher) { this->powerSwitcher = switcher; }
|
void DeviceHandlerBase::setPowerSwitcher(PowerSwitchIF* switcher) {
|
||||||
|
this->powerSwitcher = switcher;
|
||||||
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#ifndef FSFW_POWER_POWERSWITCHIF_H_
|
#ifndef FSFW_POWER_POWERSWITCHIF_H_
|
||||||
#define FSFW_POWER_POWERSWITCHIF_H_
|
#define FSFW_POWER_POWERSWITCHIF_H_
|
||||||
|
|
||||||
#include "definitions.h"
|
|
||||||
#include "../events/Event.h"
|
#include "../events/Event.h"
|
||||||
#include "../returnvalues/HasReturnvaluesIF.h"
|
#include "../returnvalues/HasReturnvaluesIF.h"
|
||||||
#include "definitions.h"
|
#include "definitions.h"
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#include "definitions.h"
|
|
||||||
#include "fsfw/power/PowerSwitcher.h"
|
#include "fsfw/power/PowerSwitcher.h"
|
||||||
|
|
||||||
#include "definitions.h"
|
#include "definitions.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user