#include #include #include "config.hpp" #include "localControl.h" #include "remoteControl.h" #include "serialCommand.hpp" #include "serialPort.hpp" int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); SerialCommand serialCommand; SerialPort serialPort; Config::setInitalValues(&serialPort, &serialCommand); bool useRemoteMode = true; for (int i = 1; i < argc; ++i) { if (QString(argv[i]) == "-l") { useRemoteMode = false; break; } } // Remote mode will read commands from pipe if (useRemoteMode == true) { RemoteControl remoteControl; remoteControl.run(); } else { LocalControl localControl; localControl.run(); } return app.exec(); }