diff --git a/FlippR-Driver/contrib/json_example/output/Lamp_Config.json b/FlippR-Driver/contrib/json_example/output/Lamp_Config.json index d978a8c..ef53c7d 100644 --- a/FlippR-Driver/contrib/json_example/output/Lamp_Config.json +++ b/FlippR-Driver/contrib/json_example/output/Lamp_Config.json @@ -3,8 +3,8 @@ [ { "name" : "extender_1", - "i2c_address" : 33, - "pin_base" : 82 + "i2c_address" : 32, + "pin_base" : 65 } ], "lamps" : diff --git a/FlippR-Driver/src/output/OutputDriverFactory.cpp b/FlippR-Driver/src/output/OutputDriverFactory.cpp index b5b0e15..a0d3242 100644 --- a/FlippR-Driver/src/output/OutputDriverFactory.cpp +++ b/FlippR-Driver/src/output/OutputDriverFactory.cpp @@ -169,13 +169,13 @@ std::map> create_sounds(std::istream std::chrono::milliseconds deactivation_time{ get_value("deactivation_time_milliseconds", sound_config_json, "solenoid_config.json") }; - json solenoids_json = get_element("sounds", sound_config_json, "sound_config.json"); + json sounds_json = get_element("sounds", sound_config_json, "sound_config.json"); std::map> sounds; - for(auto &solenoid_json : solenoids_json) + for(auto &sound_json : sounds_json) { - auto solenoid = create_sound(solenoid_json, port_extenders, pin_controller, deactivation_time); - sounds.emplace(solenoid->get_name(), solenoid); + auto sound = create_sound(sound_json, port_extenders, pin_controller, deactivation_time); + sounds.emplace(sound->get_name(), sound); } return sounds; } @@ -292,7 +292,6 @@ std::map> map_displays(const std::vecto void initialize_port_extenders(json &port_extenders, PinController * pin_controller, const std::string & file_name) { - for (auto & extender_json : port_extenders) { auto i2c_address = get_value("i2c_address", extender_json, file_name);