Compiled on Apr.11,2024

This commit is contained in:
Comma Device
2024-04-11 10:33:32 +08:00
parent 2f3e6d4dea
commit a6f6ea0257
13 changed files with 27 additions and 8 deletions
+1
View File
@@ -1,5 +1,6 @@
Version 0.9.6 (2024-02-27)
========================
* 方向油门刹车状态 (2024-04-11)
* D档数字+导出日志 (2024-04-07)
* 指南针和车辆档位 (2024-04-06)
* 新手指南汉化完成 (2024-03-30)
+1
View File
@@ -187,6 +187,7 @@ struct CarState {
currentGearNumber @52 :Int16; # TEST ONSTAR GPS
nextGearNumber @53 :Int16; # TEST ONSTAR GPS
brakePressed2 @54 :Bool; # TEST_BRAKE_PEDAL
yawRate @22 :Float32; # best estimate of yaw rate
standstill @18 :Bool;
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

+5
View File
@@ -103,6 +103,11 @@ class CarState(CarStateBase):
# To avoid a cruise fault we need to use a conservative brake position threshold
# https://static.nhtsa.gov/odi/tsbs/2017/MC-10137629-9999.pdf
ret.brakePressed = ret.brake >= 8
# TEST_BRAKE_PEDAL
if self.CP.carFingerprint in SDGM_CAR:
ret.brakePressed2 = ret.brakePressed or ret.brake >= 8
else:
ret.brakePressed2 = ret.brakePressed
# Regen braking is braking
if self.CP.transmissionType == TransmissionType.direct:
+4 -1
View File
@@ -477,7 +477,10 @@ class Controls:
# safety mismatch allows some time for boardd to set the safety mode and publish it back from panda
if (safety_mismatch and self.sm.frame*DT_CTRL > 10.) or pandaState.safetyRxChecksInvalid or self.mismatch_counter >= 200:
self.events.add(EventName.controlsMismatch)
if self.random_events: #Show Controls Mismatch Error
self.events.add(EventName.controlsMismatch)
else: #Shown as GPS alert
self.events.add(EventName.noGps)
if log.PandaState.FaultType.relayMalfunction in pandaState.faults:
self.events.add(EventName.relayMalfunction)
+15 -7
View File
@@ -258,12 +258,20 @@ def calibration_incomplete_alert(CP: car.CarParams, CS: car.CarState, sm: messag
def no_gps_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert:
return Alert(
"Poor GPS reception",
"Hardware malfunctioning if sky is visible",
AlertStatus.normal, AlertSize.mid,
Priority.LOWER, VisualAlert.none, AudibleAlert.none, .2, creation_delay=300.)
params = Params()
random_events = params.get_bool("RandomEvents")
if random_events: #Normal GPS Error
return Alert(
"Poor GPS reception",
"Hardware malfunctioning if sky is visible",
AlertStatus.normal, AlertSize.mid,
Priority.LOWER, VisualAlert.none, AudibleAlert.none, .2, creation_delay=300.)
else: #Show Controls Mismatch Error
return Alert(
"Controls Mismatch",
"请谨慎驾驶,人工接管方向盘",
AlertStatus.normal, AlertSize.mid,
Priority.LOWER, VisualAlert.none, AudibleAlert.none, .2, creation_delay=300.)
def torque_nn_load_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert:
model_name = params_memory.get("NNFFModelName")
@@ -751,7 +759,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, AlertCallbackType]]] = {
},
EventName.noGps: {
#ET.PERMANENT: no_gps_alert,
ET.PERMANENT: no_gps_alert,
},
EventName.soundsUnavailable: {
+1
View File
@@ -286,6 +286,7 @@ def manager_init() -> None:
("CalibrationCycles", "1"),
("OnStarGPS", "0"),
("GearNumber", "0"), #GEAR_NUMBER_TEST
("GearNumber", "0"), #FROGPILOT_PREBUILT_TEST
]
if not PC:
default_params.append(("LastUpdateTime", datetime.datetime.utcnow().isoformat().encode('utf8')))
Binary file not shown.
BIN
View File
Binary file not shown.