mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-22 14:32:07 +08:00
added flight panel
This commit is contained in:
@@ -28,6 +28,7 @@ AnnotatedCameraWidget::AnnotatedCameraWidget(VisionStreamType type, QWidget* par
|
||||
#ifdef DP
|
||||
knight_scanner = new KnightScanner;
|
||||
rainbow_path = new RainbowPath;
|
||||
flight_panel = new FlightPanel;
|
||||
chevron_ext = new ChevronExt;
|
||||
#endif
|
||||
|
||||
@@ -86,6 +87,7 @@ void AnnotatedCameraWidget::updateState(const UIState &s) {
|
||||
|
||||
#ifdef DP
|
||||
rainbow_path->update_states(s);
|
||||
flight_panel->update_states(s, is_metric);
|
||||
chevron_ext->update_states(s, is_metric);
|
||||
#endif
|
||||
}
|
||||
@@ -434,6 +436,10 @@ void AnnotatedCameraWidget::paintGL() {
|
||||
update_model(s, model, sm["uiPlan"].getUiPlan());
|
||||
drawLaneLines(painter, s);
|
||||
|
||||
#ifdef DP
|
||||
flight_panel->paint(painter, width(), height());
|
||||
#endif
|
||||
|
||||
if (s->scene.longitudinal_control && sm.rcv_frame("radarState") > s->scene.started_frame) {
|
||||
auto radar_state = sm["radarState"].getRadarState();
|
||||
update_leads(s, radar_state, model.getPosition());
|
||||
|
||||
@@ -41,6 +41,7 @@ private:
|
||||
bool wide_cam_requested = false;
|
||||
|
||||
#ifdef DP
|
||||
FlightPanel *flight_panel;
|
||||
KnightScanner *knight_scanner;
|
||||
RainbowPath *rainbow_path;
|
||||
ChevronExt * chevron_ext;
|
||||
|
||||
Reference in New Issue
Block a user