This commit is contained in:
Jonas Zeunert
2018-07-10 22:20:29 +02:00
parent 40d1b629fc
commit 6650b38d2e
29 changed files with 74 additions and 886 deletions

View File

@@ -1,8 +0,0 @@
Input/Detector.o: ../Input/Detector.cpp ../Input/Detector.h \
../Input/InputEvent.h ../Input/InputEventHandler.h
../Input/Detector.h:
../Input/InputEvent.h:
../Input/InputEventHandler.h:

View File

@@ -1,8 +0,0 @@
Input/main.o: ../Input/main.cpp ../Input/InputEvent.h \
../Input/InputEventHandler.h ../Input/Detector.h
../Input/InputEvent.h:
../Input/InputEventHandler.h:
../Input/Detector.h:

Binary file not shown.

View File

@@ -1,27 +0,0 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
CPP_SRCS += \
../Input/Detector.cpp \
../Input/main.cpp
OBJS += \
./Input/Detector.o \
./Input/main.o
CPP_DEPS += \
./Input/Detector.d \
./Input/main.d
# Each subdirectory must supply rules for building sources it contributes
Input/%.o: ../Input/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: GCC C++ Compiler'
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

View File

@@ -1,58 +0,0 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
-include ../makefile.init
RM := rm -rf
# All of the sources participating in the build are defined here
-include sources.mk
-include Input/subdir.mk
-include subdir.mk
-include objects.mk
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(CC_DEPS)),)
-include $(CC_DEPS)
endif
ifneq ($(strip $(C++_DEPS)),)
-include $(C++_DEPS)
endif
ifneq ($(strip $(C_UPPER_DEPS)),)
-include $(C_UPPER_DEPS)
endif
ifneq ($(strip $(CXX_DEPS)),)
-include $(CXX_DEPS)
endif
ifneq ($(strip $(CPP_DEPS)),)
-include $(CPP_DEPS)
endif
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
endif
-include ../makefile.defs
# Add inputs and outputs from these tool invocations to the build variables
# All Target
all: FlippR-Driver
# Tool invocations
FlippR-Driver: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: GCC C++ Linker'
g++ -o "FlippR-Driver" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '
# Other Targets
clean:
-$(RM) $(CC_DEPS)$(C++_DEPS)$(EXECUTABLES)$(C_UPPER_DEPS)$(CXX_DEPS)$(OBJS)$(CPP_DEPS)$(C_DEPS) FlippR-Driver
-@echo ' '
.PHONY: all clean dependents
-include ../makefile.targets

View File

@@ -1,8 +0,0 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
USER_OBJS :=
LIBS := -lpthread

View File

@@ -1,27 +0,0 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
C_UPPER_SRCS :=
CXX_SRCS :=
C++_SRCS :=
OBJ_SRCS :=
CC_SRCS :=
ASM_SRCS :=
CPP_SRCS :=
C_SRCS :=
O_SRCS :=
S_UPPER_SRCS :=
CC_DEPS :=
C++_DEPS :=
EXECUTABLES :=
C_UPPER_DEPS :=
CXX_DEPS :=
OBJS :=
CPP_DEPS :=
C_DEPS :=
# Every subdirectory with source files must be described here
SUBDIRS := \
Input \

View File

@@ -10,7 +10,7 @@
#include <iostream>
#include <math.h>
#include "../utilities/config.h"
#include "utilities/config.h"
namespace Input
{

View File

@@ -14,12 +14,13 @@
#ifndef DETECTOR_H_
#define DETECTOR_H_
#include "IDetector.h"
#include <thread>
#include <map>
#include "../utilities/IInputGPIOInterface.h"
#include "utilities/IInputGPIOInterface.h"
#include "IDetector.h"
#include "Event.h"
#include "IEventNotifier.h"

View File

@@ -11,7 +11,7 @@
#include <set>
#include <string>
#include "../utilities/config.h"
#include "utilities/config.h"
namespace Input
{

View File

@@ -14,8 +14,8 @@
#include "IInputDriver.h"
#include "../utilities/IEventHandler.h"
#include "../utilities/config.h"
#include "utilities/IEventHandler.h"
#include "utilities/config.h"
#include "Event.h"
namespace Input

View File

@@ -7,7 +7,7 @@
#include <boost/thread.hpp>
#include "../utilities/config.h"
#include "utilities/config.h"
#include "EventNotifier.h"

View File

@@ -14,7 +14,7 @@
#include <thread>
#include <mutex>
#include "../utilities/BlockingQueue.hpp"
#include "utilities/BlockingQueue.hpp"
#include "Event.h"
#include "EventHandler.h"

View File

@@ -6,7 +6,8 @@
*/
#include "InputDriver.h"
using namespace Input;
namespace Input
{
InputDriver::InputDriver(IEventNotifier* event_notifier, IDetector* detector) :
event_notifier(event_notifier), detector(detector)
@@ -33,4 +34,6 @@ void InputDriver::unregister_event_handler(IEventHandler* handler)
event_notifier->unregister_event_handler(handler);
}
}

View File

@@ -7,7 +7,7 @@
#ifndef SRC_INPUT_INPUTDRIVER_H_
#define SRC_INPUT_INPUTDRIVER_H_
#include "../utilities/config.h"
#include "utilities/config.h"
#include "IInputDriver.h"
#include "IDetector.h"

View File

@@ -13,7 +13,10 @@
#include "EventNotifier.h"
using namespace nlohmann;
using namespace Input;
namespace Input
{
std::shared_ptr<InputDriver> InputDriverFactory::get_InputDriver(std::string& input_config_path, std::string& matrix_config_path)
{
@@ -70,3 +73,6 @@ void InputDriverFactory::ConfigureLogger()
{
LoggerFactory::CreateInputLogger();
}
}

View File

@@ -14,10 +14,10 @@
#include "Detector.h"
#include "InputDriver.h"
#include "../utilities/InputGPIOInterface.h"
#include "../utilities/config.h"
#include "../lib/json/json.hpp"
#include "../lib/easylogging/easylogging++.h"
#include "utilities/InputGPIOInterface.h"
#include "utilities/config.h"
#include "lib/json/json.hpp"
#include "lib/easylogging/easylogging++.h"
#include "IEventNotifier.h"

View File

@@ -7,8 +7,8 @@
#include "GPIOInterface.h"
//#include "../lib/wiringPi/wiringPi.h"
#include "../lib/json/json.hpp"
//#include "lib/wiringPi/wiringPi.h"
#include "lib/json/json.hpp"
void GPIOInterface::write_pin(char address, char data)

View File

@@ -8,12 +8,12 @@
#ifndef SRC_IEVENTHANDLER_H_
#define SRC_IEVENTHANDLER_H_
#include "../input/Event.h"
#include "input/Event.h"
class IEventHandler
{
public:
virtual ~IEventHandler() = 0;
virtual ~IEventHandler(){};
virtual void handle(Input::Event& event) = 0;
};

View File

@@ -9,8 +9,8 @@
#include <thread>
#include "InputGPIOInterface.h"
#include "../lib/json/json.hpp"
#include "../lib/easylogging/easylogging++.h"
#include "lib/json/json.hpp"
#include "lib/easylogging/easylogging++.h"
#include "config.h"
#include <string>
using namespace nlohmann;

View File

@@ -5,7 +5,7 @@
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
*/
#include "../lib/easylogging/easylogging++.h"
#include "lib/easylogging/easylogging++.h"
#define INPUT_LOGGER "driver_logger"
#define DRIVER_LOG_FILE "/var/log/flippr_driver.conf"