Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix soc interval config #1131

Merged
merged 1 commit into from
Sep 20, 2023
Merged
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
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