Merge pull request 'Feature: 3V3 stack power switching' (#556) from feature_3v3_stack_switching into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #556
This commit is contained in:
commit
ed8623259e
@ -21,6 +21,7 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
## Added
|
## Added
|
||||||
|
|
||||||
- Version of thermal controller which performs basic control tasks.
|
- Version of thermal controller which performs basic control tasks.
|
||||||
|
- PCDU handler can now command switch of the 3V3 stack (switch ID 19)
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
@ -34,6 +35,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
|
- EIVE system fallback and COM system fallback: Perform general subsystem handling first, then
|
||||||
event reception, and finally any new transition handling.
|
event reception, and finally any new transition handling.
|
||||||
- IMTQ MGM integration time lowered to 6 ms. This relaxes scheduling requirements a bit.
|
- 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
|
# [v1.42.0] 2023-04-01
|
||||||
|
|
||||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit 7966ede11b1eb038cbf0111f865bfbf830183c24
|
Subproject commit 9fca7581dd75d074df343802c922e48f95b677eb
|
@ -28,25 +28,35 @@ ReturnValue_t PcduHandler::performOperation(uint8_t counter) {
|
|||||||
if (counter == DeviceHandlerIF::PERFORM_OPERATION) {
|
if (counter == DeviceHandlerIF::PERFORM_OPERATION) {
|
||||||
readCommandQueue();
|
readCommandQueue();
|
||||||
}
|
}
|
||||||
uint8_t switchState = 0;
|
uint8_t switchState5V = 0;
|
||||||
|
uint8_t switchState3V3 = 0;
|
||||||
{
|
{
|
||||||
PoolReadGuard pg(&p60CoreHk.outputEnables);
|
PoolReadGuard pg(&p60CoreHk.outputEnables);
|
||||||
if (pg.getReadResult() == returnvalue::OK) {
|
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 {
|
} else {
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
PoolReadGuard pg(&switcherSet.p60Dock5VStack);
|
PoolReadGuard pg(&switcherSet);
|
||||||
if (pg.getReadResult() == returnvalue::OK) {
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
if (switcherSet.p60Dock5VStack.value != switchState) {
|
if (switcherSet.p60Dock5VStack.value != switchState5V) {
|
||||||
triggerEvent(power::SWITCH_HAS_CHANGED, switchState, power::Switches::P60_DOCK_5V_STACK);
|
triggerEvent(power::SWITCH_HAS_CHANGED, switchState5V, power::Switches::P60_DOCK_5V_STACK);
|
||||||
MutexGuard mg(pwrLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
|
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.setValid(true);
|
||||||
switcherSet.p60Dock5VStack.value = switchState;
|
switcherSet.p60Dock5VStack.value = switchState5V;
|
||||||
|
switcherSet.p60Dock3V3Stack.setValid(true);
|
||||||
|
switcherSet.p60Dock3V3Stack.value = switchState3V3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return returnvalue::OK;
|
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);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::P60DOCK_HANDLER);
|
||||||
break;
|
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: {
|
default: {
|
||||||
sif::error << "PCDUHandler::sendSwitchCommand: Invalid switch number " << std::endl;
|
sif::error << "PCDUHandler::sendSwitchCommand: Invalid switch number " << std::endl;
|
||||||
@ -430,7 +445,8 @@ ReturnValue_t PcduHandler::initializeLocalDataPool(localpool::DataPool& localDat
|
|||||||
using namespace pcdu;
|
using namespace pcdu;
|
||||||
localDataPoolMap.emplace(PoolIds::PDU1_SWITCHES, &pdu1Switches);
|
localDataPoolMap.emplace(PoolIds::PDU1_SWITCHES, &pdu1Switches);
|
||||||
localDataPoolMap.emplace(PoolIds::PDU2_SWITCHES, &pdu2Switches);
|
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(
|
poolManager.subscribeForDiagPeriodicPacket(
|
||||||
subdp::DiagnosticsHkPeriodicParams(switcherSet.getSid(), false, 5.0));
|
subdp::DiagnosticsHkPeriodicParams(switcherSet.getSid(), false, 5.0));
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
|
@ -80,6 +80,7 @@ class PcduHandler : public PowerSwitchIF,
|
|||||||
PoolEntry<uint8_t> pdu2Switches =
|
PoolEntry<uint8_t> pdu2Switches =
|
||||||
PoolEntry<uint8_t>(pcdu::INIT_SWITCHES_PDU2.data(), pcdu::INIT_SWITCHES_PDU2.size());
|
PoolEntry<uint8_t>(pcdu::INIT_SWITCHES_PDU2.data(), pcdu::INIT_SWITCHES_PDU2.size());
|
||||||
PoolEntry<uint8_t> p60Dock5VSwitch = PoolEntry<uint8_t>();
|
PoolEntry<uint8_t> p60Dock5VSwitch = PoolEntry<uint8_t>();
|
||||||
|
PoolEntry<uint8_t> p60Dock3V3Switch = PoolEntry<uint8_t>();
|
||||||
|
|
||||||
/** The timeStamp of the current pdu2HkTableDataset */
|
/** The timeStamp of the current pdu2HkTableDataset */
|
||||||
CCSDSTime::CDS_short timeStampPdu2HkDataset;
|
CCSDSTime::CDS_short timeStampPdu2HkDataset;
|
||||||
|
@ -32,6 +32,7 @@ enum Switches : power::Switch_t {
|
|||||||
PDU2_CH8_PAYLOAD_CAMERA,
|
PDU2_CH8_PAYLOAD_CAMERA,
|
||||||
|
|
||||||
P60_DOCK_5V_STACK,
|
P60_DOCK_5V_STACK,
|
||||||
|
P60_DOCK_3V3_STACK,
|
||||||
NUMBER_OF_SWITCHES
|
NUMBER_OF_SWITCHES
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -109,6 +109,7 @@ enum class SetIds : uint32_t { CORE = 1, AUX = 2, CONFIG = 3 };
|
|||||||
|
|
||||||
namespace P60Dock {
|
namespace P60Dock {
|
||||||
|
|
||||||
|
static const uint16_t CONFIG_ADDRESS_OUT_EN_3V3_STACK = 0x71;
|
||||||
static const uint16_t CONFIG_ADDRESS_OUT_EN_5V_STACK = 0x72;
|
static const uint16_t CONFIG_ADDRESS_OUT_EN_5V_STACK = 0x72;
|
||||||
|
|
||||||
namespace pool {
|
namespace pool {
|
||||||
@ -714,7 +715,7 @@ class AuxHk : public StaticLocalDataSet<12> {
|
|||||||
|
|
||||||
namespace pcdu {
|
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 ON = 1;
|
||||||
static const uint8_t OFF = 0;
|
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>(sid.objectId, PDU1_SWITCHES, this);
|
||||||
lp_vec_t<uint8_t, PDU::CHANNELS_LEN> pdu2Switches =
|
lp_vec_t<uint8_t, PDU::CHANNELS_LEN> pdu2Switches =
|
||||||
lp_vec_t<uint8_t, PDU::CHANNELS_LEN>(sid.objectId, PDU2_SWITCHES, this);
|
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
|
} // namespace pcdu
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit 5f87092465b3d298b9f66410d333e8069e78df95
|
Subproject commit de1188c1bbc890d9b1e3a43cb0c3f06d34e07639
|
Loading…
Reference in New Issue
Block a user