Compare commits
3 Commits
efee1712aa
...
b1cb459bd9
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b1cb459bd9 | ||
![]() |
ea23209348 | ||
![]() |
0f8a46cfd6 |
@ -24,6 +24,7 @@ class CarState(CarStateBase):
|
|||||||
|
|
||||||
self.prev_distance_button = 0
|
self.prev_distance_button = 0
|
||||||
self.distance_button = 0
|
self.distance_button = 0
|
||||||
|
self.pcmCruiseGap = 0 # copy from Hyundai
|
||||||
|
|
||||||
def update(self, can_parsers) -> structs.CarState:
|
def update(self, can_parsers) -> structs.CarState:
|
||||||
cp = can_parsers[Bus.pt]
|
cp = can_parsers[Bus.pt]
|
||||||
@ -61,6 +62,12 @@ class CarState(CarStateBase):
|
|||||||
can_gear = int(cp.vl["GEAR"]["GEAR"])
|
can_gear = int(cp.vl["GEAR"]["GEAR"])
|
||||||
ret.gearShifter = self.parse_gear_shifter(self.shifter_values.get(can_gear, None))
|
ret.gearShifter = self.parse_gear_shifter(self.shifter_values.get(can_gear, None))
|
||||||
ret.gearStep = cp.vl["GEAR"]["GEAR_BOX"]
|
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.genericToggle = bool(cp.vl["BLINK_INFO"]["HIGH_BEAMS"])
|
||||||
ret.leftBlindspot = cp.vl["BSM"]["LEFT_BS_STATUS"] != 0
|
ret.leftBlindspot = cp.vl["BSM"]["LEFT_BS_STATUS"] != 0
|
||||||
|
BIN
selfdrive/assets/sounds_chs/audio_1.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_1.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_10.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_10.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_2.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_2.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_3.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_3.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_4.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_4.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_5.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_5.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_6.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_6.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_7.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_7.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_8.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_8.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_9.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_9.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_auto_hold.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_auto_hold.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_car_watchout.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_car_watchout.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_disengage.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_disengage.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_engage.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_engage.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_lane_change.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_lane_change.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_lanechange.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_lanechange.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_speed_down.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_speed_down.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_stopping.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_stopping.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_stopstop.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_stopstop.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_traffic_error.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_traffic_error.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_turn.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_turn.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/audio_turn2.wav
Normal file
BIN
selfdrive/assets/sounds_chs/audio_turn2.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/disengage.wav
Normal file
BIN
selfdrive/assets/sounds_chs/disengage.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/engage.wav
Normal file
BIN
selfdrive/assets/sounds_chs/engage.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/nnff.wav
Normal file
BIN
selfdrive/assets/sounds_chs/nnff.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/prompt.wav
Normal file
BIN
selfdrive/assets/sounds_chs/prompt.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/prompt_distracted.wav
Normal file
BIN
selfdrive/assets/sounds_chs/prompt_distracted.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/refuse.wav
Normal file
BIN
selfdrive/assets/sounds_chs/refuse.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/reverse_gear.wav
Normal file
BIN
selfdrive/assets/sounds_chs/reverse_gear.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/tici_disengaged.wav
Normal file
BIN
selfdrive/assets/sounds_chs/tici_disengaged.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/tici_engaged.wav
Normal file
BIN
selfdrive/assets/sounds_chs/tici_engaged.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/traffic_sign_changed.wav
Normal file
BIN
selfdrive/assets/sounds_chs/traffic_sign_changed.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/traffic_sign_green.wav
Normal file
BIN
selfdrive/assets/sounds_chs/traffic_sign_green.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/warning_immediate.wav
Normal file
BIN
selfdrive/assets/sounds_chs/warning_immediate.wav
Normal file
Binary file not shown.
BIN
selfdrive/assets/sounds_chs/warning_soft.wav
Normal file
BIN
selfdrive/assets/sounds_chs/warning_soft.wav
Normal file
Binary file not shown.
@ -130,7 +130,7 @@ class Soundd:
|
|||||||
if self.lang == "main_ko":
|
if self.lang == "main_ko":
|
||||||
wavefile = wave.open(BASEDIR + "/selfdrive/assets/sounds/" + filename, 'r')
|
wavefile = wave.open(BASEDIR + "/selfdrive/assets/sounds/" + filename, 'r')
|
||||||
else:
|
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.getnchannels() == 1
|
||||||
assert wavefile.getsampwidth() == 2
|
assert wavefile.getsampwidth() == 2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user