bugfix for scex testcode

This commit is contained in:
Irini Kosmidou
2022-09-27 18:54:48 +02:00
parent a1cc5b0ca7
commit 308a855d8c
16 changed files with 56 additions and 55 deletions

@ -325,17 +325,17 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
void ObjectFactory::createScexComponents(std::string uartDev, PowerSwitchIF* pwrSwitcher,
SdCardMountedIF& mountedIF, bool onImmediately,
std::optional<power::Switch_t> switchId) {
std::optional<power::Switch_t> switchId) {
// objekte anlegen
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, mountedIF);
if(onImmediately) {
scexHandler->setStartUpImmediately();
if (onImmediately) {
scexHandler->setStartUpImmediately();
}
if (switchId) {
scexHandler->setPowerSwitcher(*pwrSwitcher, switchId.value());
scexHandler->setPowerSwitcher(*pwrSwitcher, switchId.value());
}
}