Merge remote-tracking branch 'origin/mueller/pcdu-switch-callback' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
2022-01-19 18:42:54 +01:00
17 changed files with 241 additions and 43 deletions

View File

@ -5,6 +5,7 @@
#include "OBSWConfig.h"
#include "bsp_q7s/boardtest/Q7STestTask.h"
#include "bsp_q7s/callbacks/gnssCallback.h"
#include "bsp_q7s/callbacks/pcduSwitchCb.h"
#include "bsp_q7s/callbacks/rwSpiCallback.h"
#include "bsp_q7s/core/CoreController.h"
#include "bsp_q7s/devices/PlocMemoryDumper.h"
@ -122,13 +123,14 @@ void ObjectFactory::produce(void* args) {
#if BOARD_TE0720 == 0
new CoreController(objects::CORE_CONTROLLER);
createPcduComponents();
createPcduComponents(gpioComIF);
createRadSensorComponent(gpioComIF);
createSunSensorComponents(gpioComIF, spiComIF);
#if OBSW_ADD_ACS_BOARD == 1
createAcsBoardComponents(gpioComIF, uartComIF);
#endif /* OBSW_ADD_ACS_BOARD == 1 */
#endif
createHeaterComponents();
createSolarArrayDeploymentComponents();
#if OBSW_ADD_SYRLINKS == 1
@ -234,7 +236,7 @@ void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, Ua
#endif
}
void ObjectFactory::createPcduComponents() {
void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF) {
CspCookie* p60DockCspCookie = new CspCookie(P60Dock::MAX_REPLY_LENGTH, addresses::P60DOCK);
CspCookie* pdu1CspCookie = new CspCookie(PDU::MAX_REPLY_LENGTH, addresses::PDU1);
CspCookie* pdu2CspCookie = new CspCookie(PDU::MAX_REPLY_LENGTH, addresses::PDU2);
@ -244,8 +246,10 @@ void ObjectFactory::createPcduComponents() {
new P60DockHandler(objects::P60DOCK_HANDLER, objects::CSP_COM_IF, p60DockCspCookie);
PDU1Handler* pdu1handler =
new PDU1Handler(objects::PDU1_HANDLER, objects::CSP_COM_IF, pdu1CspCookie);
pdu1handler->assignChannelHookFunction(&pcdu::switchCallback, gpioComIF);
PDU2Handler* pdu2handler =
new PDU2Handler(objects::PDU2_HANDLER, objects::CSP_COM_IF, pdu2CspCookie);
pdu2handler->assignChannelHookFunction(&pcdu::switchCallback, gpioComIF);
ACUHandler* acuhandler = new ACUHandler(objects::ACU_HANDLER, objects::CSP_COM_IF, acuCspCookie);
new PCDUHandler(objects::PCDU_HANDLER, 50);
@ -472,6 +476,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
gpioComIF->addGpios(gpioCookieAcsBoard);
#if OBSW_ADD_ACS_HANDLERS == 1
std::string spiDev = q7s::SPI_DEFAULT_DEV;
SpiCookie* spiCookie =
new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, spiDev,
@ -568,6 +573,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
resetArgsGnss0.waitPeriodMs = 100;
auto gpsHandler0 = new GPSHyperionHandler(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps);
gpsHandler0->setResetPinTriggerFunction(gps::triggerGpioResetPin, &resetArgsGnss0);
#endif /* OBSW_ADD_ACS_HANDLERS == 1 */
}
void ObjectFactory::createHeaterComponents() {

View File

@ -13,7 +13,7 @@ void produce(void* args);
void createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, UartComIF** uartComIF,
SpiComIF** spiComIF);
void createTmpComponents();
void createPcduComponents();
void createPcduComponents(LinuxLibgpioIF* gpioComIF);
void createRadSensorComponent(LinuxLibgpioIF* gpioComIF);
void createSunSensorComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF);
void createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComIF* uartComIF);