shit
This commit is contained in:
@@ -75,7 +75,7 @@ std::map<std::string, std::shared_ptr<items::Solenoid>> create_solenoids(std::is
|
|||||||
|
|
||||||
std::shared_ptr<items::detail::Solenoid> create_solenoid(nlohmann::json &solenoid_json, nlohmann::json &port_extenders, std::shared_ptr<DriverBoardPinController> &pin_controller, std::chrono::milliseconds deactivation_time)
|
std::shared_ptr<items::detail::Solenoid> create_solenoid(nlohmann::json &solenoid_json, nlohmann::json &port_extenders, std::shared_ptr<DriverBoardPinController> &pin_controller, std::chrono::milliseconds deactivation_time)
|
||||||
{
|
{
|
||||||
solenoid_json.clear();
|
solenoid_json;
|
||||||
std::string config_file_name = "solenoid_config.json";
|
std::string config_file_name = "solenoid_config.json";
|
||||||
|
|
||||||
uint8_t pin_base = get_pin_base(solenoid_json, port_extenders, config_file_name);
|
uint8_t pin_base = get_pin_base(solenoid_json, port_extenders, config_file_name);
|
||||||
@@ -94,6 +94,7 @@ std::shared_ptr<items::detail::Solenoid> create_solenoid(nlohmann::json &solenoi
|
|||||||
std::map<std::string, std::shared_ptr<items::Flipper>> create_flippers(std::istream &solenoid_config, std::shared_ptr<DriverBoardPinController> &pin_controller)
|
std::map<std::string, std::shared_ptr<items::Flipper>> create_flippers(std::istream &solenoid_config, std::shared_ptr<DriverBoardPinController> &pin_controller)
|
||||||
{
|
{
|
||||||
solenoid_config.clear();
|
solenoid_config.clear();
|
||||||
|
solenoid_config.seekg(0, std::ios::beg);
|
||||||
json solenoid_config_json;
|
json solenoid_config_json;
|
||||||
solenoid_config >> solenoid_config_json;
|
solenoid_config >> solenoid_config_json;
|
||||||
|
|
||||||
@@ -125,6 +126,7 @@ std::shared_ptr<items::detail::Flipper> create_flipper(nlohmann::json &flipper_j
|
|||||||
std::map<std::string, std::shared_ptr<items::Lamp>> create_lamps(std::istream &lamp_config, std::shared_ptr<DriverBoardPinController> &pin_controller)
|
std::map<std::string, std::shared_ptr<items::Lamp>> create_lamps(std::istream &lamp_config, std::shared_ptr<DriverBoardPinController> &pin_controller)
|
||||||
{
|
{
|
||||||
lamp_config.clear();
|
lamp_config.clear();
|
||||||
|
lamp_config.seekg(0, std::ios::beg);
|
||||||
json lamp_config_json;
|
json lamp_config_json;
|
||||||
lamp_config >> lamp_config_json;
|
lamp_config >> lamp_config_json;
|
||||||
|
|
||||||
@@ -157,6 +159,7 @@ std::shared_ptr<items::detail::Lamp> create_lamp(json &lamp_json, json & port_ex
|
|||||||
std::map<std::string, std::shared_ptr<items::Sound>> create_sounds(std::istream &sound_config, std::shared_ptr<SoundBoardPinController> &pin_controller)
|
std::map<std::string, std::shared_ptr<items::Sound>> create_sounds(std::istream &sound_config, std::shared_ptr<SoundBoardPinController> &pin_controller)
|
||||||
{
|
{
|
||||||
sound_config.clear();
|
sound_config.clear();
|
||||||
|
sound_config.seekg(0, std::ios::beg);
|
||||||
json sound_config_json;
|
json sound_config_json;
|
||||||
sound_config >> sound_config_json;
|
sound_config >> sound_config_json;
|
||||||
|
|
||||||
@@ -192,6 +195,7 @@ std::shared_ptr<items::detail::Sound> create_sound(json &sound_json, json &port_
|
|||||||
uint8_t get_sound_fire_address(std::istream &sound_config)
|
uint8_t get_sound_fire_address(std::istream &sound_config)
|
||||||
{
|
{
|
||||||
sound_config.clear();
|
sound_config.clear();
|
||||||
|
sound_config.seekg(0, std::ios::beg);
|
||||||
json sound_config_json;
|
json sound_config_json;
|
||||||
sound_config >> sound_config_json;
|
sound_config >> sound_config_json;
|
||||||
|
|
||||||
@@ -207,6 +211,7 @@ uint8_t get_sound_fire_address(std::istream &sound_config)
|
|||||||
std::map<std::string, uint8_t> parse_pins_display_board(std::istream &display_config)
|
std::map<std::string, uint8_t> parse_pins_display_board(std::istream &display_config)
|
||||||
{
|
{
|
||||||
display_config.clear();
|
display_config.clear();
|
||||||
|
display_config.seekg(0, std::ios::beg);
|
||||||
std::string config_file = "display_config.json";
|
std::string config_file = "display_config.json";
|
||||||
|
|
||||||
json display_config_json;
|
json display_config_json;
|
||||||
@@ -241,6 +246,7 @@ std::map<std::string, uint8_t> parse_pins_display_board(std::istream &display_co
|
|||||||
std::vector<std::shared_ptr<items::OutputDisplay>> create_displays(std::istream &display_config)
|
std::vector<std::shared_ptr<items::OutputDisplay>> create_displays(std::istream &display_config)
|
||||||
{
|
{
|
||||||
display_config.clear();
|
display_config.clear();
|
||||||
|
display_config.seekg(0, std::ios::beg);
|
||||||
json display_config_json;
|
json display_config_json;
|
||||||
display_config >> display_config_json;
|
display_config >> display_config_json;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user