mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-07-27 04:12:10 +08:00
3966599e9d
* Revert "Revert "ui: sunnypilot offroad UI" (#511)"
This reverts commit 0e264e1b05.
* Revert "move files to sp dir"
This reverts commit c72d732259d35872fca92b90289785e7b4086140.
* remove drive stats for now
* update translation
* update onboarding
* remove sp onboarding for now
* rearrange
* remove more
* shorter license
37 lines
913 B
C++
37 lines
913 B
C++
#include <sys/resource.h>
|
|
|
|
#include <QApplication>
|
|
#include <QTranslator>
|
|
|
|
#include "system/hardware/hw.h"
|
|
#include "selfdrive/ui/qt/util.h"
|
|
#include "selfdrive/ui/qt/window.h"
|
|
|
|
#ifdef SUNNYPILOT
|
|
#include "selfdrive/ui/sunnypilot/qt/window.h"
|
|
#define MainWindow MainWindowSP
|
|
#else
|
|
#include "selfdrive/ui/qt/qt_window.h"
|
|
#endif
|
|
|
|
int main(int argc, char *argv[]) {
|
|
setpriority(PRIO_PROCESS, 0, -20);
|
|
|
|
qInstallMessageHandler(swagLogMessageHandler);
|
|
initApp(argc, argv);
|
|
|
|
QTranslator translator;
|
|
QString translation_file = QString::fromStdString(Params().get("LanguageSetting"));
|
|
if (!translator.load(QString(":/%1").arg(translation_file)) && translation_file.length()) {
|
|
qCritical() << "Failed to load translation file:" << translation_file;
|
|
}
|
|
|
|
QApplication a(argc, argv);
|
|
a.installTranslator(&translator);
|
|
|
|
MainWindow w;
|
|
setMainWindow(&w);
|
|
a.installEventFilter(&w);
|
|
return a.exec();
|
|
}
|