Skip to content

Commit

Permalink
abrp fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tillsteinbach committed Mar 3, 2024
1 parent 5297118 commit e7cb65c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vwsfriend/vwsfriend/agents/abrp/abrp_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ def commit(self): # noqa: C901
if self.weConnectVehicle.statusExists('measurements', 'temperatureBatteryStatus') \
and self.weConnectVehicle.domains['measurements']['temperatureBatteryStatus'].enabled:
temperatureBatteryStatus = self.weConnectVehicle.domains['measurements']['temperatureBatteryStatus']
if temperatureBatteryStatus.temperatureHvBatteryMin_K.enabled and odometerMeasurement.temperatureHvBatteryMin_K is not None \
and temperatureBatteryStatus.temperatureHvBatteryMax_K.enabled and odometerMeasurement.temperatureHvBatteryMax_K is not None:
self.telemetryData['batt_temp'] = (kelvinToCelsius(odometerMeasurement.temperatureHvBatteryMin_K.value)
+ kelvinToCelsius(odometerMeasurement.temperatureHvBatteryMax_K.value)) / 2
if temperatureBatteryStatus.temperatureHvBatteryMin_K.enabled and temperatureBatteryStatus.temperatureHvBatteryMin_K is not None \
and temperatureBatteryStatus.temperatureHvBatteryMax_K.enabled and temperatureBatteryStatus.temperatureHvBatteryMax_K is not None:
self.telemetryData['batt_temp'] = (kelvinToCelsius(temperatureBatteryStatus.temperatureHvBatteryMin_K.value)
+ kelvinToCelsius(temperatureBatteryStatus.temperatureHvBatteryMax_K.value)) / 2

if self.weConnectVehicle.statusExists('charging', 'chargingStatus') \
and self.weConnectVehicle.domains['charging']['chargingStatus'].enabled:
Expand Down

0 comments on commit e7cb65c

Please sign in to comment.