Skip to content

fix bat set controllability - #3372

Merged
LKuemmel merged 2 commits into
openWB:masterfrom
LKuemmel:fix_bat
May 19, 2026
Merged

LKuemmel merged 2 commits into
openWB:masterfrom
LKuemmel:fix_bat

Conversation

@LKuemmel

Copy link
Copy Markdown
Contributor

No description provided.

@LKuemmel LKuemmel changed the title fix bat set controlllablitity fix bat set controlllability May 19, 2026
@LKuemmel LKuemmel changed the title fix bat set controlllability fix bat set controllability May 19, 2026
@LKuemmel
LKuemmel requested a review from Copilot May 19, 2026 12:30
@LKuemmel LKuemmel added this to the 2.2.0-Patch.1 milestone May 19, 2026

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.

Pull request overview

This PR updates battery controllability handling so controllable and non-controllable battery components are tracked separately and used when setting battery power limits.

Changes:

  • Replaces get_controllable_bat_components() with get_bat_components_by_controllability().
  • Updates battery state propagation for controllable and non-controllable batteries.
  • Adjusts related battery control tests to mock the new helper return shape.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/control/bat_all.py Adds controllability grouping and updates battery control logic to use it.
packages/control/process.py Uses the controllable component list when dispatching battery power limit writes.
packages/control/bat_all_test.py Updates mocks for the renamed/helper return signature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/control/bat_all.py Outdated
bat_components.append(comp_value)
return bat_components
with SingleComponentUpdateContext(comp_value.fault_state, update_always=False):
if comp_value.power_limit_controllable():

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@LKuemmel
LKuemmel merged commit 2078010 into openWB:master May 19, 2026
5 checks passed
@LKuemmel
LKuemmel deleted the fix_bat branch May 19, 2026 12:50
ndrsnhs pushed a commit to ndrsnhs/core that referenced this pull request Aug 24, 2026
* fix bat set controlllablitity

* review
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.

2 participants