Skip to content

Commit

Permalink
Merge pull request #1131 from LKuemmel/fix
Browse files Browse the repository at this point in the history
fix soc interval config
  • Loading branch information
LKuemmel authored Sep 20, 2023
2 parents bca9e25 + 5b41428 commit 5619a86
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/modules/common/configurable_vehicle.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import TypeVar, Generic, Callable
from typing import Optional, TypeVar, Generic, Callable

from modules.common import store
from modules.common.abstract_soc import SocUpdateData
Expand All @@ -24,10 +24,13 @@ def __init__(self,
vehicle_config: T_VEHICLE_CONFIG,
component_updater: Callable[[T_VEHICLE_CONFIG, SocUpdateData], CarState],
vehicle: int,
interval_config: IntervalConfig = IntervalConfig()) -> None:
interval_config: Optional[IntervalConfig] = None) -> None:
self.__component_updater = component_updater
self.vehicle_config = vehicle_config
self.interval_config = interval_config
if interval_config is None:
self.interval_config = IntervalConfig()
else:
self.interval_config = interval_config
self.vehicle = vehicle
self.store = store.get_car_value_store(self.vehicle)
self.component_info = ComponentInfo(self.vehicle, self.vehicle_config.name, "vehicle")
Expand Down

0 comments on commit 5619a86

Please sign in to comment.