ui gapDist
This commit is contained in:
parent
792fa71d00
commit
4d6b60304a
@ -266,6 +266,7 @@ class CarrotPlanner:
|
||||
self.trafficState = TrafficState.off
|
||||
|
||||
def _update_carrot_man(self, sm, v_ego_kph, v_cruise_kph):
|
||||
atc_active = False
|
||||
if sm.alive['carrotMan']:
|
||||
carrot_man = sm['carrotMan']
|
||||
atc_turn_left = carrot_man.atcType in ["turn left", "atc left"]
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <QJsonValue>
|
||||
#include <QJsonArray>
|
||||
#include <QDialog>
|
||||
|
||||
#include <QMouseEvent>
|
||||
|
||||
#include "selfdrive/ui/qt/util.h"
|
||||
#include "selfdrive/ui/carrot.h"
|
||||
@ -209,10 +209,21 @@ void OnroadWindow::mousePressEvent(QMouseEvent* e) {
|
||||
// }
|
||||
//#endif
|
||||
// propagation event to parent(HomeWindow)
|
||||
UIState* s = uiState();
|
||||
s->scene._current_carrot_display = (s->scene._current_carrot_display % 3) + 1; // 4번: full map은 안보여줌.
|
||||
printf("_current_carrot_display1=%d\n", s->scene._current_carrot_display);
|
||||
QWidget::mousePressEvent(e);
|
||||
int x = e->x(); // 430 - 500 : gap window
|
||||
int y = height() - e->y(); // 60 - 180 : gap window
|
||||
if (x > 430 && x < 500 && y > 60 && y < 180) {
|
||||
Params params;
|
||||
int longitudinalPersonalityMax = params.getInt("LongitudinalPersonalityMax");
|
||||
int personality = (params.getInt("LongitudinalPersonality") - 1 + longitudinalPersonalityMax) % longitudinalPersonalityMax;
|
||||
params.putIntNonBlocking("LongitudinalPersonality", personality);
|
||||
|
||||
}
|
||||
else {
|
||||
UIState* s = uiState();
|
||||
s->scene._current_carrot_display = (s->scene._current_carrot_display % 3) + 1; // 4¹ø: full mapÀº ¾Èº¸¿©ÁÜ.
|
||||
printf("_current_carrot_display1=%d\n", s->scene._current_carrot_display);
|
||||
QWidget::mousePressEvent(e);
|
||||
}
|
||||
}
|
||||
//OverlayDialog* mapDialog = nullptr;
|
||||
void OnroadWindow::offroadTransition(bool offroad) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user