This commit is contained in:
Jonas Zeunert
2020-07-02 22:06:08 +02:00
parent 38f588dc88
commit 934a4f7186
2 changed files with 3 additions and 3 deletions

View File

@@ -54,11 +54,11 @@ std::shared_ptr<OutputDriver> get_OutputDriver(const std::string & solenoid_conf
return std::make_shared<OutputDriver>(std::move(display_controller), solenoids, lamps, sounds, flippers, displays);
}
std::chrono::seconds get_update_frequency(const std::string & display_config_path)
std::chrono::milliseconds get_update_frequency(const std::string & display_config_path)
{
nlohmann::json display_config;
std::ifstream(display_config_path) >> display_config;
return std::chrono::seconds{1/display_config.at(config_path::display_update_frequency).get<uint>()};
return std::chrono::milliseconds{display_config.at(config_path::display_update_frequency).get<uint>()};
}
template<typename FactoryType, typename ControllerType, typename ItemType>

View File

@@ -28,7 +28,7 @@ std::shared_ptr<OutputDriver> get_OutputDriver(const std::string & solenoid_conf
const std::string & sound_config_path,
const std::string & display_config_path);
std::chrono::seconds get_update_frequency(const std::string & display_config_path);
std::chrono::milliseconds get_update_frequency(const std::string & display_config_path);
template<typename FactoryType, typename ControllerType, typename ItemType>
std::map<std::string, std::shared_ptr<ItemType>> get_items(const std::string & config_path, std::shared_ptr<PinController> pin_controller);