refactored everything
This commit is contained in:
@@ -16,13 +16,13 @@
|
||||
#include "EventNotifier.h"
|
||||
|
||||
using namespace nlohmann;
|
||||
using namespace FlippR_Driver::utility;
|
||||
using namespace flippR_driver::utility;
|
||||
|
||||
namespace FlippR_Driver
|
||||
namespace flippR_driver
|
||||
{
|
||||
namespace Input
|
||||
namespace input
|
||||
{
|
||||
std::shared_ptr<IInputDriver> InputDriverFactory::get_InputDriver(std::istream &input_config_stream, std::istream &matrix_config_stream)
|
||||
std::shared_ptr<IInputDriver> InputDriverFactory::get_InputDriver(std::istream &input_config_stream, std::istream &matrix_config_stream)
|
||||
{
|
||||
LoggerFactory::CreateInputLogger();
|
||||
|
||||
@@ -52,9 +52,9 @@ void InputDriverFactory::create_input_events(json matrix_config, std::vector<std
|
||||
{
|
||||
int global_bounce_time = matrix_config.at("global_bounce_time").get<json::number_integer_t>();
|
||||
auto& event_array = matrix_config.at("input_matrix");
|
||||
for (auto &json_event : event_array)
|
||||
for (auto &json_event : event_array)
|
||||
{
|
||||
try
|
||||
try
|
||||
{
|
||||
std::string name = json_event.at("name");
|
||||
char address = json_event.at("address").get<json::number_integer_t>();
|
||||
@@ -73,7 +73,7 @@ void InputDriverFactory::create_input_events(json matrix_config, std::vector<std
|
||||
events.push_back(event_ptr);
|
||||
name_event_map.emplace(name, event_ptr);
|
||||
}
|
||||
catch (json::exception &e)
|
||||
catch (json::exception &e)
|
||||
{
|
||||
CLOG(ERROR, INPUT_LOGGER) << "Matrix config-file corrupted: " << e.what();
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
Reference in New Issue
Block a user