adaptions for fsfw api changes
This commit is contained in:
parent
e573b74681
commit
d26e0b9a30
@ -201,8 +201,8 @@ void HeaterHandler::handleSwitchOnCommand(HeaterMapIter heaterMapIter) {
|
||||
heaterMapIter->second.active = false;
|
||||
heaterMapIter->second.waitMainSwitchOn = false;
|
||||
if (heaterMapIter->second.replyQueue != commandQueue->getId()) {
|
||||
actionHelper.finish(heaterMapIter->second.replyQueue, heaterMapIter->second.action,
|
||||
MAIN_SWITCH_SET_TIMEOUT );
|
||||
actionHelper.finish(false, heaterMapIter->second.replyQueue,
|
||||
heaterMapIter->second.action, MAIN_SWITCH_SET_TIMEOUT );
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -229,8 +229,15 @@ void HeaterHandler::handleSwitchOnCommand(HeaterMapIter heaterMapIter) {
|
||||
/* There is no need to send action finish replies if the sender was the
|
||||
* HeaterHandler itself. */
|
||||
if (heaterMapIter->second.replyQueue != commandQueue->getId()) {
|
||||
actionHelper.finish(heaterMapIter->second.replyQueue,
|
||||
heaterMapIter->second.action, result);
|
||||
if(result == RETURN_OK) {
|
||||
actionHelper.finish(true, heaterMapIter->second.replyQueue,
|
||||
heaterMapIter->second.action, result);
|
||||
}
|
||||
else {
|
||||
actionHelper.finish(false, heaterMapIter->second.replyQueue,
|
||||
heaterMapIter->second.action, result);
|
||||
}
|
||||
|
||||
}
|
||||
heaterMapIter->second.active = false;
|
||||
heaterMapIter->second.waitMainSwitchOn = false;
|
||||
@ -250,7 +257,7 @@ void HeaterHandler::handleSwitchOnCommand(HeaterMapIter heaterMapIter) {
|
||||
sif::debug << "HeaterHandler::handleActiveCommands: Failed to get state of"
|
||||
<< " main line switch" << std::endl;
|
||||
if (heaterMapIter->second.replyQueue != commandQueue->getId()) {
|
||||
actionHelper.finish(heaterMapIter->second.replyQueue,
|
||||
actionHelper.finish(false, heaterMapIter->second.replyQueue,
|
||||
heaterMapIter->second.action, mainSwitchState);
|
||||
}
|
||||
heaterMapIter->second.active = false;
|
||||
@ -282,8 +289,15 @@ void HeaterHandler::handleSwitchOffCommand(HeaterMapIter heaterMapIter) {
|
||||
triggerEvent(SWITCH_ALREADY_OFF, switchNr);
|
||||
}
|
||||
if (heaterMapIter->second.replyQueue != NO_COMMANDER) {
|
||||
actionHelper.finish(heaterMapIter->second.replyQueue,
|
||||
heaterMapIter->second.action, result);
|
||||
/* Report back switch command reply if necessary */
|
||||
if(result == HasReturnvaluesIF::RETURN_OK) {
|
||||
actionHelper.finish(true, heaterMapIter->second.replyQueue,
|
||||
heaterMapIter->second.action, result);
|
||||
}
|
||||
else {
|
||||
actionHelper.finish(false, heaterMapIter->second.replyQueue,
|
||||
heaterMapIter->second.action, result);
|
||||
}
|
||||
}
|
||||
heaterMapIter->second.active = false;
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ void SolarArrayDeploymentHandler::performWaitOn8VActions() {
|
||||
} else {
|
||||
if (mainSwitchCountdown.hasTimedOut()) {
|
||||
triggerEvent(MAIN_SWITCH_ON_TIMEOUT);
|
||||
actionHelper.finish(rememberCommanderId, DEPLOY_SOLAR_ARRAYS,
|
||||
actionHelper.finish(false, rememberCommanderId, DEPLOY_SOLAR_ARRAYS,
|
||||
MAIN_SWITCH_TIMEOUT_FAILURE);
|
||||
stateMachine = WAIT_ON_DELOYMENT_COMMAND;
|
||||
}
|
||||
@ -125,7 +125,7 @@ void SolarArrayDeploymentHandler::switchDeploymentTransistors() {
|
||||
* the deployment sequence. */
|
||||
stateMachine = WAIT_ON_DELOYMENT_COMMAND;
|
||||
triggerEvent(DEPL_SA1_GPIO_SWTICH_ON_FAILED);
|
||||
actionHelper.finish(rememberCommanderId, DEPLOY_SOLAR_ARRAYS,
|
||||
actionHelper.finish(false, rememberCommanderId, DEPLOY_SOLAR_ARRAYS,
|
||||
SWITCHING_DEPL_SA2_FAILED);
|
||||
mainLineSwitcher->sendSwitchCommand(mainLineSwitch, PowerSwitchIF::SWITCH_OFF);
|
||||
}
|
||||
@ -135,7 +135,7 @@ void SolarArrayDeploymentHandler::switchDeploymentTransistors() {
|
||||
" array deployment switch 2 high " << std::endl;
|
||||
stateMachine = WAIT_ON_DELOYMENT_COMMAND;
|
||||
triggerEvent(DEPL_SA2_GPIO_SWTICH_ON_FAILED);
|
||||
actionHelper.finish(rememberCommanderId, DEPLOY_SOLAR_ARRAYS,
|
||||
actionHelper.finish(false, rememberCommanderId, DEPLOY_SOLAR_ARRAYS,
|
||||
SWITCHING_DEPL_SA2_FAILED);
|
||||
mainLineSwitcher->sendSwitchCommand(mainLineSwitch, PowerSwitchIF::SWITCH_OFF);
|
||||
}
|
||||
@ -146,7 +146,7 @@ void SolarArrayDeploymentHandler::switchDeploymentTransistors() {
|
||||
void SolarArrayDeploymentHandler::handleDeploymentFinish() {
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
if (deploymentCountdown.hasTimedOut()) {
|
||||
actionHelper.finish(rememberCommanderId, DEPLOY_SOLAR_ARRAYS, RETURN_OK);
|
||||
actionHelper.finish(true, rememberCommanderId, DEPLOY_SOLAR_ARRAYS, RETURN_OK);
|
||||
result = gpioInterface->pullLow(deplSA1);
|
||||
if (result != RETURN_OK) {
|
||||
sif::debug << "SolarArrayDeploymentHandler::handleStateMachine: Failed to pull solar"
|
||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
||||
Subproject commit 91f69aa34fcdde9d3f6ae1a71e72a084bf3bc49d
|
||||
Subproject commit 18e40d62481e6c2547eb108114f1f124a25ccb9b
|
@ -1,5 +1,5 @@
|
||||
#include <mission/devices/GyroL3GD20Handler.h>
|
||||
#include <fsfw/datapool/PoolReadHelper.h>
|
||||
#include <fsfw/datapool/PoolReadGuard.h>
|
||||
|
||||
GyroHandler::GyroHandler(object_id_t objectId, object_id_t deviceCommunication,
|
||||
CookieIF *comCookie):
|
||||
@ -172,7 +172,7 @@ ReturnValue_t GyroHandler::interpretDeviceReply(DeviceCommandId_t id,
|
||||
int8_t temperaturOffset = (-1) * packet[L3GD20H::TEMPERATURE_IDX];
|
||||
float temperature = 25.0 + temperaturOffset;
|
||||
|
||||
PoolReadHelper readSet(&dataset);
|
||||
PoolReadGuard readSet(&dataset);
|
||||
if(readSet.getReadResult() == HasReturnvaluesIF::RETURN_OK) {
|
||||
dataset.angVelocX = angVelocX;
|
||||
dataset.angVelocY = angVelocY;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <fsfw/datapool/PoolReadHelper.h>
|
||||
#include "MGMHandlerLIS3MDL.h"
|
||||
|
||||
#include <fsfw/datapool/PoolReadGuard.h>
|
||||
|
||||
MGMHandlerLIS3MDL::MGMHandlerLIS3MDL(object_id_t objectId,
|
||||
object_id_t deviceCommunication, CookieIF* comCookie):
|
||||
@ -299,7 +299,7 @@ ReturnValue_t MGMHandlerLIS3MDL::interpretDeviceReply(DeviceCommandId_t id,
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
PoolReadHelper readHelper(&dataset);
|
||||
PoolReadGuard readHelper(&dataset);
|
||||
if(readHelper.getReadResult() == HasReturnvaluesIF::RETURN_OK) {
|
||||
dataset.fieldStrengthX = mgmX;
|
||||
dataset.fieldStrengthY = mgmY;
|
||||
|
@ -49,7 +49,7 @@ ReturnValue_t PCDUHandler::initialize() {
|
||||
sif::error << "PCDUHandler::initialize: Invalid pdu2Handler" << std::endl;
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
result = pdu2Handler->getSubscriptionInterface()->subscribeForSetUpdateMessages(
|
||||
result = pdu2Handler->getSubscriptionInterface()->subscribeForSetUpdateMessage(
|
||||
PDU2::HK_TABLE_DATA_SET_ID, this->getObjectId(), commandQueue->getId(), true);
|
||||
if (result != RETURN_OK) {
|
||||
sif::error << "PCDUHandler::initialize: Failed to subscribe for set update messages from "
|
||||
@ -63,7 +63,7 @@ ReturnValue_t PCDUHandler::initialize() {
|
||||
sif::error << "PCDUHandler::initialize: Invalid pdu1Handler" << std::endl;
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
result = pdu1Handler->getSubscriptionInterface()->subscribeForSetUpdateMessages(
|
||||
result = pdu1Handler->getSubscriptionInterface()->subscribeForSetUpdateMessage(
|
||||
PDU1::HK_TABLE_DATA_SET_ID, this->getObjectId(), commandQueue->getId(), true);
|
||||
if (result != RETURN_OK) {
|
||||
sif::error << "PCDUHandler::initialize: Failed to subscribe for set update messages from "
|
||||
|
Loading…
Reference in New Issue
Block a user