Repository navigation
SoC: Module können kürzeres Abfrageintervall vorgeben - #4147
Conversation
|
Hallo @LKuemmel, danke, ich werde mir das ansehen und testen. |
rleidner
left a comment
There was a problem hiding this comment.
tested changes with current master - no issues.
f693f27 to
df25a6c
Compare
There was a problem hiding this comment.
🟡 Changes recommended
A moderate active issue remains because overrides between 0 and 5 seconds become non-positive after the five-second subtraction, causing valid recent timestamps to be treated as expired and requests to run on every scheduler pass.
1 open issue
What changed in this PR
Adds an optional callback-based SoC request-interval override, allowing vehicle modules to request updates more frequently than the configured interval while forcing API-based retrieval during overrides.
Changes:
- Adds validation and storage for request-interval override callbacks.
- Applies shorter effective intervals in the SoC scheduler.
- Preserves override state across deep copies and module replacement.
- Adds tests for validation, scheduling, retries, source selection, and copied state.
A moderate issue remains: override values from 0 to 5 seconds become non-positive after the five-second subtraction, causing requests on every scheduler pass instead of honoring the configured interval.
| File | Description |
|---|---|
packages/modules/common/request_interval_override_test.py |
Tests override validation, scheduling, retries, source selection, and copied module state. |
packages/modules/common/configurable_vehicle.py |
Adds the request-interval override callback and API-source selection. |
packages/control/ev/ev.py |
Applies the shorter override interval when determining whether a SoC request has expired. |
This pull request requires changes.
Review effort: Lite
| if override is not None: | ||
| interval = min(interval, override) | ||
| # Zeitstempel prüfen, ob wieder abgefragt werden muss. | ||
| if timecheck.check_timestamp(self.data.get.soc_request_timestamp, interval-5) is False: |

No description provided.