Merge remote-tracking branch 'origin/main' into v4.0.0-dev
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2023-06-15 05:09:52 +02:00
commit 4bd3cf4d52
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
10 changed files with 58 additions and 23 deletions

View File

@ -31,6 +31,30 @@ TODO: New firmware package version.
- Removed PTME busy/ready signals. Those were not used anyway because register reads are used now. - Removed PTME busy/ready signals. Those were not used anyway because register reads are used now.
- APB bus access busy checking is not done anymore as this is performed by the bus itself now. - APB bus access busy checking is not done anymore as this is performed by the bus itself now.
# [v3.1.1] 2023-06-14
## Fixed
- TMP1075 bugfix where negative temperatures could not be measured because of a two's-complement
conversion bug.
# [v3.1.0] 2023-06-14
- `eive-tmtc` version v4.1.0
## Fixed
- TCS heater switch enumeration naming was old/wrong and was not updated in sync with the object ID
update. This lead to the TCS controller commanding the wrong heaters.
## Changed
- Increase number of allowed parallel HK commands to 16
## Added
- Added `CONFIG_SET`, `MAN_HEATER_ON` and `MAN_HEATER_OFF` support for the BPX battery handler
# [v3.0.0] 2023-06-11 # [v3.0.0] 2023-06-11
- `eive-tmtc` version v4.0.0 - `eive-tmtc` version v4.0.0

2
fsfw

@ -1 +1 @@
Subproject commit 5322de059916efcf874b10ccc766b46e53d2470b Subproject commit 0a977ea688cd78585aabb9ba511eaf8030452712

View File

