Merge remote-tracking branch 'origin/develop' into mueller/plpcdu-sus-updates

This commit is contained in:
Robin Müller 2022-02-25 11:16:04 +01:00
commit 07da61d8c5
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
8 changed files with 36 additions and 56 deletions

View File

@ -11,7 +11,6 @@ target_link_libraries(${SIMPLE_OBSW_NAME} PUBLIC
target_compile_definitions(${SIMPLE_OBSW_NAME} PRIVATE "Q7S_SIMPLE_MODE") target_compile_definitions(${SIMPLE_OBSW_NAME} PRIVATE "Q7S_SIMPLE_MODE")
add_subdirectory(simple) add_subdirectory(simple)
target_sources(${OBSW_NAME} PUBLIC target_sources(${OBSW_NAME} PUBLIC
main.cpp main.cpp
) )

View File

@ -1,9 +1,10 @@
#include "ObjectFactory.h" #include "ObjectFactory.h"
#include <linux/boardtest/I2cTestClass.h> #include <linux/obc/AxiPtmeConfig.h>
#include <linux/boardtest/UartTestClass.h> #include <linux/obc/PapbVcInterface.h>
#include <linux/obc/PdecHandler.h>
#include <sstream> #include <linux/obc/Ptme.h>
#include <linux/obc/PtmeConfig.h>
#include "OBSWConfig.h" #include "OBSWConfig.h"
#include "bsp_q7s/boardtest/Q7STestTask.h" #include "bsp_q7s/boardtest/Q7STestTask.h"
@ -25,6 +26,20 @@
#include "devices/addresses.h" #include "devices/addresses.h"
#include "devices/gpioIds.h" #include "devices/gpioIds.h"
#include "devices/powerSwitcherList.h" #include "devices/powerSwitcherList.h"
#include "linux/boardtest/I2cTestClass.h"
#include "linux/boardtest/SpiTestClass.h"
#include "linux/boardtest/UartTestClass.h"
#include "linux/csp/CspComIF.h"
#include "linux/csp/CspCookie.h"
#include "linux/devices/SolarArrayDeploymentHandler.h"
#include "tmtc/apid.h"
#include "tmtc/pusIds.h"
#if OBSW_TEST_LIBGPIOD == 1
#include "linux/boardtest/LibgpiodTest.h"
#endif
#include <sstream>
#include "fsfw/datapoollocal/LocalDataPoolManager.h" #include "fsfw/datapoollocal/LocalDataPoolManager.h"
#include "fsfw/tmtcpacket/pus/tm.h" #include "fsfw/tmtcpacket/pus/tm.h"
#include "fsfw/tmtcservices/CommandingServiceBase.h" #include "fsfw/tmtcservices/CommandingServiceBase.h"
@ -40,16 +55,10 @@
#include "fsfw_hal/linux/spi/SpiCookie.h" #include "fsfw_hal/linux/spi/SpiCookie.h"
#include "fsfw_hal/linux/uart/UartComIF.h" #include "fsfw_hal/linux/uart/UartComIF.h"
#include "fsfw_hal/linux/uart/UartCookie.h" #include "fsfw_hal/linux/uart/UartCookie.h"
#include "linux/boardtest/SpiTestClass.h" #include "linux/devices/GPSHyperionLinuxController.h"
#include "linux/csp/CspComIF.h"
#include "linux/csp/CspCookie.h"
#include "mission/devices/SolarArrayDeploymentHandler.h"
#include "mission/devices/SusHandler.h"
#include "mission/devices/devicedefinitions/SusDefinitions.h"
#include "mission/core/GenericFactory.h" #include "mission/core/GenericFactory.h"
#include "mission/devices/ACUHandler.h" #include "mission/devices/ACUHandler.h"
#include "mission/devices/BpxBatteryHandler.h" #include "mission/devices/BpxBatteryHandler.h"
#include "linux/devices/GPSHyperionLinuxController.h"
#include "mission/devices/GyroADIS1650XHandler.h" #include "mission/devices/GyroADIS1650XHandler.h"
#include "mission/devices/HeaterHandler.h" #include "mission/devices/HeaterHandler.h"
#include "mission/devices/IMTQHandler.h" #include "mission/devices/IMTQHandler.h"
@ -62,7 +71,6 @@
#include "mission/devices/PlocMPSoCHandler.h" #include "mission/devices/PlocMPSoCHandler.h"
#include "mission/devices/RadiationSensorHandler.h" #include "mission/devices/RadiationSensorHandler.h"
#include "mission/devices/RwHandler.h" #include "mission/devices/RwHandler.h"
#include "mission/devices/SolarArrayDeploymentHandler.h"
#include "mission/devices/SusHandler.h" #include "mission/devices/SusHandler.h"
#include "mission/devices/SyrlinksHkHandler.h" #include "mission/devices/SyrlinksHkHandler.h"
#include "mission/devices/Tmp1075Handler.h" #include "mission/devices/Tmp1075Handler.h"
@ -77,18 +85,6 @@
#include "mission/tmtc/CCSDSHandler.h" #include "mission/tmtc/CCSDSHandler.h"
#include "mission/tmtc/VirtualChannel.h" #include "mission/tmtc/VirtualChannel.h"
#include "mission/utility/TmFunnel.h" #include "mission/utility/TmFunnel.h"
#include "tmtc/apid.h"
#include "tmtc/pusIds.h"
#if OBSW_TEST_LIBGPIOD == 1
#include "linux/boardtest/LibgpiodTest.h"
#endif
#include <linux/obc/AxiPtmeConfig.h>
#include <linux/obc/PapbVcInterface.h>
#include <linux/obc/PdecHandler.h>
#include <linux/obc/Ptme.h>
#include <linux/obc/PtmeConfig.h>
ResetArgs resetArgsGnss0; ResetArgs resetArgsGnss0;
ResetArgs resetArgsGnss1; ResetArgs resetArgsGnss1;
@ -361,38 +357,32 @@ void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF* gpioComIF, SpiComI
SpiCookie* spiCookie = SpiCookie* spiCookie =
new SpiCookie(addresses::SUS_0, gpioIds::CS_SUS_0, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE, new SpiCookie(addresses::SUS_0, gpioIds::CS_SUS_0, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ); spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
SusHandler* susHandler0 = new SusHandler(objects::SUS_0, 0, objects::SPI_COM_IF, spiCookie, SusHandler* susHandler0 = new SusHandler(objects::SUS_0, 0, objects::SPI_COM_IF, spiCookie);
gpioComIF, gpioIds::CS_SUS_0);
spiCookie = spiCookie =
new SpiCookie(addresses::SUS_1, gpioIds::CS_SUS_1, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE, new SpiCookie(addresses::SUS_1, gpioIds::CS_SUS_1, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ); spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
SusHandler* susHandler1 = new SusHandler(objects::SUS_1, 1, objects::SPI_COM_IF, spiCookie, SusHandler* susHandler1 = new SusHandler(objects::SUS_1, 1, objects::SPI_COM_IF, spiCookie);
gpioComIF, gpioIds::CS_SUS_1);
spiCookie = spiCookie =
new SpiCookie(addresses::SUS_2, gpioIds::CS_SUS_2, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE, new SpiCookie(addresses::SUS_2, gpioIds::CS_SUS_2, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ); spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
SusHandler* susHandler2 = new SusHandler(objects::SUS_2, 2, objects::SPI_COM_IF, spiCookie, SusHandler* susHandler2 = new SusHandler(objects::SUS_2, 2, objects::SPI_COM_IF, spiCookie);
gpioComIF, gpioIds::CS_SUS_2);
spiCookie = spiCookie =
new SpiCookie(addresses::SUS_3, gpioIds::CS_SUS_3, std::string(q7s::SPI_DEFAULT_DEV), new SpiCookie(addresses::SUS_3, gpioIds::CS_SUS_3, std::string(q7s::SPI_DEFAULT_DEV),
SUS::MAX_CMD_SIZE, spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ); SUS::MAX_CMD_SIZE, spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
SusHandler* susHandler3 = new SusHandler(objects::SUS_3, 3, objects::SPI_COM_IF, spiCookie, SusHandler* susHandler3 = new SusHandler(objects::SUS_3, 3, objects::SPI_COM_IF, spiCookie);
gpioComIF, gpioIds::CS_SUS_3);
spiCookie = spiCookie =
new SpiCookie(addresses::SUS_4, gpioIds::CS_SUS_4, std::string(q7s::SPI_DEFAULT_DEV), new SpiCookie(addresses::SUS_4, gpioIds::CS_SUS_4, std::string(q7s::SPI_DEFAULT_DEV),
SUS::MAX_CMD_SIZE, spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ); SUS::MAX_CMD_SIZE, spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
SusHandler* susHandler4 = new SusHandler(objects::SUS_4, 4, objects::SPI_COM_IF, spiCookie, SusHandler* susHandler4 = new SusHandler(objects::SUS_4, 4, objects::SPI_COM_IF, spiCookie);
gpioComIF, gpioIds::CS_SUS_4);
spiCookie = spiCookie =
new SpiCookie(addresses::SUS_5, gpioIds::CS_SUS_5, std::string(q7s::SPI_DEFAULT_DEV), new SpiCookie(addresses::SUS_5, gpioIds::CS_SUS_5, std::string(q7s::SPI_DEFAULT_DEV),
SUS::MAX_CMD_SIZE, spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ); SUS::MAX_CMD_SIZE, spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
SusHandler* susHandler5 = new SusHandler(objects::SUS_5, 5, objects::SPI_COM_IF, spiCookie, SusHandler* susHandler5 = new SusHandler(objects::SUS_5, 5, objects::SPI_COM_IF, spiCookie);
gpioComIF, gpioIds::CS_SUS_5);
spiCookie = spiCookie =
new SpiCookie(addresses::SUS_6, gpioIds::CS_SUS_6, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE, new SpiCookie(addresses::SUS_6, gpioIds::CS_SUS_6, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
@ -403,32 +393,27 @@ void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF* gpioComIF, SpiComI
spiCookie = spiCookie =
new SpiCookie(addresses::SUS_7, gpioIds::CS_SUS_7, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE, new SpiCookie(addresses::SUS_7, gpioIds::CS_SUS_7, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ); spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
SusHandler* susHandler7 = new SusHandler(objects::SUS_7, 7, objects::SPI_COM_IF, spiCookie, SusHandler* susHandler7 = new SusHandler(objects::SUS_7, 7, objects::SPI_COM_IF, spiCookie);
gpioComIF, gpioIds::CS_SUS_7);
spiCookie = spiCookie =
new SpiCookie(addresses::SUS_8, gpioIds::CS_SUS_8, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE, new SpiCookie(addresses::SUS_8, gpioIds::CS_SUS_8, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ); spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
SusHandler* susHandler8 = new SusHandler(objects::SUS_8, 8, objects::SPI_COM_IF, spiCookie, SusHandler* susHandler8 = new SusHandler(objects::SUS_8, 8, objects::SPI_COM_IF, spiCookie);
gpioComIF, gpioIds::CS_SUS_8);
spiCookie = spiCookie =
new SpiCookie(addresses::SUS_9, gpioIds::CS_SUS_9, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE, new SpiCookie(addresses::SUS_9, gpioIds::CS_SUS_9, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ); spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
SusHandler* susHandler9 = new SusHandler(objects::SUS_9, 9, objects::SPI_COM_IF, spiCookie, SusHandler* susHandler9 = new SusHandler(objects::SUS_9, 9, objects::SPI_COM_IF, spiCookie);
gpioComIF, gpioIds::CS_SUS_9);
spiCookie = spiCookie =
new SpiCookie(addresses::SUS_10, gpioIds::CS_SUS_10, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE, new SpiCookie(addresses::SUS_10, gpioIds::CS_SUS_10, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ); spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
SusHandler* susHandler10 = new SusHandler(objects::SUS_10, 10, objects::SPI_COM_IF, spiCookie, SusHandler* susHandler10 = new SusHandler(objects::SUS_10, 10, objects::SPI_COM_IF, spiCookie);
gpioComIF, gpioIds::CS_SUS_10);
spiCookie = spiCookie =
new SpiCookie(addresses::SUS_11, gpioIds::CS_SUS_11, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE, new SpiCookie(addresses::SUS_11, gpioIds::CS_SUS_11, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ); spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
SusHandler* susHandler11 = new SusHandler(objects::SUS_11, 11, objects::SPI_COM_IF, spiCookie, SusHandler* susHandler11 = new SusHandler(objects::SUS_11, 11, objects::SPI_COM_IF, spiCookie);
gpioComIF, gpioIds::CS_SUS_11);
static_cast<void>(susHandler0); static_cast<void>(susHandler0);
static_cast<void>(susHandler1); static_cast<void>(susHandler1);
static_cast<void>(susHandler2); static_cast<void>(susHandler2);

View File

@ -1,3 +0,0 @@
target_sources(${OBSW_NAME} PRIVATE
gpioCallbacks.cpp
)

View File

@ -11,6 +11,7 @@ enum commonObjects: uint32_t {
TMTC_BRIDGE = 0x50000300, TMTC_BRIDGE = 0x50000300,
TMTC_POLLING_TASK = 0x50000400, TMTC_POLLING_TASK = 0x50000400,
FILE_SYSTEM_HANDLER = 0x50000500, FILE_SYSTEM_HANDLER = 0x50000500,
SDC_MANAGER = 0x50000550,
PTME = 0x50000600, PTME = 0x50000600,
PDEC_HANDLER = 0x50000700, PDEC_HANDLER = 0x50000700,
CCSDS_HANDLER = 0x50000800, CCSDS_HANDLER = 0x50000800,

View File

@ -2,7 +2,6 @@
#define MISSION_DEVICES_GPSHYPERIONHANDLER_H_ #define MISSION_DEVICES_GPSHYPERIONHANDLER_H_
#include "fsfw/FSFW.h" #include "fsfw/FSFW.h"
#include "mission/devices/devicedefinitions/GPSDefinitions.h"
#include "fsfw/controller/ExtendedControllerBase.h" #include "fsfw/controller/ExtendedControllerBase.h"
#include "fsfw/devicehandlers/DeviceHandlerBase.h" #include "fsfw/devicehandlers/DeviceHandlerBase.h"
#include "mission/devices/devicedefinitions/GPSDefinitions.h" #include "mission/devices/devicedefinitions/GPSDefinitions.h"

View File

@ -1,6 +1,4 @@
#include "pollingSequenceFactory.h" #include "pollingSequenceFactory.h"
#include "OBSWConfig.h"
#include "objects/systemObjectList.h"
#include <fsfw/devicehandlers/DeviceHandlerIF.h> #include <fsfw/devicehandlers/DeviceHandlerIF.h>
#include <fsfw/objectmanager/ObjectManagerIF.h> #include <fsfw/objectmanager/ObjectManagerIF.h>

View File

@ -32,7 +32,8 @@ class SpiCookie;
class PayloadPcduHandler : public DeviceHandlerBase { class PayloadPcduHandler : public DeviceHandlerBase {
public: public:
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PL_PCDU_HANDLER; static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PL_PCDU_HANDLER;
static constexpr Event TRANSITION_BACK_TO_OFF = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM); static constexpr Event TRANSITION_BACK_TO_OFF =
event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
PayloadPcduHandler(object_id_t objectId, object_id_t comIF, CookieIF* cookie, GpioIF* gpioIF, PayloadPcduHandler(object_id_t objectId, object_id_t comIF, CookieIF* cookie, GpioIF* gpioIF,
bool periodicPrintout); bool periodicPrintout);
@ -49,7 +50,7 @@ class PayloadPcduHandler : public DeviceHandlerBase {
#endif #endif
private: private:
enum class States: uint8_t { enum class States : uint8_t {
PCDU_OFF, PCDU_OFF,
// Solid State Relay, enable battery voltages VBAT0 and VBAT1. This will also switch on // Solid State Relay, enable battery voltages VBAT0 and VBAT1. This will also switch on
// the ADC // the ADC

View File

@ -12,7 +12,7 @@ namespace plpcdu {
using namespace max1227; using namespace max1227;
enum PlPcduAdcChannels: uint8_t { enum PlPcduAdcChannels : uint8_t {
U_BAT_DIV_6 = 0, U_BAT_DIV_6 = 0,
// According to schematic, will be 2.2158V for Vneg = +0V and 0.2446V for Vneg = -6V // According to schematic, will be 2.2158V for Vneg = +0V and 0.2446V for Vneg = -6V
// Full Forumula: V_neg = V_post - (R1 + R2) / R1 * (V_pos - V_out) with R1 being 27.4k // Full Forumula: V_neg = V_post - (R1 + R2) / R1 * (V_pos - V_out) with R1 being 27.4k