mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-21 21:12:06 +08:00
935ce9edad
* navd: render simple map
* render route
* offscreen rendering
* cleanup
* more cleanup
* render into visionIPC
* rename class
* split position update from route update
* stop broadcast if not active
* gate vipc server behind flag
* add python library
* faster
* no vipc from python
* put behind extras
* only send when loaded
* add glFlush just to be sure
* cleanup settings into helper function
* function ordering
* broadcast thumbnails
* put behind param
* adjust zoom level
* add route to python bindings
* revert that freq change
* add logging if map rendering is enabled
* use rlogs if available
* bump cereal
old-commit-hash: 5069852573
37 lines
1022 B
C++
37 lines
1022 B
C++
#include <QApplication>
|
|
#include <QtWidgets>
|
|
|
|
#include "selfdrive/ui/qt/qt_window.h"
|
|
#include "selfdrive/ui/qt/util.h"
|
|
#include "selfdrive/ui/qt/widgets/cameraview.h"
|
|
|
|
int main(int argc, char *argv[]) {
|
|
QSurfaceFormat fmt;
|
|
fmt.setRenderableType(QSurfaceFormat::OpenGLES);
|
|
QSurfaceFormat::setDefaultFormat(fmt);
|
|
|
|
QApplication a(argc, argv);
|
|
QWidget w;
|
|
setMainWindow(&w);
|
|
|
|
QVBoxLayout *layout = new QVBoxLayout(&w);
|
|
layout->setMargin(0);
|
|
layout->setSpacing(0);
|
|
|
|
{
|
|
QHBoxLayout *hlayout = new QHBoxLayout();
|
|
layout->addLayout(hlayout);
|
|
hlayout->addWidget(new CameraViewWidget("navd", VISION_STREAM_RGB_MAP, false));
|
|
hlayout->addWidget(new CameraViewWidget("camerad", VISION_STREAM_RGB_BACK, false));
|
|
}
|
|
|
|
{
|
|
QHBoxLayout *hlayout = new QHBoxLayout();
|
|
layout->addLayout(hlayout);
|
|
hlayout->addWidget(new CameraViewWidget("camerad", VISION_STREAM_RGB_FRONT, false));
|
|
hlayout->addWidget(new CameraViewWidget("camerad", VISION_STREAM_RGB_WIDE, false));
|
|
}
|
|
|
|
return a.exec();
|
|
}
|