diff --git a/FlippR-Driver/src/input/Event.cpp b/FlippR-Driver/src/input/Event.cpp index c4e525f..6f8da75 100644 --- a/FlippR-Driver/src/input/Event.cpp +++ b/FlippR-Driver/src/input/Event.cpp @@ -16,7 +16,7 @@ namespace Input Event::Event(char address, int priority, std::string name) : address(address), priority(priority), name(name) { - CLOG_IF(VLOG_IS_ON(HIGH_VERBOSITY), INFO, INPUT_LOGGER) << "Created event: " << name << ", address: " << address; + CLOG_IF(VLOG_IS_ON(HIGHEST_LOG_VERBOSITY), INFO, INPUT_LOGGER) << "Created event: " << name << ", address: " << address; } bool operator==(const Event& left, const Event& right) diff --git a/FlippR-Driver/src/utilities/GPIOInterface.cpp b/FlippR-Driver/src/utilities/GPIOInterface.cpp index 7a1d096..f4e2d34 100644 --- a/FlippR-Driver/src/utilities/GPIOInterface.cpp +++ b/FlippR-Driver/src/utilities/GPIOInterface.cpp @@ -7,6 +7,8 @@ #include "GPIOInterface.h" +#include "config.h" + #include "wiringPi/wiringPi.h" #include "json/json.hpp" @@ -25,7 +27,7 @@ void GPIOInterface::write_pin(char address, char data) bool GPIOInterface::read_pin(char address) { - return digitalRead(address); + return PULLDOWN && digitalRead(address); } void GPIOInterface::initialize_output_pin(char address) diff --git a/FlippR-Driver/src/utilities/config.h b/FlippR-Driver/src/utilities/config.h index e0a66de..bfbe530 100644 --- a/FlippR-Driver/src/utilities/config.h +++ b/FlippR-Driver/src/utilities/config.h @@ -17,11 +17,13 @@ #define DRIVER_CONF_FILE "/var/log/flippr_driver.conf" -#define HIGH_VERBOSITY 10 +#define HIGHEST_LOG_VERBOSITY 10 #define INPUT_MATRIX_SIZE 8 #define INPUT_SLEEP_DURATION_NANO 800 #define NUMBER_OF_DISPLAYS 5 +#define PULLDOWN false + #define HIGHEST_INPUT_EVENT_PRIORITY 0