Acceleration path
Added toggle to always show the vehicle's acceleration/deceleration via the onroad UI path.
This commit is contained in:
@@ -501,7 +501,7 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
||||
|
||||
// paint path
|
||||
QLinearGradient bg(0, height(), 0, 0);
|
||||
if (sm["controlsState"].getControlsState().getExperimentalMode()) {
|
||||
if (sm["controlsState"].getControlsState().getExperimentalMode() || scene.acceleration_path) {
|
||||
// The first half of track_vertices are the points for the right side of the path
|
||||
// and the indices match the positions of accel from uiPlan
|
||||
const auto &acceleration = sm["uiPlan"].getUiPlan().getAccel();
|
||||
|
||||
@@ -244,6 +244,7 @@ void ui_update_frogpilot_params(UIState *s) {
|
||||
UIScene &scene = s->scene;
|
||||
|
||||
bool custom_onroad_ui = params.getBool("CustomUI");
|
||||
scene.acceleration_path = custom_onroad_ui && params.getBool("AccelerationPath");
|
||||
|
||||
bool quality_of_life_controls = params.getBool("QOLControls");
|
||||
|
||||
|
||||
@@ -167,6 +167,7 @@ typedef struct UIScene {
|
||||
uint64_t started_frame;
|
||||
|
||||
// FrogPilot variables
|
||||
bool acceleration_path;
|
||||
bool enabled;
|
||||
bool experimental_mode;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user