Commit 3ae128ed authored by Hugo Hörnquist's avatar Hugo Hörnquist

Start integrating new serial into admin.

parent 7aba2f30
Pipeline #418 failed with stages
......@@ -35,7 +35,8 @@ HEADERS += mainwindow.h \
FORMS += mainwindow.ui
unix|win32: LIBS += -L$$PWD/../bad_com/ -lcom
unix|win32: LIBS += -L$$PWD/../serial/ -lcom
unix: CFLAGS += -I$$PWD/../
INCLUDEPATH += $$PWD/../bad_com
DEPENDPATH += $$PWD/../bad_com
INCLUDEPATH += $$PWD/../serial
DEPENDPATH += $$PWD/../serial
......@@ -34,7 +34,7 @@
#include "qintornullvalidator.h"
#include "serial.h"
#include "cash_drawer.h"
// TODO maybe make it somehow possible to remove product
// or have a button to delete all "dead" products
......@@ -100,9 +100,7 @@ MainWindow::MainWindow(QWidget *parent) :
}
}
port_name = new char[port.length() + 1];
std::strcpy(port_name, port.toStdString().c_str());
port_setup(port_name, 9600);
port_fd = port_setup(port.toStdString().c_str(), B9600);
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
......@@ -830,7 +828,7 @@ void MainWindow::on_openTillButton_clicked()
void MainWindow::open_till()
{
port_write(port_name, '1');
port_write(port_fd, '1');
}
void MainWindow::on_stockDiffReset_clicked()
......
......@@ -108,7 +108,7 @@ private:
QSqlTableModel* model;
DisablingModel* tempAcquisitionsModel;
char* port_name;
int port_fd;
void updateMoneyString();
void setMoneyDiffLabels(QVariant, int);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment