initialize switch state list

This commit is contained in:
Robin Müller 2023-04-03 14:31:45 +02:00
parent 4f632e2c68
commit e2e87b149d
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
1 changed files with 5 additions and 1 deletions

View File

@ -6,7 +6,11 @@ DummyPowerSwitcher::DummyPowerSwitcher(object_id_t objectId, size_t numberOfSwit
: SystemObject(objectId, registerGlobally),
switcherList(numberOfSwitches),
fuseList(numberOfFuses),
switchDelayMs(switchDelayMs) {}
switchDelayMs(switchDelayMs) {
for(auto &switchState: switcherList) {
switchState = PowerSwitchIF::SWITCH_UNKNOWN;
}
}
void DummyPowerSwitcher::setInitialSwitcherList(std::vector<ReturnValue_t> switcherList) {
this->switcherList = switcherList;