changed InputFactory

This commit is contained in:
Neeflix
2018-05-31 16:01:28 +02:00
parent 39e0a092de
commit 18f63214d8

View File

@@ -12,6 +12,9 @@
#include "Detector.h"
#include "../utilities/InputGPIOInterface.h"
#include "InputEventNotifier.h"
#include "../lib/json/json.hpp"
using namespace nlohmann;
@@ -33,9 +36,12 @@ public:
json matrix_config;
matrix_config << matrix_config_stream;
auto input_gpio_interface = new InputGPIOInterface();
auto input_notifier = new InputEventNotifier();
std::map<char, InputEvent> input_events = create_input_events(matrix_config);
return std::shared_ptr<Detector*>(new Detector(input_config, input_events));
return std::shared_ptr<Detector*>(new Detector(input_gpio_interface, input_events, input_notifier));
}
private: