changed InputFactory
This commit is contained in:
@@ -12,6 +12,9 @@
|
|||||||
|
|
||||||
#include "Detector.h"
|
#include "Detector.h"
|
||||||
|
|
||||||
|
#include "../utilities/InputGPIOInterface.h"
|
||||||
|
#include "InputEventNotifier.h"
|
||||||
|
|
||||||
#include "../lib/json/json.hpp"
|
#include "../lib/json/json.hpp"
|
||||||
|
|
||||||
using namespace nlohmann;
|
using namespace nlohmann;
|
||||||
@@ -33,9 +36,12 @@ public:
|
|||||||
json matrix_config;
|
json matrix_config;
|
||||||
matrix_config << matrix_config_stream;
|
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);
|
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:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user