nice
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
[
|
||||
{
|
||||
"name" : "extender_1",
|
||||
"i2c_address" : 33,
|
||||
"pin_base" : 82
|
||||
"i2c_address" : 32,
|
||||
"pin_base" : 65
|
||||
}
|
||||
],
|
||||
"lamps" :
|
||||
|
||||
@@ -169,13 +169,13 @@ std::map<std::string, std::shared_ptr<items::Sound>> create_sounds(std::istream
|
||||
|
||||
std::chrono::milliseconds deactivation_time{ get_value<int>("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<std::string, std::shared_ptr<items::Sound>> 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<uint8_t, std::shared_ptr<items::Display>> 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<uint8_t>("i2c_address", extender_json, file_name);
|
||||
|
||||
Reference in New Issue
Block a user