Merge remote-tracking branch 'origin/develop' into tmp_dev_custom_fdir
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build started...

This commit is contained in:
Robin Müller 2023-04-14 18:48:20 +02:00
commit 4bfd675073
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
9 changed files with 55 additions and 20 deletions

View File

@ -27,15 +27,16 @@ will consitute of a breaking change warranting a new major release:
- Bugfix for STR where an invalid reply was received for special requests - Bugfix for STR where an invalid reply was received for special requests
like firmware updates. like firmware updates.
- Bugfix for shell command executors in command controller which lead to a crash. - Bugfix for shell command executors in command controller which lead to a crash.
- Fixed regression where the reply result for ACS board and SUS board devices was set to FAILED
even when going to OFF mode. In that case, it has to be set to OK so the device handler can
complete the OFF transition.
## Changed ## Changed
- STR `wire` library updated to v10.3. Submodule renamed to `sagittactl`. - STR `wire` library updated to v10.3. Submodule renamed to `sagittactl`.
## Changed
- Custom FDIR for TMP1075 sensors. The device handlers reject `NEEDS_RECOVERY` health commands - Custom FDIR for TMP1075 sensors. The device handlers reject `NEEDS_RECOVERY` health commands
anyway, so it does not really make sense to use the default FDIR. anyway, so it does not really make sense to use the default FDIR.
- Reject `NEEDS_RECOVERY` health commands for the heater health devices.
## Added ## Added

View File

