parent
72b71d57bc
commit
2d8030de0b
4 changed files with 24 additions and 50 deletions
@ -1,33 +0,0 @@ |
||||
#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[]) { |
||||
initApp(argc, argv); |
||||
|
||||
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 CameraWidget("camerad", VISION_STREAM_ROAD)); |
||||
} |
||||
|
||||
{ |
||||
QHBoxLayout *hlayout = new QHBoxLayout(); |
||||
layout->addLayout(hlayout); |
||||
hlayout->addWidget(new CameraWidget("camerad", VISION_STREAM_DRIVER)); |
||||
hlayout->addWidget(new CameraWidget("camerad", VISION_STREAM_WIDE_ROAD)); |
||||
} |
||||
|
||||
return a.exec(); |
||||
} |
@ -0,0 +1,17 @@ |
||||
#!/usr/bin/env python3 |
||||
import pyray as rl |
||||
|
||||
from msgq.visionipc import VisionStreamType |
||||
from openpilot.system.ui.lib.application import gui_app |
||||
from openpilot.selfdrive.ui.onroad.cameraview import CameraView |
||||
|
||||
|
||||
if __name__ == "__main__": |
||||
gui_app.init_window("watch3") |
||||
road = CameraView("camerad", VisionStreamType.VISION_STREAM_ROAD) |
||||
driver = CameraView("camerad", VisionStreamType.VISION_STREAM_DRIVER) |
||||
wide = CameraView("camerad", VisionStreamType.VISION_STREAM_WIDE_ROAD) |
||||
for _ in gui_app.render(): |
||||
road.render(rl.Rectangle(gui_app.width // 4, 0, gui_app.width // 2, gui_app.height // 2)) |
||||
driver.render(rl.Rectangle(0, gui_app.height // 2, gui_app.width // 2, gui_app.height // 2)) |
||||
wide.render(rl.Rectangle(gui_app.width // 2, gui_app.height // 2, gui_app.width // 2, gui_app.height // 2)) |
Loading…
Reference in new issue