mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-29 17:13:43 +08:00
ui: Hide Custom Stock Longitudinal Control if not available (#319)
This commit is contained in:
@@ -185,7 +185,7 @@ void TogglesPanel::updateToggles() {
|
||||
if (!CP.getCustomStockLongAvailable()) {
|
||||
params.remove("CustomStockLongControl");
|
||||
}
|
||||
custom_stock_long_toggle->setEnabled(CP.getCustomStockLongAvailable());
|
||||
custom_stock_long_toggle->setVisible(CP.getCustomStockLongAvailable());
|
||||
|
||||
if (hasLongitudinalControl(CP)) {
|
||||
// normal description and toggle
|
||||
@@ -221,7 +221,7 @@ void TogglesPanel::updateToggles() {
|
||||
} else {
|
||||
experimental_mode_toggle->setDescription(e2e_description);
|
||||
op_long_toggle->setVisible(false);
|
||||
custom_stock_long_toggle->setEnabled(false);
|
||||
custom_stock_long_toggle->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user