@ -122,13 +122,14 @@ ReturnValue_t AcsBoardPolling::sendMessage(CookieIF* cookie, const uint8_t* send
} else { } else {
sif::warning << "AcsBoardPolling: Unknown ADIS type" << std::endl; sif::warning << "AcsBoardPolling: Unknown ADIS type" << std::endl;
} }
adis.replyResult = returnvalue::FAILED;
adis.performStartup = true; adis.performStartup = true;
} else if (req->mode == acs::SimpleSensorMode::OFF) { } else if (req->mode == acs::SimpleSensorMode::OFF) {
adis.performStartup = false; adis.performStartup = false;
adis.ownReply.cfgWasSet = false; adis.ownReply.cfgWasSet = false;
adis.ownReply.dataWasSet = false; adis.ownReply.dataWasSet = false;
adis.replyResult = returnvalue::OK;
} }
adis.replyResult = returnvalue::FAILED;
adis.mode = req->mode; adis.mode = req->mode;
} }
return returnvalue::OK; return returnvalue::OK;
@ -144,10 +145,11 @@ ReturnValue_t AcsBoardPolling::sendMessage(CookieIF* cookie, const uint8_t* send
if (req->mode == acs::SimpleSensorMode::NORMAL) { if (req->mode == acs::SimpleSensorMode::NORMAL) {
std::memcpy(gyro.sensorCfg, req->ctrlRegs, 5); std::memcpy(gyro.sensorCfg, req->ctrlRegs, 5);
gyro.performStartup = true; gyro.performStartup = true;
gyro.replyResult = returnvalue::FAILED;
} else { } else {
gyro.ownReply.cfgWasSet = false; gyro.ownReply.cfgWasSet = false;
gyro.replyResult = returnvalue::OK;
} }
gyro.replyResult = returnvalue::FAILED;
gyro.mode = req->mode; gyro.mode = req->mode;
} }
return returnvalue::OK; return returnvalue::OK;
@ -162,11 +164,12 @@ ReturnValue_t AcsBoardPolling::sendMessage(CookieIF* cookie, const uint8_t* send
if (req->mode != mgm.mode) { if (req->mode != mgm.mode) {
if (req->mode == acs::SimpleSensorMode::NORMAL) { if (req->mode == acs::SimpleSensorMode::NORMAL) {
mgm.performStartup = true; mgm.performStartup = true;
mgm.replyResult = returnvalue::FAILED;
} else { } else {
mgm.ownReply.dataWasSet = false; mgm.ownReply.dataWasSet = false;
mgm.replyResult = returnvalue::OK;
mgm.ownReply.temperatureWasSet = false; mgm.ownReply.temperatureWasSet = false;
} }
mgm.replyResult = returnvalue::FAILED;
mgm.mode = req->mode; mgm.mode = req->mode;
} }
return returnvalue::OK; return returnvalue::OK;
@ -181,10 +184,11 @@ ReturnValue_t AcsBoardPolling::sendMessage(CookieIF* cookie, const uint8_t* send
if (req->mode != mgm.mode) { if (req->mode != mgm.mode) {
if (req->mode == acs::SimpleSensorMode::NORMAL) { if (req->mode == acs::SimpleSensorMode::NORMAL) {
mgm.performStartup = true; mgm.performStartup = true;
mgm.replyResult = returnvalue::FAILED;
} else { } else {
mgm.ownReply.dataWasRead = false; mgm.ownReply.dataWasRead = false;
mgm.replyResult = returnvalue::OK;
} }
mgm.replyResult = returnvalue::FAILED;
mgm.mode = req->mode; mgm.mode = req->mode;
} }
return returnvalue::OK; return returnvalue::OK;

View File

@ -69,11 +69,13 @@ ReturnValue_t SusPolling::sendMessage(CookieIF* cookie, const uint8_t* sendData,
if (susDevs[susIdx].mode != susReq->mode) { if (susDevs[susIdx].mode != susReq->mode) {
if (susReq->mode == acs::SimpleSensorMode::NORMAL) { if (susReq->mode == acs::SimpleSensorMode::NORMAL) {
susDevs[susIdx].performStartup = true; susDevs[susIdx].performStartup = true;
susDevs[susIdx].replyResult = returnvalue::FAILED;
} else { } else {
susDevs[susIdx].ownReply.cfgWasSet = false; susDevs[susIdx].ownReply.cfgWasSet = false;
susDevs[susIdx].ownReply.dataWasSet = false; susDevs[susIdx].ownReply.dataWasSet = false;
// We are off now, but DHB wants a proper reply.
susDevs[susIdx].replyResult = returnvalue::OK;
} }
susDevs[susIdx].replyResult = returnvalue::FAILED;
susDevs[susIdx].mode = susReq->mode; susDevs[susIdx].mode = susReq->mode;
} }
if (state == InternalState::IDLE) { if (state == InternalState::IDLE) {

View File

@ -287,15 +287,17 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
void ObjectFactory::createGenericHeaterComponents(GpioIF& gpioIF, PowerSwitchIF& pwrSwitcher, void ObjectFactory::createGenericHeaterComponents(GpioIF& gpioIF, PowerSwitchIF& pwrSwitcher,
HeaterHandler*& heaterHandler) { HeaterHandler*& heaterHandler) {
HeaterHelper helper({{ HeaterHelper helper({{
{new HealthDevice(objects::HEATER_0_PLOC_PROC_BRD, MessageQueueIF::NO_QUEUE), {new HeaterHealthDev(objects::HEATER_0_PLOC_PROC_BRD, MessageQueueIF::NO_QUEUE),
gpioIds::HEATER_0}, gpioIds::HEATER_0},
{new HealthDevice(objects::HEATER_1_PCDU_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_1}, {new HeaterHealthDev(objects::HEATER_1_PCDU_BRD, MessageQueueIF::NO_QUEUE),
{new HealthDevice(objects::HEATER_2_ACS_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_2}, gpioIds::HEATER_1},
{new HealthDevice(objects::HEATER_3_OBC_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_3}, {new HeaterHealthDev(objects::HEATER_2_ACS_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_2},
{new HealthDevice(objects::HEATER_4_CAMERA, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_4}, {new HeaterHealthDev(objects::HEATER_3_OBC_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_3},
{new HealthDevice(objects::HEATER_5_STR, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_5}, {new HeaterHealthDev(objects::HEATER_4_CAMERA, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_4},
{new HealthDevice(objects::HEATER_6_DRO, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_6}, {new HeaterHealthDev(objects::HEATER_5_STR, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_5},
{new HealthDevice(objects::HEATER_7_SYRLINKS, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_7}, {new HeaterHealthDev(objects::HEATER_6_DRO, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_6},
{new HeaterHealthDev(objects::HEATER_7_SYRLINKS, MessageQueueIF::NO_QUEUE),
gpioIds::HEATER_7},
}}); }});
heaterHandler = new HeaterHandler(objects::HEATER_HANDLER, &gpioIF, helper, &pwrSwitcher, heaterHandler = new HeaterHandler(objects::HEATER_HANDLER, &gpioIF, helper, &pwrSwitcher,
power::Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V); power::Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V);

View File

@ -1,3 +1,4 @@
target_sources( target_sources(
${LIB_EIVE_MISSION} PRIVATE HeaterHandler.cpp max1227.cpp ${LIB_EIVE_MISSION}
Max31865EiveHandler.cpp Tmp1075Handler.cpp) PRIVATE HeaterHandler.cpp max1227.cpp Max31865EiveHandler.cpp
Tmp1075Handler.cpp HeaterHealthDev.cpp)

View File

@ -15,6 +15,7 @@
#include <fsfw/tasks/ExecutableObjectIF.h> #include <fsfw/tasks/ExecutableObjectIF.h>
#include <fsfw/timemanager/Countdown.h> #include <fsfw/timemanager/Countdown.h>
#include <fsfw_hal/common/gpio/GpioIF.h> #include <fsfw_hal/common/gpio/GpioIF.h>
#include <mission/tcs/HeaterHealthDev.h>
#include <array> #include <array>
#include <utility> #include <utility>
@ -27,7 +28,7 @@
class PowerSwitchIF; class PowerSwitchIF;
class HealthTableIF; class HealthTableIF;
using HeaterPair = std::pair<HealthDevice*, gpioId_t>; using HeaterPair = std::pair<HeaterHealthDev*, gpioId_t>;
struct HeaterHelper { struct HeaterHelper {
public: public:

View File

@ -0,0 +1,12 @@
#include "HeaterHealthDev.h"
HeaterHealthDev::HeaterHealthDev(object_id_t setObjectId, MessageQueueId_t parentQueue)
: HealthDevice(setObjectId, parentQueue) {}
ReturnValue_t HeaterHealthDev::setHealth(HealthState health) {
// Does not make sense for a simple heater.
if (health == HealthState::NEEDS_RECOVERY) {
return returnvalue::FAILED;
}
return HealthDevice::setHealth(health);
}

View File

@ -0,0 +1,12 @@
#ifndef MISSION_TCS_HEATERHEALTHDEV_H_
#define MISSION_TCS_HEATERHEALTHDEV_H_
#include <fsfw/devicehandlers/HealthDevice.h>
class HeaterHealthDev : public HealthDevice {
public:
HeaterHealthDev(object_id_t setObjectId, MessageQueueId_t parentQueue);
ReturnValue_t setHealth(HealthState health) override;
};
#endif /* MISSION_TCS_HEATERHEALTHDEV_H_ */

2
tmtc

@ -1 +1 @@
Subproject commit f8da9cff7c5d6d6bdd483f90ccefb67b2d1e11a4 Subproject commit f57342602da3232c0bfecaecb0c10be6d692b384