Merge remote-tracking branch 'origin/develop' into irini
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Irini Kosmidou
2022-09-27 17:36:19 +02:00
29 changed files with 357 additions and 153 deletions

View File

@ -323,14 +323,20 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
#endif // OBSW_ADD_RTD_DEVICES == 1
}
void ObjectFactory::createScexComponents(std::string uartDev, PowerSwitchIF* pwrSwitcher) {
void ObjectFactory::createScexComponents(std::string uartDev, PowerSwitchIF* pwrSwitcher,
SdCardMountedIF& mountedIF, bool onImmediately,
std::optional<power::Switch_t> switchId) {
// objekte anlegen
SdCardMountedIF* sdcMan = nullptr;
auto* cookie = new UartCookie(objects::SCEX, uartDev, uart::SCEX_BAUD, 4096);
auto scexUartReader = new ScexUartReader(objects::SCEX_UART_READER);
auto scexHandler = new ScexDeviceHandler(objects::SCEX, *scexUartReader, cookie, sdcMan);
scexHandler->setStartUpImmediately();
auto scexHandler = new ScexDeviceHandler(objects::SCEX, *scexUartReader, cookie, mountedIF);
if(onImmediately) {
scexHandler->setStartUpImmediately();
}
if (switchId) {
scexHandler->setPowerSwitcher(*pwrSwitcher, switchId.value());
}
}
void ObjectFactory::createThermalController() {