This commit is contained in:
Jonas Zeunert
2020-07-02 22:12:19 +02:00
parent 934a4f7186
commit 15bf743834
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); return std::make_shared<OutputDriver>(std::move(display_controller), solenoids, lamps, sounds, flippers, displays);
} }
std::chrono::milliseconds get_update_frequency(const std::string & display_config_path) std::chrono::microseconds get_update_frequency(const std::string & display_config_path)
{ {
nlohmann::json display_config; nlohmann::json display_config;
std::ifstream(display_config_path) >> display_config; std::ifstream(display_config_path) >> display_config;
return std::chrono::milliseconds{display_config.at(config_path::display_update_frequency).get<uint>()}; return std::chrono::microseconds{display_config.at(config_path::display_update_frequency).get<uint>()};
} }
template<typename FactoryType, typename ControllerType, typename ItemType> 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 & sound_config_path,
const std::string & display_config_path); const std::string & display_config_path);
std::chrono::milliseconds get_update_frequency(const std::string & display_config_path); std::chrono::microseconds get_update_frequency(const std::string & display_config_path);
template<typename FactoryType, typename ControllerType, typename ItemType> 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); std::map<std::string, std::shared_ptr<ItemType>> get_items(const std::string & config_path, std::shared_ptr<PinController> pin_controller);