wip
This commit is contained in:
@@ -242,6 +242,7 @@ std::unordered_map<std::string, uint32_t> keys = {
|
|||||||
// {"SpeedLimitVTSC", PERSISTENT},
|
// {"SpeedLimitVTSC", PERSISTENT},
|
||||||
|
|
||||||
{"CPTLkasButtonAction", PERSISTENT},
|
{"CPTLkasButtonAction", PERSISTENT},
|
||||||
|
{"ScreenDisaplayMode", PERSISTENT},
|
||||||
|
|
||||||
{"RadarDist", PERSISTENT},
|
{"RadarDist", PERSISTENT},
|
||||||
{"ModelDist", PERSISTENT},
|
{"ModelDist", PERSISTENT},
|
||||||
|
|||||||
@@ -1,3 +1,20 @@
|
|||||||
|
-----
|
||||||
|
|
||||||
|
- screen off on lkas
|
||||||
|
- speed limit change chirp on cruise
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
- fix manager / error recording / restart service on fail
|
||||||
|
- fix gps tracking
|
||||||
|
- dashcam
|
||||||
|
- better turning logic
|
||||||
|
- new settings UI
|
||||||
|
- experimental mode
|
||||||
|
|
||||||
|
------------
|
||||||
|
|
||||||
|
|
||||||
- revert a bunch of debugging in canfd
|
- revert a bunch of debugging in canfd
|
||||||
|
|
||||||
- configure it so i can toggle experimental via lkas
|
- configure it so i can toggle experimental via lkas
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ class Controls:
|
|||||||
self.params_storage = Params("/persist/params")
|
self.params_storage = Params("/persist/params")
|
||||||
|
|
||||||
self.params_memory.put_bool("CPTLkasButtonAction", False)
|
self.params_memory.put_bool("CPTLkasButtonAction", False)
|
||||||
|
self.params_memory.put_bool("ScreenDisaplayMode", 0)
|
||||||
|
|
||||||
self.radarless_model = self.params.get("Model", encoding='utf-8') in RADARLESS_MODELS
|
self.radarless_model = self.params.get("Model", encoding='utf-8') in RADARLESS_MODELS
|
||||||
|
|
||||||
@@ -1239,16 +1240,21 @@ class Controls:
|
|||||||
|
|
||||||
def clearpilot_state_control(self, CC, CS):
|
def clearpilot_state_control(self, CC, CS):
|
||||||
if any(be.pressed and be.type == FrogPilotButtonType.lkas for be in CS.buttonEvents):
|
if any(be.pressed and be.type == FrogPilotButtonType.lkas for be in CS.buttonEvents):
|
||||||
self.params_memory.put_bool("CPTLkasButtonAction", True)
|
|
||||||
# if self.params_memory.get_bool("CPTLkasButtonAction"):
|
# if self.params_memory.get_bool("CPTLkasButtonAction"):
|
||||||
# self.params_memory.put_bool("CPTLkasButtonAction", False)
|
# self.params_memory.put_bool("CPTLkasButtonAction", False)
|
||||||
# else:
|
# else:
|
||||||
# self.params_memory.put_bool("CPTLkasButtonAction", True)
|
# self.params_memory.put_bool("CPTLkasButtonAction", True)
|
||||||
# CS.lkas_enabled = self.params_memory.get_bool("CPTLkasButtonAction")
|
|
||||||
|
# Rotate display mode. These are mostly used in the frontend ui app.
|
||||||
|
max_display_mode = 1
|
||||||
|
current_display_mode = self.params_memory.get_int("ScreenDisaplayMode")
|
||||||
|
current_display_mode = current_display_mode + 1
|
||||||
|
if current_display_mode > max_display_mode:
|
||||||
|
current_display_mode = 0
|
||||||
|
self.params_memory.put_int("ScreenDisaplayMode", current_display_mode)
|
||||||
|
|
||||||
# self.params_memory.put_int("SpeedLimitLatDesired", CC.actuators.speed * CV.MS_TO_MPH )
|
# self.params_memory.put_int("SpeedLimitLatDesired", CC.actuators.speed * CV.MS_TO_MPH )
|
||||||
# CC.actuators.speed
|
|
||||||
# print ("Alive")
|
|
||||||
return CC
|
return CC
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
@@ -213,6 +213,14 @@ void OnroadWindow::paintEvent(QPaintEvent *event) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OnroadWindow::update_screen_on_off() {
|
||||||
|
int screenDisaplayMode = paramsMemory.getInt("ScreenDisaplayMode");
|
||||||
|
if (screenDisaplayMode == 1) {
|
||||||
|
// Conditionally off
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ***** onroad widgets *****
|
// ***** onroad widgets *****
|
||||||
|
|
||||||
// OnroadAlerts
|
// OnroadAlerts
|
||||||
@@ -374,7 +382,19 @@ if (edgeColor != bgColor) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AnnotatedCameraWidget::drawHud(QPainter &p) {
|
void AnnotatedCameraWidget::drawHud(QPainter &p) {
|
||||||
|
// Blank when screenDisplayMode=1
|
||||||
p.save();
|
p.save();
|
||||||
|
|
||||||
|
int screenDisaplayMode = paramsMemory.getInt("ScreenDisaplayMode");
|
||||||
|
if (screenDisaplayMode == 1 && !alert->isVisible()) {
|
||||||
|
// Draw black, filled, full-size rectangle to blank the screen
|
||||||
|
// p.fillRect(0, 0, width(), height(), Qt::black);
|
||||||
|
// p.restore();
|
||||||
|
Hardware::set_display_power(false);
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
Hardware::set_display_power(true);
|
||||||
|
}
|
||||||
|
|
||||||
// Header gradient
|
// Header gradient
|
||||||
QLinearGradient bg(0, UI_HEADER_HEIGHT - (UI_HEADER_HEIGHT / 2.5), 0, UI_HEADER_HEIGHT);
|
QLinearGradient bg(0, UI_HEADER_HEIGHT - (UI_HEADER_HEIGHT / 2.5), 0, UI_HEADER_HEIGHT);
|
||||||
|
|||||||
Reference in New Issue
Block a user