@ -1002,7 +1002,7 @@ void ThermalController::copyDevices() {
void ThermalController::ctrlAcsBoard() { void ThermalController::ctrlAcsBoard() {
heater::Switch switchNr = heater::HEATER_2_ACS_BRD; heater::Switch switchNr = heater::HEATER_2_ACS_BRD;
heater::Switch redSwitchNr = heater::HEATER_0_OBC_BRD; heater::Switch redSwitchNr = heater::HEATER_3_OBC_BRD;
// A side // A side
thermalComponent = ACS_BOARD; thermalComponent = ACS_BOARD;
@ -1067,7 +1067,7 @@ void ThermalController::ctrlMgt() {
sensors[2].first = sensorTemperatures.plpcduHeatspreader.isValid(); sensors[2].first = sensorTemperatures.plpcduHeatspreader.isValid();
sensors[2].second = sensorTemperatures.plpcduHeatspreader.value; sensors[2].second = sensorTemperatures.plpcduHeatspreader.value;
numSensors = 3; numSensors = 3;
HeaterContext htrCtx(heater::HEATER_2_ACS_BRD, heater::HEATER_3_PCDU_PDU, mgtLimits); HeaterContext htrCtx(heater::HEATER_2_ACS_BRD, heater::HEATER_1_PCDU_PDU, mgtLimits);
ctrlComponentTemperature(htrCtx); ctrlComponentTemperature(htrCtx);
if (componentAboveUpperLimit and not mgtTooHotFlag) { if (componentAboveUpperLimit and not mgtTooHotFlag) {
triggerEvent(tcsCtrl::MGT_OVERHEATING, tempFloatToU32()); triggerEvent(tcsCtrl::MGT_OVERHEATING, tempFloatToU32());
@ -1206,7 +1206,7 @@ void ThermalController::ctrlIfBoard() {
sensors[2].first = deviceTemperatures.mgm2SideB.isValid(); sensors[2].first = deviceTemperatures.mgm2SideB.isValid();
sensors[2].second = deviceTemperatures.mgm2SideB.value; sensors[2].second = deviceTemperatures.mgm2SideB.value;
numSensors = 3; numSensors = 3;
HeaterContext htrCtx(heater::HEATER_2_ACS_BRD, heater::HEATER_3_PCDU_PDU, ifBoardLimits); HeaterContext htrCtx(heater::HEATER_2_ACS_BRD, heater::HEATER_1_PCDU_PDU, ifBoardLimits);
ctrlComponentTemperature(htrCtx); ctrlComponentTemperature(htrCtx);
// TODO: special event overheating + could go back to safe mode // TODO: special event overheating + could go back to safe mode
} }
@ -1220,7 +1220,7 @@ void ThermalController::ctrlTcsBoard() {
sensors[2].first = sensorTemperatures.tmp1075Tcs1.isValid(); sensors[2].first = sensorTemperatures.tmp1075Tcs1.isValid();
sensors[2].second = sensorTemperatures.tmp1075Tcs1.value; sensors[2].second = sensorTemperatures.tmp1075Tcs1.value;
numSensors = 3; numSensors = 3;
HeaterContext htrCtx(heater::HEATER_0_OBC_BRD, heater::HEATER_2_ACS_BRD, tcsBoardLimits); HeaterContext htrCtx(heater::HEATER_3_OBC_BRD, heater::HEATER_2_ACS_BRD, tcsBoardLimits);
ctrlComponentTemperature(htrCtx); ctrlComponentTemperature(htrCtx);
// TODO: special event overheating + could go back to safe mode // TODO: special event overheating + could go back to safe mode
} }
@ -1234,7 +1234,7 @@ void ThermalController::ctrlObc() {
sensors[2].first = sensorTemperatures.tmp1075Tcs0.isValid(); sensors[2].first = sensorTemperatures.tmp1075Tcs0.isValid();
sensors[2].second = sensorTemperatures.tmp1075Tcs0.value; sensors[2].second = sensorTemperatures.tmp1075Tcs0.value;
numSensors = 3; numSensors = 3;
HeaterContext htrCtx(heater::HEATER_0_OBC_BRD, heater::HEATER_2_ACS_BRD, obcLimits); HeaterContext htrCtx(heater::HEATER_3_OBC_BRD, heater::HEATER_2_ACS_BRD, obcLimits);
ctrlComponentTemperature(htrCtx); ctrlComponentTemperature(htrCtx);
if (componentAboveUpperLimit and not obcTooHotFlag) { if (componentAboveUpperLimit and not obcTooHotFlag) {
triggerEvent(tcsCtrl::OBC_OVERHEATING, tempFloatToU32()); triggerEvent(tcsCtrl::OBC_OVERHEATING, tempFloatToU32());
@ -1253,7 +1253,7 @@ void ThermalController::ctrlObcIfBoard() {
sensors[2].first = sensorTemperatures.tmp1075Tcs1.isValid(); sensors[2].first = sensorTemperatures.tmp1075Tcs1.isValid();
sensors[2].second = sensorTemperatures.tmp1075Tcs1.value; sensors[2].second = sensorTemperatures.tmp1075Tcs1.value;
numSensors = 3; numSensors = 3;
HeaterContext htrCtx(heater::HEATER_0_OBC_BRD, heater::HEATER_2_ACS_BRD, obcIfBoardLimits); HeaterContext htrCtx(heater::HEATER_3_OBC_BRD, heater::HEATER_2_ACS_BRD, obcIfBoardLimits);
ctrlComponentTemperature(htrCtx); ctrlComponentTemperature(htrCtx);
if (componentAboveUpperLimit and not obcTooHotFlag) { if (componentAboveUpperLimit and not obcTooHotFlag) {
triggerEvent(tcsCtrl::OBC_OVERHEATING, tempFloatToU32()); triggerEvent(tcsCtrl::OBC_OVERHEATING, tempFloatToU32());
@ -1288,7 +1288,7 @@ void ThermalController::ctrlPcduP60Board() {
sensors[1].first = deviceTemperatures.temp2P60dock.isValid(); sensors[1].first = deviceTemperatures.temp2P60dock.isValid();
sensors[1].second = deviceTemperatures.temp2P60dock.value; sensors[1].second = deviceTemperatures.temp2P60dock.value;
numSensors = 2; numSensors = 2;
HeaterContext htrCtx(heater::HEATER_3_PCDU_PDU, heater::HEATER_2_ACS_BRD, pcduP60BoardLimits); HeaterContext htrCtx(heater::HEATER_1_PCDU_PDU, heater::HEATER_2_ACS_BRD, pcduP60BoardLimits);
ctrlComponentTemperature(htrCtx); ctrlComponentTemperature(htrCtx);
if (componentAboveUpperLimit and not pcduSystemTooHotFlag) { if (componentAboveUpperLimit and not pcduSystemTooHotFlag) {
triggerEvent(tcsCtrl::PCDU_SYSTEM_OVERHEATING, tempFloatToU32()); triggerEvent(tcsCtrl::PCDU_SYSTEM_OVERHEATING, tempFloatToU32());
@ -1300,7 +1300,7 @@ void ThermalController::ctrlPcduP60Board() {
void ThermalController::ctrlPcduAcu() { void ThermalController::ctrlPcduAcu() {
thermalComponent = PCDUACU; thermalComponent = PCDUACU;
heater::Switch switchNr = heater::HEATER_3_PCDU_PDU; heater::Switch switchNr = heater::HEATER_1_PCDU_PDU;
heater::Switch redSwitchNr = heater::HEATER_2_ACS_BRD; heater::Switch redSwitchNr = heater::HEATER_2_ACS_BRD;
if (chooseHeater(switchNr, redSwitchNr)) { if (chooseHeater(switchNr, redSwitchNr)) {
@ -1340,7 +1340,7 @@ void ThermalController::ctrlPcduPdu() {
sensors[2].first = sensorTemperatures.tmp1075Tcs0.isValid(); sensors[2].first = sensorTemperatures.tmp1075Tcs0.isValid();
sensors[2].second = sensorTemperatures.tmp1075Tcs0.value; sensors[2].second = sensorTemperatures.tmp1075Tcs0.value;
numSensors = 3; numSensors = 3;
HeaterContext htrCtx(heater::HEATER_3_PCDU_PDU, heater::HEATER_2_ACS_BRD, pcduPduLimits); HeaterContext htrCtx(heater::HEATER_1_PCDU_PDU, heater::HEATER_2_ACS_BRD, pcduPduLimits);
ctrlComponentTemperature(htrCtx); ctrlComponentTemperature(htrCtx);
if (componentAboveUpperLimit and not pcduSystemTooHotFlag) { if (componentAboveUpperLimit and not pcduSystemTooHotFlag) {
triggerEvent(tcsCtrl::PCDU_SYSTEM_OVERHEATING, tempFloatToU32()); triggerEvent(tcsCtrl::PCDU_SYSTEM_OVERHEATING, tempFloatToU32());
@ -1361,7 +1361,7 @@ void ThermalController::ctrlPlPcduBoard() {
sensors[3].first = sensorTemperatures.plpcduHeatspreader.isValid(); sensors[3].first = sensorTemperatures.plpcduHeatspreader.isValid();
sensors[3].second = sensorTemperatures.plpcduHeatspreader.value; sensors[3].second = sensorTemperatures.plpcduHeatspreader.value;
numSensors = 4; numSensors = 4;
HeaterContext htrCtx(heater::HEATER_3_PCDU_PDU, heater::HEATER_2_ACS_BRD, plPcduBoardLimits); HeaterContext htrCtx(heater::HEATER_1_PCDU_PDU, heater::HEATER_2_ACS_BRD, plPcduBoardLimits);
ctrlComponentTemperature(htrCtx); ctrlComponentTemperature(htrCtx);
tooHotHandler(objects::PLPCDU_HANDLER, eBandTooHotFlag); tooHotHandler(objects::PLPCDU_HANDLER, eBandTooHotFlag);
} }
@ -1375,7 +1375,7 @@ void ThermalController::ctrlPlocMissionBoard() {
sensors[2].first = sensorTemperatures.dacHeatspreader.isValid(); sensors[2].first = sensorTemperatures.dacHeatspreader.isValid();
sensors[2].second = sensorTemperatures.dacHeatspreader.value; sensors[2].second = sensorTemperatures.dacHeatspreader.value;
numSensors = 3; numSensors = 3;
HeaterContext htrCtx(heater::HEATER_1_PLOC_PROC_BRD, heater::HEATER_0_OBC_BRD, HeaterContext htrCtx(heater::HEATER_0_PLOC_PROC_BRD, heater::HEATER_3_OBC_BRD,
plocMissionBoardLimits); plocMissionBoardLimits);
ctrlComponentTemperature(htrCtx); ctrlComponentTemperature(htrCtx);
tooHotHandler(objects::PLOC_SUPERVISOR_HANDLER, plocTooHotFlag); tooHotHandler(objects::PLOC_SUPERVISOR_HANDLER, plocTooHotFlag);
@ -1390,7 +1390,7 @@ void ThermalController::ctrlPlocProcessingBoard() {
sensors[2].first = sensorTemperatures.dacHeatspreader.isValid(); sensors[2].first = sensorTemperatures.dacHeatspreader.isValid();
sensors[2].second = sensorTemperatures.dacHeatspreader.value; sensors[2].second = sensorTemperatures.dacHeatspreader.value;
numSensors = 3; numSensors = 3;
HeaterContext htrCtx(heater::HEATER_1_PLOC_PROC_BRD, heater::HEATER_0_OBC_BRD, HeaterContext htrCtx(heater::HEATER_0_PLOC_PROC_BRD, heater::HEATER_3_OBC_BRD,
plocProcessingBoardLimits); plocProcessingBoardLimits);
ctrlComponentTemperature(htrCtx); ctrlComponentTemperature(htrCtx);
tooHotHandler(objects::PLOC_SUPERVISOR_HANDLER, plocTooHotFlag); tooHotHandler(objects::PLOC_SUPERVISOR_HANDLER, plocTooHotFlag);
@ -1405,7 +1405,7 @@ void ThermalController::ctrlDac() {
sensors[2].first = sensorTemperatures.plocHeatspreader.isValid(); sensors[2].first = sensorTemperatures.plocHeatspreader.isValid();
sensors[2].second = sensorTemperatures.plocHeatspreader.value; sensors[2].second = sensorTemperatures.plocHeatspreader.value;
numSensors = 3; numSensors = 3;
HeaterContext htrCtx(heater::HEATER_1_PLOC_PROC_BRD, heater::HEATER_0_OBC_BRD, dacLimits); HeaterContext htrCtx(heater::HEATER_0_PLOC_PROC_BRD, heater::HEATER_3_OBC_BRD, dacLimits);
ctrlComponentTemperature(htrCtx); ctrlComponentTemperature(htrCtx);
tooHotHandler(objects::PLPCDU_HANDLER, eBandTooHotFlag); tooHotHandler(objects::PLPCDU_HANDLER, eBandTooHotFlag);
} }

View File

@ -238,7 +238,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
new Service2DeviceAccess(objects::PUS_SERVICE_2_DEVICE_ACCESS, config::EIVE_PUS_APID, new Service2DeviceAccess(objects::PUS_SERVICE_2_DEVICE_ACCESS, config::EIVE_PUS_APID,
pus::PUS_SERVICE_2, 3, 10); pus::PUS_SERVICE_2, 3, 10);
new Service3Housekeeping(objects::PUS_SERVICE_3_HOUSEKEEPING, config::EIVE_PUS_APID, new Service3Housekeeping(objects::PUS_SERVICE_3_HOUSEKEEPING, config::EIVE_PUS_APID,
pus::PUS_SERVICE_3, config::HK_SERVICE_QUEUE_DEPTH); pus::PUS_SERVICE_3, config::HK_SERVICE_QUEUE_DEPTH, 16);
new Service5EventReporting( new Service5EventReporting(
PsbParams(objects::PUS_SERVICE_5_EVENT_REPORTING, config::EIVE_PUS_APID, pus::PUS_SERVICE_5), PsbParams(objects::PUS_SERVICE_5_EVENT_REPORTING, config::EIVE_PUS_APID, pus::PUS_SERVICE_5),
80, 160); 80, 160);

View File

@ -1,4 +1,5 @@
#include <fsfw/datapool/PoolReadGuard.h> #include <fsfw/datapool/PoolReadGuard.h>
#include <fsfw/globalfunctions/arrayprinter.h>
#include <mission/power/BpxBatteryHandler.h> #include <mission/power/BpxBatteryHandler.h>
BpxBatteryHandler::BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie, BpxBatteryHandler::BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie,
@ -51,6 +52,9 @@ void BpxBatteryHandler::fillCommandAndReplyMap() {
insertInCommandAndReplyMap(bpxBat::RESET_COUNTERS, 1, nullptr, EMPTY_REPLY_LEN); insertInCommandAndReplyMap(bpxBat::RESET_COUNTERS, 1, nullptr, EMPTY_REPLY_LEN);
insertInCommandAndReplyMap(bpxBat::CONFIG_CMD, 1, nullptr, EMPTY_REPLY_LEN); insertInCommandAndReplyMap(bpxBat::CONFIG_CMD, 1, nullptr, EMPTY_REPLY_LEN);
insertInCommandAndReplyMap(bpxBat::CONFIG_GET, 1, &cfgSet, CONFIG_GET_REPLY_LEN); insertInCommandAndReplyMap(bpxBat::CONFIG_GET, 1, &cfgSet, CONFIG_GET_REPLY_LEN);
insertInCommandAndReplyMap(bpxBat::CONFIG_SET, 1, nullptr, EMPTY_REPLY_LEN);
insertInCommandAndReplyMap(bpxBat::MAN_HEAT_ON, 1, nullptr, MAN_HEAT_REPLY_LEN);
insertInCommandAndReplyMap(bpxBat::MAN_HEAT_OFF, 1, nullptr, MAN_HEAT_REPLY_LEN);
} }
ReturnValue_t BpxBatteryHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand, ReturnValue_t BpxBatteryHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
@ -155,7 +159,7 @@ ReturnValue_t BpxBatteryHandler::scanForReply(const uint8_t* start, size_t remai
case (bpxBat::PING): case (bpxBat::PING):
case (bpxBat::MAN_HEAT_ON): case (bpxBat::MAN_HEAT_ON):
case (bpxBat::MAN_HEAT_OFF): { case (bpxBat::MAN_HEAT_OFF): {
if (remainingSize != PING_REPLY_LEN) { if (remainingSize != MAN_HEAT_REPLY_LEN) {
return DeviceHandlerIF::LENGTH_MISSMATCH; return DeviceHandlerIF::LENGTH_MISSMATCH;
} }
break; break;

View File

@ -48,6 +48,7 @@ static constexpr uint32_t CFG_SET_ID = CONFIG_GET;
static constexpr size_t GET_HK_REPLY_LEN = 23; static constexpr size_t GET_HK_REPLY_LEN = 23;
static constexpr size_t PING_REPLY_LEN = 3; static constexpr size_t PING_REPLY_LEN = 3;
static constexpr size_t EMPTY_REPLY_LEN = 2; static constexpr size_t EMPTY_REPLY_LEN = 2;
static constexpr size_t MAN_HEAT_REPLY_LEN = 3;
static constexpr size_t CONFIG_GET_REPLY_LEN = 5; static constexpr size_t CONFIG_GET_REPLY_LEN = 5;
static constexpr uint8_t PORT_PING = 1; static constexpr uint8_t PORT_PING = 1;
@ -219,6 +220,7 @@ class BpxBatteryCfg : public StaticLocalDataSet<bpxBat::CFG_ENTRIES> {
if (size < 3) { if (size < 3) {
return SerializeIF::STREAM_TOO_SHORT; return SerializeIF::STREAM_TOO_SHORT;
} }
battheatermode.value = data[0]; battheatermode.value = data[0];
battheaterLow.value = data[1]; battheaterLow.value = data[1];
battheaterHigh.value = data[2]; battheaterHigh.value = data[2];

View File

@ -86,8 +86,11 @@ ReturnValue_t Tmp1075Handler::scanForReply(const uint8_t *start, size_t remainin
ReturnValue_t Tmp1075Handler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) { ReturnValue_t Tmp1075Handler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
switch (id) { switch (id) {
case TMP1075::GET_TEMP: { case TMP1075::GET_TEMP: {
int16_t tempValueRaw = 0; // Convert 12 bit MSB first raw temperature to 16 bit first.
tempValueRaw = packet[0] << 4 | packet[1] >> 4; int16_t tempValueRaw = static_cast<uint16_t>((packet[0] << 8) | packet[1]) >> 4;
// Sign extension to 16 bits: If the sign bit is set, fill up with ones on the left.
tempValueRaw = (packet[0] & 0x80) ? (tempValueRaw | 0xF000) : tempValueRaw;
// 0.0625 is the sensor sensitivity.
float tempValue = ((static_cast<float>(tempValueRaw)) * 0.0625); float tempValue = ((static_cast<float>(tempValueRaw)) * 0.0625);
#if OBSW_DEBUG_TMP1075 == 1 #if OBSW_DEBUG_TMP1075 == 1
sif::info << "Tmp1075 with object id: 0x" << std::hex << getObjectId() sif::info << "Tmp1075 with object id: 0x" << std::hex << getObjectId()

View File

@ -5,10 +5,10 @@
namespace heater { namespace heater {
enum Switch : uint8_t { enum Switch : uint8_t {
HEATER_0_OBC_BRD, HEATER_0_PLOC_PROC_BRD,
HEATER_1_PLOC_PROC_BRD, HEATER_1_PCDU_PDU,
HEATER_2_ACS_BRD, HEATER_2_ACS_BRD,
HEATER_3_PCDU_PDU, HEATER_3_OBC_BRD,
HEATER_4_CAMERA, HEATER_4_CAMERA,
HEATER_5_STR, HEATER_5_STR,
HEATER_6_DRO, HEATER_6_DRO,

View File

@ -7,7 +7,9 @@ OBSW Release Checklist
2. Re-run the generators with `generators/gen.py all` 2. Re-run the generators with `generators/gen.py all`
3. Re-run the auto-formatters with the `scripts/auto-formatter.sh` script 3. Re-run the auto-formatters with the `scripts/auto-formatter.sh` script
4. Verify that the Q7S, Q7S EM and Host build are working 4. Verify that the Q7S, Q7S EM and Host build are working
5. Wait for CI/CD results 5. Update `CHANGELOG.md`: Add new `unreleased` section, convert old unreleased section to
header containing version number and release date.
6. Wait for CI/CD results
# Post-Release # Post-Release

2
tmtc

@ -1 +1 @@
Subproject commit 522f273c99845f9c50aaf135b1c6f52676b975dd Subproject commit 29fc7a5fca197abe44d8bbba6b0db3af2744f01c