Skip to content

Conversation

@samblenny
Copy link
Contributor

@samblenny samblenny commented Nov 3, 2025

This implements the register width fix for the resolution setter as proposed by @dhalbert at:

I've tested this by copying adafruit_mcp9808.py to CIRCUITPY/lib/ in place of adafruit_mcp9808.mpy. When I did that, the following code ran without giving the exception mentioned in issue #41:

Adafruit CircuitPython 10.0.3 on 2025-10-17; Adafruit Feather ESP32S3 No PSRAM with ESP32S3
>>> import board
>>> from adafruit_mcp9808 import MCP9808
>>> mcp98 = MCP9808(board.STEMMA_I2C())
>>> print("resolution is", mcp98.resolution)
resolution is 3
>>> mcp98.resolution = 1
>>> print("resolution is", mcp98.resolution)
resolution is 1

This is just a one character change, and I don't have pre-commit set up on this machine. So, I haven't run the pre-commit stuff.

Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

👍

@dhalbert dhalbert merged commit 995ed9b into adafruit:main Nov 3, 2025
1 check passed
@samblenny samblenny deleted the fix-resolution-setter branch November 3, 2025 16:56
adafruit-adabot pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 4, 2025
Updating https://github.com/adafruit/Adafruit_CircuitPython_INA228 to 2.0.3 from 2.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_INA228#6 from BertanT/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP9808 to 3.3.30 from 3.3.29:
  > Merge pull request adafruit/Adafruit_CircuitPython_MCP9808#42 from samblenny/fix-resolution-setter

Updating https://github.com/adafruit/Adafruit_CircuitPython_Requests to 4.1.15 from 4.1.14:
  > Merge pull request adafruit/Adafruit_CircuitPython_Requests#217 from FoamyGuy/localize_more_tests
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