Skip to content

SoC: Module können kürzeres Abfrageintervall vorgeben - #4147

Merged
LKuemmel merged 1 commit into
masterfrom
feature-soc-request-retry
Nov 3, 2026
Merged

LKuemmel merged 1 commit into
masterfrom
feature-soc-request-retry

Conversation

@LKuemmel

Copy link
Copy Markdown
Contributor

No description provided.

@LKuemmel
LKuemmel added this pull request to stack #4149 October 20, 2026 12:48
@LKuemmel
LKuemmel requested a review from rleidner October 20, 2026 12:49
@rleidner

Copy link
Copy Markdown
Collaborator

Hallo @LKuemmel, danke, ich werde mir das ansehen und testen.

@rleidner rleidner left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested changes with current master - no issues.

@LKuemmel
LKuemmel removed this pull request from stack #4149 October 22, 2026 07:36
@LKuemmel
LKuemmel added this pull request to stack #4165 October 22, 2026 07:37
@LKuemmel
LKuemmel force-pushed the feature-soc-request-retry branch from f693f27 to df25a6c Compare October 22, 2026 07:39
@LKuemmel LKuemmel added this to the 2.4.0 milestone Oct 22, 2026
@LKuemmel
LKuemmel requested a lite review from Copilot November 3, 2026 12:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread packages/control/ev/ev.py
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:
@LKuemmel
LKuemmel merged commit c68d19c into master Nov 3, 2026
2 checks passed
@LKuemmel
LKuemmel deleted the feature-soc-request-retry branch November 3, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants