diff --git a/DriverInterface.pro b/DriverInterface.pro index 3966ad8..55e1cf8 100644 --- a/DriverInterface.pro +++ b/DriverInterface.pro @@ -5,7 +5,7 @@ QT += widgets CONFIG += c++17 -# LIBS += -lwiringPi +LIBS += -lwiringPi # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. diff --git a/main.cpp b/main.cpp index d8e1bb5..b62ffa7 100644 --- a/main.cpp +++ b/main.cpp @@ -1,14 +1,14 @@ #include "headers/background.h" #include "mainwindow.h" -// #include +#include #include #include int main(int argc, char *argv[]) { - // wiringPiSetup(); + wiringPiSetup(); Background b; b.dark_theme(); QApplication a(argc, argv); diff --git a/mainwindow.cpp b/mainwindow.cpp index e84b2ae..bda7e3d 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -3,6 +3,7 @@ #include #include #include +#include MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { @@ -119,6 +120,9 @@ void MainWindow::gather_info() { blink = !blink; seconds += 1; + + pinMode(0, INPUT); + std::cout << "Current Pin 0 Output: " << digitalRead(0) << std::endl; } void MainWindow::on_parkingSignalON_clicked() { gear.switch_gears(PARK); } diff --git a/sources/battery.cpp b/sources/battery.cpp index 340b5d6..3eab75e 100644 --- a/sources/battery.cpp +++ b/sources/battery.cpp @@ -4,6 +4,7 @@ Battery::Battery() : battery_val(100) {} void Battery::setup(QProgressBar *battery_ptr, QLabel *range_label_ptr, QLabel *low_battery_label_ptr, QLabel *battery_label_ptr, QLCDNumber *range_ptr, QLabel *distance_label_ptr, QFrame *battery_line_1_ptr, QFrame *battery_line_2_ptr, QFrame *battery_line_3_ptr, QFrame *battery_line_4_ptr, uint16_t height, uint16_t width) { + battery = battery_ptr; range_label = range_label_ptr; low_battery_label = low_battery_label_ptr;