Repository navigation
fix: charge current limit on vehicles without target SoC support - #537
Merged
Merged
Conversation
…ithout SoC support Co-Authored-By: Claude Haiku 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Setting drivetrain/chargeCurrentLimit/set failed with 'remote control instruction failed' (return code 4) on an MG5 (LFP, no target SoC support).
The charge current handler always passed the stored target SoC to set_target_battery_soc. The SoC-target and charging-schedule handlers already reject or skip target SoC for vehicles where supports_target_soc is False, but this handler did not. The change makes __desired_target_soc return TargetBatteryCode.P_IGNORE when the vehicle does not support target SoC, and leaves the NMC path unchanged.
Not verified against the vehicle or the saic_ismart_client_ng source, which is not installed in this environment; the root cause is inferred from the code path and the existing guards. Regression tests added in tests/handlers/command/test_drivetrain_chargecurrent_limit.py cover the LFP case (ignore target SoC sent) and the NMC case (known target SoC kept).
Tests: not run here (dependencies not installed; CI runs them).
🤖 Generated with Claude Code
Tests not run here: poetry run pytest tests/handlers/command/test_drivetrain_chargecurrent_limit.py -- not run: project dependencies (saic_ismart_client_ng) are not installed here and the task forbids installing them, poetry run mypy -- not run: dependencies not installed, poetry run ruff check . / ruff format --check . -- not run: ruff not available in this session
Refs #467
🤖 Generated with Claude Code