mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-27 09:53:45 +08:00
Slooooow doooooown
This commit is contained in:
@@ -45,7 +45,7 @@ void HudRenderer::updateState(const UIState &s) {
|
||||
float v_ego = v_ego_cluster_seen && !starpilot_toggles.value("use_wheel_speed").toBool() ? car_state.getVEgoCluster() : car_state.getVEgo();
|
||||
speed = std::max<float>(0.0f, v_ego * (is_metric ? MS_TO_KPH : MS_TO_MPH));
|
||||
|
||||
navigation_enabled = params.getBool("NavigationUI");
|
||||
navigation_enabled = s.scene.navigation_enabled;
|
||||
navigation_valid = false;
|
||||
navigation_has_next = false;
|
||||
nav_primary_text.clear();
|
||||
|
||||
@@ -301,6 +301,7 @@ static void update_state(UIState *s, StarPilotUIState *fs) {
|
||||
void ui_update_params(UIState *s) {
|
||||
auto params = Params();
|
||||
s->scene.is_metric = params.getBool("IsMetric");
|
||||
s->scene.navigation_enabled = params.getBool("NavigationUI");
|
||||
}
|
||||
|
||||
void UIState::updateStatus(StarPilotUIState *fs) {
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ typedef struct UIScene {
|
||||
cereal::LongitudinalPersonality personality;
|
||||
|
||||
float light_sensor = -1;
|
||||
bool started, ignition, is_metric, recording_audio;
|
||||
bool started, ignition, is_metric, recording_audio, navigation_enabled;
|
||||
uint64_t started_frame;
|
||||
} UIScene;
|
||||
|
||||
|
||||
@@ -224,7 +224,8 @@ void StarPilotAnnotatedCameraWidget::updateState(const UIState &s, const StarPil
|
||||
speedLimitSource = starpilotPlan.getSlcSpeedLimitSource();
|
||||
stoppingDistance = modelV2.getPosition().getX().size() > 33 - 1 ? modelV2.getPosition().getX()[33 - 1] : 0.0;
|
||||
unconfirmedSpeedLimit = starpilotPlan.getUnconfirmedSlcSpeedLimit();
|
||||
visionSpeedLimit = params.getBool("VisionSpeedLimitDetection") ? params_memory.getFloat("VisionSpeedLimit") : 0.0;
|
||||
const bool cachedVisionSpeedLimitDetection = starpilot_toggles.value("vision_speed_limit_detection").toBool();
|
||||
visionSpeedLimit = cachedVisionSpeedLimitDetection ? params_memory.getFloat("VisionSpeedLimit") : 0.0;
|
||||
weatherDaytime = starpilotPlan.getWeatherDaytime();
|
||||
weatherId = starpilotPlan.getWeatherId();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user