Fixes some issues with sounds and the appropriate factory. Further moved the calculation of pin addresses with pin base into the factories
This commit is contained in:
@@ -28,7 +28,8 @@ std::map<std::string, std::shared_ptr<items::Lamp>> LampFactory::getItemMap()
|
||||
auto address = lamp.at(config_path::item_address).get<uint8_t >();
|
||||
auto extender = lamp.at(config_path::item_extender).get<std::string>();
|
||||
auto pin_base = this->get_extender_pin_base(extender);
|
||||
auto lamp_item = std::make_shared<items::detail::Lamp>(std::static_pointer_cast<DriverBoardPinController>(this->pin_controller), address, pin_base, name);
|
||||
|
||||
auto lamp_item = std::make_shared<items::detail::Lamp>(std::static_pointer_cast<DriverBoardPinController>(this->pin_controller), address + pin_base, name);
|
||||
lamp_map.emplace(name, lamp_item);
|
||||
}
|
||||
return lamp_map;
|
||||
|
||||
Reference in New Issue
Block a user