lamp config adapted

This commit is contained in:
Johannes Wendel
2020-01-15 17:00:53 +01:00
parent 16e0dfd4b8
commit a8c0ca347d
2 changed files with 89 additions and 89 deletions

View File

@@ -19,7 +19,7 @@ LampFactory::LampFactory(nlohmann::json &object, std::shared_ptr<DriverBoardPinC
ItemFactory{object, pin_controller}
{
this->set_address_pins();
this->set_mux_pins();
/* this->set_mux_pins();
auto controller = std::dynamic_pointer_cast<detail::DriverBoardPinController>(this->pin_controller);
@@ -27,7 +27,7 @@ LampFactory::LampFactory(nlohmann::json &object, std::shared_ptr<DriverBoardPinC
controller->set_data_pin(data_pin);
auto run_pin = this->get_address_pin(this->object.at(config_path::run_pin));
controller->set_run_pin(run_pin);
controller->set_run_pin(run_pin);*/
}
std::map<std::string, std::shared_ptr<items::Lamp>> LampFactory::getItemMap()
@@ -77,7 +77,7 @@ void LampFactory::set_mux_pins()
for(int i = 1; i < 14; i++)
{
pins.at(i) = this->get_address_pin(address_pins.at("E" + std::string{i}));
pins.at(i) = this->get_address_pin(address_pins.at("E" + (char) i));
}
std::dynamic_pointer_cast<detail::DriverBoardPinController>(this->pin_controller)->set_mux_pins(pins);