alphaLongToggle=newParamControl("ExperimentalLongitudinalEnabled",tr("openpilot Longitudinal Control (Alpha)"),
alphaLongToggle=newParamControl("ExperimentalLongitudinalEnabled",tr("openpilot Longitudinal Control (Alpha)"),"","../assets/offroad/icon_speed_limit.png");
.arg(tr("WARNING: openpilot longitudinal control is in alpha for this car and will disable Automatic Emergency Braking (AEB)."))
updateToggles();
.arg(tr("On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. "
});
"Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.")),
"../assets/offroad/icon_speed_limit.png"
);
addItem(alphaLongToggle);
addItem(alphaLongToggle);
alphaLongToggle->setConfirmation(true,false);
alphaLongToggle->setConfirmation(true,false);
// Joystick and longitudinal maneuvers should be hidden on release branches
// Joystick and longitudinal maneuvers should be hidden on release branches
// also the toggles should be not available to change in onroad state
// also the toggles should be not available to change in onroad state
.arg(tr("WARNING: openpilot longitudinal control is in alpha for this car and will disable Automatic Emergency Braking (AEB)."))
.arg(tr("On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. "
"Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha."));
alphaLongToggle->setDescription("<b>"+tr("openpilot longitudinal control may come in a future update.")+"</b>");
}else{
if(is_release){
params.remove("ExperimentalLongitudinalEnabled");
alphaLongToggle->setEnabled(false);
alphaLongToggle->setDescription("<b>"+tr("An alpha version of openpilot longitudinal control can be tested, along with Experimental mode, on non-release branches.")+"</b>");
}
}
// The car already have openpilot longitudinal control and the toggle not is necessary
if(CP.getOpenpilotLongitudinalControl()){
alphaLongToggle->setVisible(false);
}
alphaLongToggle->refresh();
}else{
alphaLongToggle->setDescription("<b>"+tr("openpilot longitudinal control may come in a future update.")+"</b>");