add mazda info
This commit is contained in:
parent
4483bb7a73
commit
aacaef9a2c
@ -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,9 @@ 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
|
||||||
|
ret.pcmCruiseGap = cp.vl["CRZ_CTRL"]["DISTANCE_SETTING"] # copy from Hyundai
|
||||||
|
|
||||||
|
|
||||||
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
|
||||||
|
@ -490,7 +490,7 @@ def carinfo():
|
|||||||
"Running Status": "Moving" if is_car_started else "Stopped",
|
"Running Status": "Moving" if is_car_started else "Stopped",
|
||||||
"Cruise System": "Enabled" if is_car_engaged else "Disabled",
|
"Cruise System": "Enabled" if is_car_engaged else "Disabled",
|
||||||
"Current Speed": f"{CS.vEgo * 3.6:.1f} km/h",
|
"Current Speed": f"{CS.vEgo * 3.6:.1f} km/h",
|
||||||
"Engine RPM": f"{CS.engineRPM:.0f} RPM" if hasattr(CS, 'engineRPM') and CS.engineRPM > 0 else "Unknown",
|
"Engine RPM": f"{CS.engineRpm:.0f} RPM" if hasattr(CS, 'engineRpm') and CS.engineRpm > 0 else "Unknown", # Rpm, not RPM
|
||||||
"Gear Position": str(CS.gearShifter) if hasattr(CS, 'gearShifter') else "Unknown"
|
"Gear Position": str(CS.gearShifter) if hasattr(CS, 'gearShifter') else "Unknown"
|
||||||
},
|
},
|
||||||
"Basic Information": {
|
"Basic Information": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user