Merge branch 'master' of github.com:swinginbird/flippr-code

This commit is contained in:
andi
2018-05-31 19:03:17 +02:00
11 changed files with 95 additions and 67 deletions

View File

@@ -15,11 +15,8 @@
#include <fstream>
#include "../lib/json/json.hpp"
#include "../lib/wiringPi/wiringPi.h"
using namespace nlohmann;
class GPIOInterface
{
public:
@@ -35,9 +32,6 @@ public:
{
return digitalRead(address);
}
protected:
json config;
};

View File

@@ -20,6 +20,9 @@ bool InputGPIOInterface::read_input_data(char pin)
write_input_row(pin / MATRIX_SIZE);
write_input_col(pin % MATRIX_SIZE);
// wait for mux to set address
std::this_thread::sleep_for(std::chrono::nanoseconds(SLEEP_DURATION_NANO));
return read_pin(this->input_data_address);
}

View File

@@ -0,0 +1,8 @@
/*
* BlockingQueue.hpp
*
* Created on: May 17, 2018
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
*/
#define INPUT_LOGGER "input_logger"