remove Long Accel pid, fix alert (#160)

* test socketmaster...

* remove LongVelocityControl

* fix.. doorOpen, seatBelt...

* fix..  steerTemp alert
This commit is contained in:
carrot 2025-05-05 09:08:33 +09:00 committed by GitHub
parent f97149e1b5
commit 5e13f23049
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 7 additions and 31 deletions

View File

@ -47,6 +47,9 @@ SubMaster::SubMaster(const std::vector<const char *> &service_list, const std::v
const char *address, const std::vector<const char *> &ignore_alive) {
poller_ = Poller::create();
for (auto name : service_list) {
if (services.count(std::string(name)) == 0) {
printf("Unknown service name: %s\n", name);
}
assert(services.count(std::string(name)) > 0);
service serv = services.at(std::string(name));

View File

@ -207,7 +207,6 @@ inline static std::unordered_map<std::string, uint32_t> keys = {
{"LongTuningKiV", PERSISTENT},
{"LongTuningKf", PERSISTENT},
{"LongActuatorDelay", PERSISTENT },
{"LongVelocityControl", PERSISTENT},
{"VEgoStopping", PERSISTENT },
{"RadarReactionFactor", PERSISTENT},
{"EnableRadarTracks", PERSISTENT},

View File

@ -463,7 +463,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
"조향제어 일시적 불가능",
"",
AlertStatus.userPrompt, AlertSize.small,
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.prompt, 1.8),
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, 1.8),
},
EventName.preDriverDistracted: {
@ -773,24 +773,13 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
},
EventName.doorOpen: {
#ET.SOFT_DISABLE: user_soft_disable_alert("Door Open"),
ET.USER_DISABLE: EngagementAlert(AudibleAlert.disengage),
ET.SOFT_DISABLE: user_soft_disable_alert("도어 열림"),
ET.NO_ENTRY: NoEntryAlert("도어 열림"),
ET.PERMANENT: Alert(
"도어 열림",
"",
AlertStatus.normal, AlertSize.full,
Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .2, creation_delay=0.5),
},
EventName.seatbeltNotLatched: {
ET.SOFT_DISABLE: user_soft_disable_alert("안전벨트를 착용해주세요"),
ET.NO_ENTRY: NoEntryAlert("안전벨트를 착용해주세요"),
ET.PERMANENT: Alert(
"안전벨트 미착용",
"",
AlertStatus.normal, AlertSize.full,
Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .2, creation_delay=0.5),
},
EventName.espDisabled: {

View File

@ -443,19 +443,6 @@
"default": 20,
"unit": 5
},
{
"group": "주행튜닝",
"name": "LongVelocityControl",
"title": "LongVelocityControl(1)",
"descr": "0: Accel PID, 1: Velocity PID",
"egroup": "LONG",
"etitle": "LongVelocityControl(1)",
"edescr": "0: Accel PID, 1: Velocity PID",
"min": 0,
"max": 1,
"default": 1,
"unit": 1
},
{
"group": "주행튜닝",
"name": "VEgoStopping",

View File

@ -74,7 +74,7 @@ class LongControl:
soft_hold_active = CS.softHoldActive > 0
a_target = long_plan.aTarget
should_stop = long_plan.shouldStop
velocity_pid = self.params.get_float("LongVelocityControl")
velocity_pid = True
long_delay = self.params.get_float("LongActuatorDelay")*0.01 + t_since_plan
speeds = long_plan.speeds

View File

@ -674,7 +674,6 @@ CarrotPanel::CarrotPanel(QWidget* parent) : QWidget(parent) {
latLongToggles->addItem(new CValueControl("LongTuningKiV", "LONG: I Gain(0)", "", "../assets/offroad/icon_logic.png", 0, 2000, 5));
latLongToggles->addItem(new CValueControl("LongTuningKf", "LONG: FF Gain(100)", "", "../assets/offroad/icon_logic.png", 0, 200, 5));
latLongToggles->addItem(new CValueControl("LongActuatorDelay", "LONG: ActuatorDelay(20)", "", "../assets/offroad/icon_logic.png", 0, 200, 5));
latLongToggles->addItem(new CValueControl("LongVelocityControl", "LONG: VelocityControl(1)", "0:AccelPID, 1:VelocityPID", "../assets/offroad/icon_logic.png", 0, 1, 1));
latLongToggles->addItem(new CValueControl("VEgoStopping", "LONG: VEgoStopping(50)", "Stopping factor", "../assets/offroad/icon_logic.png", 1, 100, 5));
latLongToggles->addItem(new CValueControl("RadarReactionFactor", "LONG: Radar reaction factor(10)", "", "../assets/offroad/icon_logic.png", 0, 200, 10));
//latLongToggles->addItem(new CValueControl("StartAccelApply", "LONG: StartingAccel 2.0x(0)%", "정지->출발시 가속도의 가속율을 지정합니다 0: 사용안함.", "../assets/offroad/icon_road.png", 0, 100, 10));

View File

@ -104,7 +104,6 @@ def get_default_params():
("LongTuningKiV", "0"),
("LongTuningKf", "100"),
("LongActuatorDelay", "20"),
("LongVelocityControl", "1"),
("VEgoStopping", "50"),
("RadarReactionFactor", "10"),
("EnableRadarTracks", "0"),