5V stack commanding for device handlers #335
@ -54,6 +54,7 @@
|
|||||||
#include "linux/boardtest/LibgpiodTest.h"
|
#include "linux/boardtest/LibgpiodTest.h"
|
||||||
#endif
|
#endif
|
||||||
#include <mission/devices/ImtqHandler.h>
|
#include <mission/devices/ImtqHandler.h>
|
||||||
|
#include <mission/devices/PcduHandler.h>
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
@ -80,7 +81,6 @@
|
|||||||
#include "mission/devices/HeaterHandler.h"
|
#include "mission/devices/HeaterHandler.h"
|
||||||
#include "mission/devices/Max31865PT1000Handler.h"
|
#include "mission/devices/Max31865PT1000Handler.h"
|
||||||
#include "mission/devices/P60DockHandler.h"
|
#include "mission/devices/P60DockHandler.h"
|
||||||
#include "mission/devices/PCDUHandler.h"
|
|
||||||
#include "mission/devices/PDU1Handler.h"
|
#include "mission/devices/PDU1Handler.h"
|
||||||
#include "mission/devices/PDU2Handler.h"
|
#include "mission/devices/PDU2Handler.h"
|
||||||
#include "mission/devices/PayloadPcduHandler.h"
|
#include "mission/devices/PayloadPcduHandler.h"
|
||||||
|
@ -3,7 +3,7 @@ target_sources(
|
|||||||
PRIVATE GomspaceDeviceHandler.cpp
|
PRIVATE GomspaceDeviceHandler.cpp
|
||||||
BpxBatteryHandler.cpp
|
BpxBatteryHandler.cpp
|
||||||
Tmp1075Handler.cpp
|
Tmp1075Handler.cpp
|
||||||
PCDUHandler.cpp
|
PcduHandler.cpp
|
||||||
P60DockHandler.cpp
|
P60DockHandler.cpp
|
||||||
PDU1Handler.cpp
|
PDU1Handler.cpp
|
||||||
PDU2Handler.cpp
|
PDU2Handler.cpp
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
#include "PCDUHandler.h"
|
|
||||||
|
|
||||||
#include <OBSWConfig.h>
|
#include <OBSWConfig.h>
|
||||||
#include <devices/powerSwitcherList.h>
|
#include <devices/powerSwitcherList.h>
|
||||||
#include <fsfw/datapool/PoolReadGuard.h>
|
#include <fsfw/datapool/PoolReadGuard.h>
|
||||||
#include <fsfw/housekeeping/HousekeepingSnapshot.h>
|
#include <fsfw/housekeeping/HousekeepingSnapshot.h>
|
||||||
#include <fsfw/ipc/MutexFactory.h>
|
#include <fsfw/ipc/MutexFactory.h>
|
||||||
#include <fsfw/ipc/QueueFactory.h>
|
#include <fsfw/ipc/QueueFactory.h>
|
||||||
|
#include <mission/devices/PcduHandler.h>
|
||||||
#include <mission/devices/devicedefinitions/GomSpacePackets.h>
|
#include <mission/devices/devicedefinitions/GomSpacePackets.h>
|
||||||
|
|
||||||
PCDUHandler::PCDUHandler(object_id_t setObjectId, size_t cmdQueueSize)
|
PCDUHandler::PCDUHandler(object_id_t setObjectId, size_t cmdQueueSize)
|
||||||
@ -104,8 +103,10 @@ void PCDUHandler::initializeSwitchStates() {
|
|||||||
for (uint8_t idx = 0; idx < NUMBER_OF_SWITCHES; idx++) {
|
for (uint8_t idx = 0; idx < NUMBER_OF_SWITCHES; idx++) {
|
||||||
if (idx < PDU::CHANNELS_LEN) {
|
if (idx < PDU::CHANNELS_LEN) {
|
||||||
switchStates[idx] = INIT_SWITCHES_PDU1.at(idx);
|
switchStates[idx] = INIT_SWITCHES_PDU1.at(idx);
|
||||||
} else {
|
} else if (idx < PDU::CHANNELS_LEN * 2) {
|
||||||
switchStates[idx] = INIT_SWITCHES_PDU2.at(idx - PDU::CHANNELS_LEN);
|
switchStates[idx] = INIT_SWITCHES_PDU2.at(idx - PDU::CHANNELS_LEN);
|
||||||
|
} else {
|
||||||
|
switchStates[idx] = OFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (const std::out_of_range& err) {
|
} catch (const std::out_of_range& err) {
|
@ -737,11 +737,10 @@ enum Switches : power::Switch_t {
|
|||||||
PDU2_CH7_ACS_BOARD_SIDE_B_3V3,
|
PDU2_CH7_ACS_BOARD_SIDE_B_3V3,
|
||||||
PDU2_CH8_PAYLOAD_CAMERA,
|
PDU2_CH8_PAYLOAD_CAMERA,
|
||||||
|
|
||||||
P60_DOCK_5V_STACK
|
P60_DOCK_5V_STACK,
|
||||||
|
NUMBER_OF_SWITCHES
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr uint8_t NUMBER_OF_SWITCHES = 18;
|
|
||||||
|
|
||||||
static const uint8_t ON = 1;
|
static const uint8_t ON = 1;
|
||||||
static const uint8_t OFF = 0;
|
static const uint8_t OFF = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user