mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 08:36:33 +00:00
Minor changes.
This commit is contained in:
@@ -6,8 +6,8 @@ CONFIG += c++17 console
|
||||
|
||||
TARGET = a8
|
||||
|
||||
QMAKE_CXXFLAGS = -O0 -g -ggdb -fsanitize=undefined,address,bounds,float-divide-by-zero,integer-divide-by-zero,null,return,signed-integer-overflow,unreachable,shift,alignment,nonnull-attribute,returns-nonnull-attribute,enum
|
||||
QMAKE_LFLAGS = -O0 -g -ggdb -fsanitize=undefined,address,bounds,float-divide-by-zero,integer-divide-by-zero,null,return,signed-integer-overflow,unreachable,shift,alignment,nonnull-attribute,returns-nonnull-attribute,enum
|
||||
#QMAKE_CXXFLAGS = -O0 -g -ggdb -fsanitize=undefined,address,bounds,float-divide-by-zero,integer-divide-by-zero,null,return,signed-integer-overflow,unreachable,shift,alignment,nonnull-attribute,returns-nonnull-attribute,enum
|
||||
#QMAKE_LFLAGS = -O0 -g -ggdb -fsanitize=undefined,address,bounds,float-divide-by-zero,integer-divide-by-zero,null,return,signed-integer-overflow,unreachable,shift,alignment,nonnull-attribute,returns-nonnull-attribute,enum
|
||||
|
||||
QMAKE_CXX = g++
|
||||
QMAKE_CC = gcc
|
||||
@@ -32,8 +32,8 @@ SOURCES += \
|
||||
HEADERS += \
|
||||
config.hpp \
|
||||
defines.hpp \
|
||||
localControl.h \
|
||||
remoteControl.h \
|
||||
localControl.hpp \
|
||||
remoteControl.hpp \
|
||||
serialCommand.hpp \
|
||||
serialPort.hpp \
|
||||
serialResponse.hpp \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "localControl.h"
|
||||
#include "localControl.hpp"
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
#include <QObject>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QThread>
|
||||
#include "config.hpp"
|
||||
#include "localControl.h"
|
||||
#include "remoteControl.h"
|
||||
#include "localControl.hpp"
|
||||
#include "remoteControl.hpp"
|
||||
#include "serialCommand.hpp"
|
||||
#include "serialPort.hpp"
|
||||
|
||||
@@ -11,6 +11,8 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication app(argc, argv);
|
||||
QCommandLineParser parser;
|
||||
parser.addHelpOption();
|
||||
parser.addVersionOption();
|
||||
QCommandLineOption lOption(QStringList() << "l", "Use local mode");
|
||||
parser.addOption(lOption);
|
||||
QCommandLineOption pOption(QStringList() << "p", "Use serial port", "value");
|
||||
@@ -24,9 +26,11 @@ int main(int argc, char *argv[])
|
||||
if (parser.isSet(pOption)) {
|
||||
useSerialPort = parser.value(pOption);
|
||||
}
|
||||
qDebug() << useRemoteMode;
|
||||
qDebug() << useSerialPort;
|
||||
|
||||
SerialCommand serialCommand;
|
||||
SerialPort serialPort(useSerialPort);
|
||||
SerialCommand serialCommand;
|
||||
Config::setInitalValues(&serialPort, &serialCommand);
|
||||
|
||||
// Remote mode will read commands from pipe
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "remoteControl.h"
|
||||
#include "remoteControl.hpp"
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
#include <QJsonDocument>
|
||||
|
||||
@@ -21,11 +21,12 @@ SerialPort::SerialPort(QString usePort)
|
||||
|
||||
// Open the serial port
|
||||
if (openPort() == false) {
|
||||
qCritical().noquote().nospace() << "SerialPort(): Unable to open port " << port;
|
||||
return;
|
||||
qCritical().noquote().nospace() << "SerialPort(): Unable to open port " << usePort;
|
||||
delete mSerialPort;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
qDebug().noquote().nospace() << "SerialPort(): Opened port " << port;
|
||||
qDebug().noquote().nospace() << "SerialPort(): Opened port " << usePort;
|
||||
}
|
||||
|
||||
SerialPort::~SerialPort()
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
#include <QThread>
|
||||
#include <QTimer>
|
||||
#include <fcntl.h>
|
||||
#include <iostream>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#ifdef FIFO_TEST
|
||||
#include <iostream>
|
||||
#include <random>
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user