Skip to content

Add I2C sensor settings for backported v2 drivers#335

Closed
tyeth-ai-assisted wants to merge 1 commit into
adafruit:v2from
tyeth-ai-assisted:add/settings-backported-i2c
Closed

Add I2C sensor settings for backported v2 drivers#335
tyeth-ai-assisted wants to merge 1 commit into
adafruit:v2from
tyeth-ai-assisted:add/settings-backported-i2c

Conversation

@tyeth-ai-assisted

Copy link
Copy Markdown

Overview

Adds index-based settings blocks to the I2C components whose firmware drivers were backported with configurable options in Adafruit_Wippersnapper_Arduino#933. This is the components-side counterpart to that firmware work, in the same spirit as #327.

Each setting's option order and default index matches the firmware driver's set* index mapping / configureDefaults(), so the broker-sent index resolves to the intended sensor configuration.

Components updated (15)

Component Settings added
ina260 averaged_samples, voltage/current_conversion_time, mode
ina237 / ina238 / ina228 adc_range, averaged_samples, voltage/current_conversion_time
lps28dfw output_data_rate, averaged_samples, range, filter
spa06_003 temp/pressure_oversampling, output_data_rate
htu31d heater
hdc302x mode (precision), heater
as7331 gain, integration_time, mode, clock_frequency
as5600 output_stage, power_mode, slow_filter, fast_filter_threshold, hysteresis
mlx90632b / mlx90632d_med / mlx90632d_ext mode, measurement_rate
vcnl4200 / vcnl4030 integration_time, prox_led_current, prox_duty, prox_integration_time, prox_resolution

Notes / scope

  • The settings model is index-into-options only (per schema.json). Continuous/physical calibration values are therefore intentionally not surfaced: INA shunt resistance & max-current (setShunt, fixed on the Adafruit breakouts) and AS5600 zero/max angle positions. The firmware retains those as defaults.
  • SPA06-003 exposes the clean 1-128 Hz output_data_rate subset (the library's higher background-rate combos are omitted).
  • All 15 files validate against components/i2c/schema.json.

🤖 Generated with Claude Code

Adds index-based `settings` blocks (per the v2 settings schema, ref adafruit#327) to
the I2C components whose firmware drivers were backported with configurable
options in Adafruit_Wippersnapper_Arduino. Each setting's option order and
default index matches the firmware driver's set* mapping / configureDefaults().

Components updated: ina260, ina237, ina238, ina228, lps28dfw, spa06_003,
htu31d, hdc302x, as7331, as5600, mlx90632b, mlx90632d_med, mlx90632d_ext,
vcnl4200, vcnl4030.

Notes:
- The settings model is index-into-options only, so continuous/physical
  calibration values (INA shunt resistance & max current; AS5600 zero/max
  angle positions) are intentionally not surfaced here.
- SPA06-003 exposes the 1-128 Hz output-data-rate subset.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tyeth-ai-assisted

Copy link
Copy Markdown
Author

Superseded by #336, which also carries the schema change (a staff-only file) and so is opened from the tyeth fork.

@tyeth-ai-assisted tyeth-ai-assisted deleted the add/settings-backported-i2c branch June 22, 2026 13:44
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