Skip to content

Extend TempQueue to all physical probes - #247

Open
claytono wants to merge 1 commit into
nebhead:developmentfrom
claytono:tempqueue-shared
Open

Extend TempQueue to all physical probes#247
claytono wants to merge 1 commit into
nebhead:developmentfrom
claytono:tempqueue-shared

Conversation

@claytono

Copy link
Copy Markdown

The ADC probe implementations already use TempQueue to provide more stable temperature readings and reject outliers, but other physical probes return their readings without the same handling.

This change moves TempQueue handling into the shared probe pipeline and requires each probe implementation to explicitly declare whether it should be used. Directly sampled physical probes enable it, while Bluetooth, virtual, and disabled probes retain their existing behavior.

Copilot AI lite review requested due to automatic review settings August 10, 2026 18:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Moves temperature smoothing/outlier rejection (TempQueue) out of individual probe implementations and into the shared probe read pipeline, so directly sampled physical probes get consistent stabilization while Bluetooth/virtual/disabled probes preserve their current behavior.

Changes:

  • Introduces a uses_temp_queue subclass declaration on ProbeInterface and uses it to conditionally build per-port TempQueues.
  • Adds a shared apply_temp_queue() step in the probe read pipeline (probes/main.py) and removes inline queue averaging from the base read_all_ports().
  • Updates each probe module to explicitly opt in/out of TempQueue via the new class declaration.

Reviewed changes

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

Show a summary per file
File Description
probes/base.py Adds uses_temp_queue subclass contract, conditional TempQueue creation, and shared apply_temp_queue() pipeline step.
probes/main.py Applies per-device TempQueue smoothing after each device read.
probes/ads1115.py Opts ADS1115 probe into TempQueue handling.
probes/ads1115_adafruit.py Opts Adafruit ADS1115 probe into TempQueue handling.
probes/ads1015_adafruit.py Opts Adafruit ADS1015 probe into TempQueue handling.
probes/ds18b20.py Opts DS18B20 probe into TempQueue handling.
probes/max31865.py Opts MAX31865 probe into TempQueue handling.
probes/max31865_adafruit.py Opts Adafruit MAX31865 probe into TempQueue handling.
probes/mcp9600_adafruit.py Opts MCP9600 probe into TempQueue handling.
probes/prototype.py Opts prototype probe into TempQueue handling.
probes/virtual_average.py Explicitly opts virtual average probe out of TempQueue handling.
probes/virtual_highest.py Explicitly opts virtual highest probe out of TempQueue handling.
probes/virtual_lowest.py Explicitly opts virtual lowest probe out of TempQueue handling.
probes/virtual_median.py Explicitly opts virtual median probe out of TempQueue handling.
probes/disabled.py Explicitly opts disabled probe out of TempQueue handling.
probes/bt_meater.py Explicitly opts Meater Bluetooth probe out of TempQueue handling.
probes/bt_meater_alt.py Explicitly opts alternate Meater Bluetooth probe out of TempQueue handling.
probes/bt_meater_exp.py Explicitly opts experimental Meater Bluetooth probe out of TempQueue handling.
probes/bt_igrill_alt.py Explicitly opts iGrill Bluetooth probe out of TempQueue handling.
probes/bt_ibbq.py Explicitly opts iBBQ Bluetooth probe out of TempQueue handling.
probes/bt_ibbq_alt.py Explicitly opts alternate iBBQ Bluetooth probe out of TempQueue handling.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread probes/base.py Outdated
The ADC probe implementations already use TempQueue to provide more stable temperature readings and reject outliers, but other physical probes return their readings without the same handling.

This change moves TempQueue handling into the shared probe pipeline and requires each probe implementation to explicitly declare whether it should be used. Directly sampled physical probes enable it, while Bluetooth, virtual, and disabled probes retain their existing behavior.
@nebhead

nebhead commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Thanks, I'll take a look over the next few days and merge in.

@claytono

Copy link
Copy Markdown
Author

Thanks! Let me know if there is anything you'd like changed. Happy to adjust as needed.

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.

3 participants