Compare commits

...

3 Commits

Author SHA1 Message Date
机械小鸽
b1cb459bd9
回放 2025-06-14 21:18:29 +08:00
机械小鸽
ea23209348
汉化 2025-06-14 16:03:07 +08:00
机械小鸽
0f8a46cfd6
mazda 2025-06-14 15:09:27 +08:00
37 changed files with 12 additions and 5 deletions

View File

@ -24,6 +24,7 @@ class CarState(CarStateBase):
self.prev_distance_button = 0
self.distance_button = 0
self.pcmCruiseGap = 0 # copy from Hyundai
def update(self, can_parsers) -> structs.CarState:
cp = can_parsers[Bus.pt]
@ -61,6 +62,12 @@ class CarState(CarStateBase):
can_gear = int(cp.vl["GEAR"]["GEAR"])
ret.gearShifter = self.parse_gear_shifter(self.shifter_values.get(can_gear, None))
ret.gearStep = cp.vl["GEAR"]["GEAR_BOX"]
ret.engineRpm = cp.vl["ENGINE_DATA"]["RPM"] # for mazda RPM
# 将CAN总线上的DISTANCE_SETTING值转换为与车辆显示一致的值
can_distance_setting = cp.vl["CRZ_CTRL"]["DISTANCE_SETTING"]
# 假设最大值为4使用5减去CAN值来获取正确的显示值
ret.pcmCruiseGap = 5 - can_distance_setting if 1 <= can_distance_setting <= 4 else can_distance_setting
ret.genericToggle = bool(cp.vl["BLINK_INFO"]["HIGH_BEAMS"])
ret.leftBlindspot = cp.vl["BSM"]["LEFT_BS_STATUS"] != 0

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -130,7 +130,7 @@ class Soundd:
if self.lang == "main_ko":
wavefile = wave.open(BASEDIR + "/selfdrive/assets/sounds/" + filename, 'r')
else:
wavefile = wave.open(BASEDIR + "/selfdrive/assets/sounds_eng/" + filename, 'r')
wavefile = wave.open(BASEDIR + "/selfdrive/assets/sounds_chs/" + filename, 'r')
#assert wavefile.getnchannels() == 1
assert wavefile.getsampwidth() == 2