Skip to content

bq27441: Rename status() to _control_status().#158

Merged
nedseb merged 1 commit intofix/standardize-statusfrom
fix/bq27441-control-status
Mar 15, 2026
Merged

bq27441: Rename status() to _control_status().#158
nedseb merged 1 commit intofix/standardize-statusfrom
fix/bq27441-control-status

Conversation

@nedseb
Copy link
Copy Markdown
Contributor

@nedseb nedseb commented Mar 15, 2026

Closes #156

Summary

Rename status()_control_status() in BQ27441 driver. Unlike sensor drivers where status() reads a data-ready register, the BQ27441 status() reads the CONTROL_STATUS word (sealed state, shutdown flags). The distinct name avoids confusion with the sensor _status() convention.

Only caller is sealed(), updated accordingly.

Test plan

python3 -m pytest tests/ -k "bq27441 and mock" -v  # 8 passed

@nedseb nedseb requested a review from Copilot March 15, 2026 13:27
@nedseb nedseb self-assigned this Mar 15, 2026
@nedseb nedseb added the enhancement New feature or request label Mar 15, 2026
@nedseb nedseb linked an issue Mar 15, 2026 that may be closed by this pull request
3 tasks
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 the BQ27441 driver by renaming the method that reads the CONTROL_STATUS subcommand and adjusting internal callers accordingly.

Changes:

  • Rename status() (CONTROL_STATUS read) to _control_status().
  • Update sealed() to call _control_status().

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

Comment thread lib/bq27441/bq27441/device.py
@nedseb nedseb force-pushed the fix/standardize-status branch from afba75e to 57933d6 Compare March 15, 2026 13:36
@nedseb nedseb force-pushed the fix/bq27441-control-status branch from dc14368 to f228dca Compare March 15, 2026 13:47
@nedseb nedseb merged commit 9381df5 into fix/standardize-status Mar 15, 2026
@nedseb nedseb deleted the fix/bq27441-control-status branch March 15, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bq27441: Make status() private and review naming.

2 participants