forgot to push
This commit is contained in:
@@ -2,17 +2,11 @@
|
||||
"deactivation_time_milliseconds" : 10,
|
||||
"port_extenders" :
|
||||
[
|
||||
<<<<<<< HEAD
|
||||
{
|
||||
"name" : "extender_0",
|
||||
"i2c_address" : 33,
|
||||
"pin_base" : 81
|
||||
}
|
||||
=======
|
||||
"name" : "extender_0",
|
||||
"i2c_address" : 33,
|
||||
"pin_base" : 81
|
||||
>>>>>>> aa1d6409ea18cff1ad4b0ef06804fcf5a521dee9
|
||||
],
|
||||
"fire_pin" :
|
||||
{
|
||||
|
||||
@@ -121,10 +121,10 @@ void FlippRServer::initialize_output_driver()
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
this->output_driver = flippR_driver::get_OutputDriver(lamp_config_stream,
|
||||
solenoid_config_stream,
|
||||
sound_config_stream,
|
||||
display_config_stream);
|
||||
this->output_driver = flippR_driver::get_OutputDriver(solenoid_config_stream,
|
||||
lamp_config_stream,
|
||||
sound_config_stream,
|
||||
display_config_stream);
|
||||
}
|
||||
|
||||
void FlippRServer::initialize_input_driver()
|
||||
@@ -156,6 +156,8 @@ int FlippRServer::main(const std::vector<std::string>& args)
|
||||
|
||||
std::unique_ptr<TCPServer> input_server(this->build_input_server());
|
||||
|
||||
logger().information("Server running!");
|
||||
|
||||
waitForTerminationRequest();
|
||||
this->output_driver->deactivate_all_lamps();
|
||||
this->output_driver->deactivate_displays();
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "DriverFactory.h"
|
||||
|
||||
#include "utility/LoggerFactory.h"
|
||||
|
||||
#include "input/InputDriverFactory.h"
|
||||
#include "output/OutputDriverFactory.h"
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "PinController.h"
|
||||
|
||||
#include "utility/config.h"
|
||||
|
||||
#define NOT_PI
|
||||
#ifndef NOT_PI
|
||||
#include "wiringPi/wiringPi.h"
|
||||
#include "wiringPi/mcp23017.h"
|
||||
|
||||
@@ -314,7 +314,6 @@ json get_element(const std::string & name, json & object, const std::string & fi
|
||||
try
|
||||
{
|
||||
sub_object = object.at(name);
|
||||
return sub_object;
|
||||
}
|
||||
catch(json::exception &e)
|
||||
{
|
||||
@@ -322,21 +321,23 @@ json get_element(const std::string & name, json & object, const std::string & fi
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
return sub_object;
|
||||
}
|
||||
|
||||
template<typename type>
|
||||
type get_value(const std::string & name, json & object, const std::string & file_name)
|
||||
{
|
||||
type element;
|
||||
try
|
||||
{
|
||||
type element = object.at(name).get<type>();
|
||||
return element;
|
||||
element = object.at(name).get<type>();
|
||||
}
|
||||
catch(json::exception &e)
|
||||
{
|
||||
CLOG(ERROR, OUTPUT_LOGGER) << "File " << file_name << " seems to be corrupted at " << name << ": " << e.what();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
return element;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user