Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion psa_car_controller/psacc/application/trip_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ def get_thermal_consumption(start, end):

@staticmethod
def get_elec_consumption(start, end):
return [start[LEVEL] - end[LEVEL], 0]
if start[LEVEL] is not None and end[LEVEL] is not None:
return [start[LEVEL] - end[LEVEL], 0]
return [0, 0]

@staticmethod
def get_hybrid_consumption(start, end):
Expand Down
Loading