del VagSpeed
This commit is contained in:
parent
d7550b8431
commit
64454baccf
|
@ -260,8 +260,8 @@ std::unordered_map<std::string, uint32_t> keys = {
|
|||
{"speedoverreminderstatus", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
|
||||
{"NavReminderstatus", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
|
||||
{"GreenLightReminderstatus", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
|
||||
{"VagSpeed", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
|
||||
{"VagSpeedFactor", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
|
||||
// {"VagSpeed", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
|
||||
// {"VagSpeedFactor", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
|
||||
{"ScreenBrightnesspre", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
|
||||
{"NavReminder", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
|
||||
{"navTurn", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
|
||||
|
|
|
@ -23,8 +23,8 @@ class CarState(CarStateBase):
|
|||
#############################
|
||||
self.params = Params()
|
||||
|
||||
vsf = self.params.get_int("VagSpeedFactor")/2
|
||||
self.vagspeedfactor = (110 +vsf) /110
|
||||
# vsf = self.params.get_int("VagSpeedFactor")/2
|
||||
# self.vagspeedfactor = (110 +vsf) /110
|
||||
# self.dt = 0.0
|
||||
# self.dt_prev = 0.0
|
||||
# self.usefuel_prev = 0
|
||||
|
@ -72,7 +72,7 @@ class CarState(CarStateBase):
|
|||
pt_cp.vl["ESP_19"]["ESP_HR_Radgeschw_02"],
|
||||
)
|
||||
##########儀表時速與C3同步############
|
||||
ret.vEgoRaw = float(np.mean([ret.wheelSpeeds.fl, ret.wheelSpeeds.fr, ret.wheelSpeeds.rl, ret.wheelSpeeds.rr])* self.vagspeedfactor)
|
||||
ret.vEgoRaw = float(np.mean([ret.wheelSpeeds.fl, ret.wheelSpeeds.fr, ret.wheelSpeeds.rl, ret.wheelSpeeds.rr]))
|
||||
####################################
|
||||
ret.vEgo, ret.aEgo = self.update_speed_kf(ret.vEgoRaw)
|
||||
ret.standstill = ret.vEgoRaw == 0
|
||||
|
|
|
@ -385,8 +385,8 @@ frogpilot_default_params: list[tuple[str, str | bytes]] = [
|
|||
("Speeddistance", "1"),
|
||||
("speedoverreminderstatus", "0"),
|
||||
("TrafficModespeed", "50"),
|
||||
("VagSpeed", "1"),
|
||||
("VagSpeedFactor", "13")
|
||||
# ("VagSpeed", "1"),
|
||||
# ("VagSpeedFactor", "13")
|
||||
##############################################
|
||||
]
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ FrogPilotHFOPPanel::FrogPilotHFOPPanel(FrogPilotSettingsWindow *parent) : FrogPi
|
|||
// {"Fuelprice", "油價計算", "啟動後會計算油費.", "../frogpilot/assets/toggle_icons/icon_light.png"},
|
||||
// {"Fuelcosts", "油價設定", "設定車輛使用油種與價格.", ""},
|
||||
|
||||
{"VagSpeed", "時速差調整", "VAG專用。調整車錶速度與C3定速設定不同步的問題。", "../assets/offroad/icon_openpilot.png"},
|
||||
{"VagSpeedFactor", " 時速差調整", "請輸入OP定速為110時儀表板的速度差值.", ""},
|
||||
// {"VagSpeed", "時速差調整", "VAG專用。調整車錶速度與C3定速設定不同步的問題。", "../assets/offroad/icon_openpilot.png"},
|
||||
// {"VagSpeedFactor", " 時速差調整", "請輸入OP定速為110時儀表板的速度差值.", ""},
|
||||
|
||||
{"Disablestartstop", "取消怠速熄火", "開啟後將強制關閉怠速熄火功能.", "../assets/offroad/icon_warning.png"},
|
||||
|
||||
|
@ -66,14 +66,14 @@ FrogPilotHFOPPanel::FrogPilotHFOPPanel(FrogPilotSettingsWindow *parent) : FrogPi
|
|||
hfopcontrolsToggle = new FrogPilotParamValueControl(param, title, desc, icon, 0, 60, "公里");
|
||||
|
||||
|
||||
} else if (param == "VagSpeed") {
|
||||
FrogPilotParamManageControl *VagSpeedToggle = new FrogPilotParamManageControl(param, title, desc, icon);
|
||||
QObject::connect(VagSpeedToggle, &FrogPilotParamManageControl::manageButtonClicked, [this]() {
|
||||
showToggles(VagSpeedKeys);
|
||||
});
|
||||
hfopcontrolsToggle = VagSpeedToggle;
|
||||
} else if (param == "VagSpeedFactor") {
|
||||
hfopcontrolsToggle = new FrogPilotParamValueControl(param, title, desc, icon, 0, 20, "公里");
|
||||
// } else if (param == "VagSpeed") {
|
||||
// FrogPilotParamManageControl *VagSpeedToggle = new FrogPilotParamManageControl(param, title, desc, icon);
|
||||
// QObject::connect(VagSpeedToggle, &FrogPilotParamManageControl::manageButtonClicked, [this]() {
|
||||
// showToggles(VagSpeedKeys);
|
||||
// });
|
||||
// hfopcontrolsToggle = VagSpeedToggle;
|
||||
// } else if (param == "VagSpeedFactor") {
|
||||
// hfopcontrolsToggle = new FrogPilotParamValueControl(param, title, desc, icon, 0, 20, "公里");
|
||||
|
||||
} else if (param == "AutoACC") {
|
||||
FrogPilotParamManageControl *AutoACCToggle = new FrogPilotParamManageControl(param, title, desc, icon);
|
||||
|
@ -154,7 +154,7 @@ void FrogPilotHFOPPanel::hideToggles() {
|
|||
for (auto &[key, toggle] : toggles) {
|
||||
bool subToggles = //FuelpriceKeys.find(key) != FuelpriceKeys.end() ||
|
||||
TrafficModeKeys.find(key) != TrafficModeKeys.end() ||
|
||||
VagSpeedKeys.find(key) != VagSpeedKeys.end() ||
|
||||
// VagSpeedKeys.find(key) != VagSpeedKeys.end() ||
|
||||
AutoACCKeys.find(key) != AutoACCKeys.end() ||
|
||||
RoadKeys.find(key) != RoadKeys.end() ||
|
||||
NavspeedKeys.find(key) != NavspeedKeys.end() ||
|
||||
|
|
|
@ -18,7 +18,7 @@ private:
|
|||
|
||||
// std::set<QString> FuelpriceKeys = {"Fuelcosts"};
|
||||
std::set<QString> TrafficModeKeys = {"TrafficModespeed"};
|
||||
std::set<QString> VagSpeedKeys = {"VagSpeedFactor"};
|
||||
// std::set<QString> VagSpeedKeys = {"VagSpeedFactor"};
|
||||
std::set<QString> AutoACCKeys = {"AutoACCspeed", "AutoACCCarAway", "AutoACCGreenLight"};
|
||||
std::set<QString> RoadKeys = {"AutoRoadtype","RoadtypeProfile"};
|
||||
std::set<QString> NavspeedKeys = {"NavReminder", "speedoverreminder", "speedreminderreset"};
|
||||
|
|
Loading…
Reference in New Issue