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

This commit is contained in:
Robin Müller 2023-04-04 11:22:07 +02:00
commit 83e0627548
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
5 changed files with 36 additions and 10 deletions

View File

@ -21,11 +21,16 @@ will consitute of a breaking change warranting a new major release:
## Added
- Version of thermal controller which performs basic control tasks.
- PCDU handler can now command switch of the 3V3 stack (switch ID 19)
- Set STR dev to OFF in assembly when it is faulty.
- STR: Reset data link layer and flush RX for regular commands and before performing special
commands to ensure consistent start state
## Fixed
- PTME was not reset after configuration changes.
- GPS health devices: ACS board assembly not reacts to health changes.
- STR COM helper: Reset reply size after returning a reply
## Changed
@ -34,6 +39,7 @@ will consitute of a breaking change warranting a new major release:
- EIVE system fallback and COM system fallback: Perform general subsystem handling first, then
event reception, and finally any new transition handling.
- IMTQ MGM integration time lowered to 6 ms. This relaxes scheduling requirements a bit.
- PCDU handler switcher HK set now has additional 3V3 switcher state HK.
# [v1.42.0] 2023-04-01

View File

@ -28,25 +28,35 @@ ReturnValue_t PcduHandler::performOperation(uint8_t counter) {
if (counter == DeviceHandlerIF::PERFORM_OPERATION) {
readCommandQueue();
}
uint8_t switchState = 0;
uint8_t switchState5V = 0;
uint8_t switchState3V3 = 0;
{
PoolReadGuard pg(&p60CoreHk.outputEnables);
if (pg.getReadResult() == returnvalue::OK) {
switchState = p60CoreHk.outputEnables.value[10];
switchState5V = p60CoreHk.outputEnables.value[P60Dock::hk::STACK_5V];
switchState3V3 = p60CoreHk.outputEnables.value[P60Dock::hk::STACK_3V3];
} else {
return returnvalue::OK;
}
}
{
PoolReadGuard pg(&switcherSet.p60Dock5VStack);
PoolReadGuard pg(&switcherSet);
if (pg.getReadResult() == returnvalue::OK) {
if (switcherSet.p60Dock5VStack.value != switchState) {
triggerEvent(power::SWITCH_HAS_CHANGED, switchState, power::Switches::P60_DOCK_5V_STACK);
if (switcherSet.p60Dock5VStack.value != switchState5V) {
triggerEvent(power::SWITCH_HAS_CHANGED, switchState5V, power::Switches::P60_DOCK_5V_STACK);
MutexGuard mg(pwrLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
switchStates[power::P60_DOCK_5V_STACK] = switchState;
switchStates[power::P60_DOCK_5V_STACK] = switchState5V;
}
if (switcherSet.p60Dock3V3Stack.value != switchState3V3) {
triggerEvent(power::SWITCH_HAS_CHANGED, switchState3V3,
power::Switches::P60_DOCK_3V3_STACK);
MutexGuard mg(pwrLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
switchStates[power::P60_DOCK_3V3_STACK] = switchState3V3;
}
switcherSet.p60Dock5VStack.setValid(true);
switcherSet.p60Dock5VStack.value = switchState;
switcherSet.p60Dock5VStack.value = switchState5V;
switcherSet.p60Dock3V3Stack.setValid(true);
switcherSet.p60Dock3V3Stack.value = switchState3V3;
}
}
return returnvalue::OK;
@ -353,6 +363,11 @@ ReturnValue_t PcduHandler::sendSwitchCommand(uint8_t switchNr, ReturnValue_t onO
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::P60DOCK_HANDLER);
break;
}
case power::P60_DOCK_3V3_STACK: {
memoryAddress = P60Dock::CONFIG_ADDRESS_OUT_EN_3V3_STACK;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::P60DOCK_HANDLER);
break;
}
default: {
sif::error << "PCDUHandler::sendSwitchCommand: Invalid switch number " << std::endl;
@ -430,7 +445,8 @@ ReturnValue_t PcduHandler::initializeLocalDataPool(localpool::DataPool& localDat
using namespace pcdu;
localDataPoolMap.emplace(PoolIds::PDU1_SWITCHES, &pdu1Switches);
localDataPoolMap.emplace(PoolIds::PDU2_SWITCHES, &pdu2Switches);
localDataPoolMap.emplace(PoolIds::P60DOCK_SWITCHES, &p60Dock5VSwitch);
localDataPoolMap.emplace(PoolIds::P60DOCK_5V, &p60Dock5VSwitch);
localDataPoolMap.emplace(PoolIds::P60DOCK_3V3, &p60Dock3V3Switch);
poolManager.subscribeForDiagPeriodicPacket(
subdp::DiagnosticsHkPeriodicParams(switcherSet.getSid(), false, 5.0));
return returnvalue::OK;

View File

@ -80,6 +80,7 @@ class PcduHandler : public PowerSwitchIF,
PoolEntry<uint8_t> pdu2Switches =
PoolEntry<uint8_t>(pcdu::INIT_SWITCHES_PDU2.data(), pcdu::INIT_SWITCHES_PDU2.size());
PoolEntry<uint8_t> p60Dock5VSwitch = PoolEntry<uint8_t>();
PoolEntry<uint8_t> p60Dock3V3Switch = PoolEntry<uint8_t>();
/** The timeStamp of the current pdu2HkTableDataset */
CCSDSTime::CDS_short timeStampPdu2HkDataset;

View File

@ -32,6 +32,7 @@ enum Switches : power::Switch_t {
PDU2_CH8_PAYLOAD_CAMERA,
P60_DOCK_5V_STACK,
P60_DOCK_3V3_STACK,
NUMBER_OF_SWITCHES
};

View File

@ -109,6 +109,7 @@ enum class SetIds : uint32_t { CORE = 1, AUX = 2, CONFIG = 3 };
namespace P60Dock {
static const uint16_t CONFIG_ADDRESS_OUT_EN_3V3_STACK = 0x71;
static const uint16_t CONFIG_ADDRESS_OUT_EN_5V_STACK = 0x72;
namespace pool {
@ -714,7 +715,7 @@ class AuxHk : public StaticLocalDataSet<12> {
namespace pcdu {
enum PoolIds : uint32_t { PDU1_SWITCHES, PDU2_SWITCHES, P60DOCK_SWITCHES };
enum PoolIds : uint32_t { PDU1_SWITCHES, PDU2_SWITCHES, P60DOCK_5V, P60DOCK_3V3 };
static const uint8_t ON = 1;
static const uint8_t OFF = 0;
@ -745,7 +746,8 @@ class SwitcherStates : public StaticLocalDataSet<power::NUMBER_OF_SWITCHES> {
lp_vec_t<uint8_t, PDU::CHANNELS_LEN>(sid.objectId, PDU1_SWITCHES, this);
lp_vec_t<uint8_t, PDU::CHANNELS_LEN> pdu2Switches =
lp_vec_t<uint8_t, PDU::CHANNELS_LEN>(sid.objectId, PDU2_SWITCHES, this);
lp_var_t<uint8_t> p60Dock5VStack = lp_var_t<uint8_t>(sid.objectId, P60DOCK_SWITCHES, this);
lp_var_t<uint8_t> p60Dock5VStack = lp_var_t<uint8_t>(sid.objectId, P60DOCK_5V, this);
lp_var_t<uint8_t> p60Dock3V3Stack = lp_var_t<uint8_t>(sid.objectId, P60DOCK_3V3, this);
};
} // namespace pcdu