fixed distribution event

This commit is contained in:
Jonas Zeunert
2018-09-27 14:18:51 +02:00
parent fc7cdb2a7a
commit e15e2d1152
4 changed files with 60 additions and 43 deletions

View File

@@ -34,19 +34,17 @@ class Detector : public IDetector
{
public:
Detector(std::unique_ptr<IInputGPIOInterface> input_gpio_interface, std::map<char, std::shared_ptr<DistributingEvent>> events, std::shared_ptr<IEventNotifier> event_notifier);
Detector(std::unique_ptr<IInputGPIOInterface> input_gpio_interface, std::vector<std::shared_ptr<DistributingEvent>> events);
~Detector();
private:
void detect();
std::vector<char> check_inputs();
void check_inputs();
private:
std::unique_ptr<IInputGPIOInterface> input_gpio_interface;
std::map<char, std::shared_ptr<DistributingEvent>> events;
std::shared_ptr<IEventNotifier> event_notifier;
std::vector<std::shared_ptr<DistributingEvent>> events;
bool is_running;
std::thread detect_thread;