body: add fuelGauge to body carState (#24386)

pull/24391/head
Keyvan Fatehi 3 years ago committed by GitHub
parent ec7cd74dc3
commit 0bbfc63c9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cereal
  2. 2
      selfdrive/car/body/carstate.py
  3. 2
      selfdrive/test/process_replay/ref_commit

@ -1 +1 @@
Subproject commit a1f97eaca24a04e778c2326e6c992b1e3943429a
Subproject commit 8e9e9d3ceef850c3c759ac39737bbfbd5801cea5

@ -20,6 +20,8 @@ class CarState(CarStateBase):
ret.steerFaultPermanent = any([cp.vl['VAR_VALUES']['MOTOR_ERR_L'], cp.vl['VAR_VALUES']['MOTOR_ERR_R'],
cp.vl['VAR_VALUES']['FAULT']])
ret.fuelGauge = cp.vl["BODY_DATA"]["BATT_PERCENTAGE"] / 100
# irrelevant for non-car
ret.gearShifter = car.CarState.GearShifter.drive
ret.cruiseState.enabled = True

@ -1 +1 @@
d17ecea1f071007193a8a1e1ececf78c96b9deac
9385014c512d253655f574d77fe1e07558f4157d
Loading…
Cancel
Save