Skip to content

Commit

Permalink
Change range to km (#97)
Browse files Browse the repository at this point in the history
* Change range to km

* replace ruptela range with battery range
  • Loading branch information
KevinJoiner authored Nov 14, 2024
1 parent 4dc197e commit d97e92c
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 66 deletions.
55 changes: 1 addition & 54 deletions pkg/ruptela/schema/ruptela-definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,22 @@
- originalName: "signals.960" # OBD tire pressure front left
originalType: string

requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.Chassis.Axle.Row1.Wheel.Right.Tire.Pressure
conversions:
- originalName: "signals.961" # OBD tire pressure front right
originalType: string

requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.Chassis.Axle.Row2.Wheel.Left.Tire.Pressure
conversions:
- originalName: "signals.962" # OBD tire pressure rear left
originalType: string

requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.Chassis.Axle.Row2.Wheel.Right.Tire.Pressure
conversions:
- originalName: "signals.963" # OBD tire pressure rear right
originalType: string

requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.CurrentLocation.Altitude
conversions:
Expand Down Expand Up @@ -58,78 +48,57 @@
originalType: string
# - originalName: "signals.89" # CAN ambient air temperature
# originalType: string
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.OBD.RunTime
conversions:
- originalName: "signals.107" # OBD time since engine start
originalType: string
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.Powertrain.CombustionEngine.ECT
conversions:
- originalName: "signals.96" # OBD engine coolant temperature
originalType: string
# - originalName: "signals.115" # CAN engine coolant temperature
# originalType: string
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.Powertrain.CombustionEngine.EngineOilLevel
conversions:
- originalName: "signals.964" # OBD Oil Life remaining
originalType: string
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.Powertrain.CombustionEngine.EngineOilRelativeLevel
conversions:
- originalName: "signals.964" # OBD Oil Life remaining
originalType: string
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.Powertrain.CombustionEngine.TPS
conversions:
- originalName: "signals.103" # OBD accelerator pedal position
originalType: string
# - originalName: "signals.206" # CAN accelerator pedal position 1
# originalType: string
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.Powertrain.FuelSystem.AbsoluteLevel
conversions:
- originalName: "signals.642" # OBD Fuel Level, L
originalType: string
- originalName: "signals.205" # CAN Fuel level liters
originalType: string
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.Powertrain.FuelSystem.RelativeLevel
conversions:
- originalName: "signals.98" # OBD fuel level
originalType: string
- originalName: "signals.207" # CAN fuel level1
originalType: string
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA



- vspecName: Vehicle.Powertrain.Range
- vspecName: Vehicle.Powertrain.TractionBattery.Range
conversions:
- originalName: "signals.723" # OBD EV Distance until recharge
originalType: string
# - originalName: "signals.516" # CAN EV Distance until recharge
# originalType: stringX
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA




- vspecName: Vehicle.Powertrain.TractionBattery.StateOfCharge.Current
Expand All @@ -138,88 +107,66 @@
originalType: string
# - originalName: "signals.515" # CAN EV State of charge % (SOC)
# originalType: string
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.Powertrain.Transmission.TravelledDistance
conversions:
- originalName: "signals.645" # OBD Odometer, Km
originalType: string
- originalName: "signals.114" # CAN high resolution total vehicle distance
originalType: string
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.Powertrain.Type
conversions:
- originalName: "signals.99" # OBD fuel type
originalType: string
- originalName: "signals.483" # Can fuel type
originalType: string
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.Speed
conversions:
- originalName: "signals.95" # OBD vehicle speed
originalType: string
- originalName: "pos.spd"
originalType: float64
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.DIMO.Aftermarket.HDOP
conversions:
- originalName: pos.hdop
originalType: float64
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.DIMO.Aftermarket.NSAT
conversions:
- originalName: pos.sat
originalType: float64
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.OBD.DistanceWithMIL
conversions:
- originalName: "signals.102" # OBD distance traveled while MIL is activated
originalType: string
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.LowVoltageBattery.CurrentVoltage
conversions:
- originalName: "signals.29"
originalType: string
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.Powertrain.CombustionEngine.Speed
conversions:
- originalName: "signals.94" # OBD Engine Speed
originalType: string
# - originalName: "signals.197" # CAN engine speed
# originalType: string
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.Powertrain.CombustionEngine.DieselExhaustFluid.Capacity
conversions:
- originalName: "signals.1148" # OBD AdBlue capacity
originalType: string
- originalName: "signals.1149" # CAN AdBlue capacity
originalType: string
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

- vspecName: Vehicle.Powertrain.CombustionEngine.DieselExhaustFluid.Level
conversions:
- originalName: "signals.1150" # OBD AdBlue level
originalType: string
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA

# TODO we only get batteryCapacity in percent SOH
# - vspecName: Vehicle.Powertrain.TractionBattery.GrossCapacity
Expand Down
3 changes: 2 additions & 1 deletion pkg/ruptela/status/payload-status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ var (
"642": "FFFF",
"645": "FFFFFFFF",
"722": "FF",
"723": "FFFF",
"723": "EA42",
"754": "FB8F",
"92": "0",
"93": "0",
Expand Down Expand Up @@ -106,5 +106,6 @@ var (
{TokenID: 33, Timestamp: ts, Name: vss.FieldPowertrainCombustionEngineTPS, ValueNumber: 0, Source: "ruptela/TODO"},
{TokenID: 33, Timestamp: ts, Name: vss.FieldPowertrainTransmissionTravelledDistance, ValueNumber: 8, Source: "ruptela/TODO"},
{TokenID: 33, Timestamp: ts, Name: vss.FieldSpeed, ValueNumber: 0, Source: "ruptela/TODO"},
{TokenID: 33, Timestamp: ts, Name: vss.FieldPowertrainTractionBatteryRange, ValueNumber: 59.97, Source: "ruptela/TODO"},
}
)
9 changes: 5 additions & 4 deletions pkg/ruptela/vehicle-convert-funcs_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions pkg/ruptela/vehicle-v1-convert_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pkg/schema/spec/default-definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
- vspecName: Vehicle.Powertrain.TractionBattery.GrossCapacity
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA
- vspecName: Vehicle.Powertrain.TractionBattery.Range
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA
- vspecName: Vehicle.Powertrain.TractionBattery.StateOfCharge.Current
requiredPrivileges:
- VEHICLE_NON_LOCATION_DATA
Expand Down
2 changes: 2 additions & 0 deletions pkg/vss/vehicle-structs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d97e92c

Please sign in to comment.