Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DriverInterface.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include "headers/background.h"
#include "mainwindow.h"

// #include <wiringPi.h>
#include <wiringPi.h>

#include <QApplication>
#include <QStyleFactory>

int main(int argc, char *argv[])
{
// wiringPiSetup();
wiringPiSetup();
Background b;
b.dark_theme();
QApplication a(argc, argv);
Expand Down
4 changes: 4 additions & 0 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <QDebug>
#include <QScreen>
#include <QTimer>
#include <wiringPi.h>

MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
{
Expand Down Expand Up @@ -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); }
Expand Down
1 change: 1 addition & 0 deletions sources/battery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down