mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-10-11 19:43:48 +08:00
ui: Speed limit cleanup
This commit is contained in:
@@ -702,8 +702,8 @@ void AnnotatedCameraWidget::updateState(const UIState &s) {
|
||||
slcSubTextSize = sl_inactive || sl_temp_inactive || sl_distance > 0 ? 25.0 : 27.0;
|
||||
mapSourcedSpeedLimit = lp_sp.getIsMapSpeedLimit();
|
||||
slcActive = !sl_inactive && !sl_temp_inactive;
|
||||
overSpeedLimit = (((speed_limit_slc + speed_limit_offset) < speed) && !sl_inactive && !sl_temp_inactive) ||
|
||||
((speed_limit_slc < speed) && (speed_limit_slc > 0.0) && (sl_inactive || sl_temp_inactive));
|
||||
overSpeedLimit = (std::nearbyint(speed_limit_slc + speed_limit_offset) < std::nearbyint(speed)) &&
|
||||
(std::nearbyint(speed_limit_slc + speed_limit_offset) > 0);
|
||||
|
||||
const float tsc_speed = lp_sp.getTurnSpeed() * (s.scene.is_metric ? MS_TO_KPH : MS_TO_MPH);
|
||||
const auto tscState = lp_sp.getTurnSpeedControlState();
|
||||
|
||||
Reference in New Issue
Block a user