Skip to content

ThermalProbe Class Implementation #18

@samuelnguyen999

Description

@samuelnguyen999

The ThermalProbe class wraps the Adafruit MAX31865 RTD interface and provides functionality for temperature reading, fault handling, running averages, and sample statistics. This issue documents the work needed to validate and complete the thermal probe functionality.

Goals

  • Verify correct initialization and usage of the MAX31865 device (three-wire configuration, assigned pins).
  • Ensure accurate temperature acquisition, resistance reading, and fault reporting.
  • Review and refine running-average and sample-statistic logic for stability and correctness.
  • Validate correction-factor handling and its integration with raw and averaged temperature values.

Reference: ThermalProbe_TC Public Operations

  • Singleton management: instance(), reset()
  • Core readings: getResistance(), getRawTemperature(), getRunningAverage(), getUncorrectedRunningAverage()
  • Fault handling: readFault(), clearFault()
  • Correction handling: clearCorrection(), getCorrection(), setCorrection()
  • Sample/statistics operations: getSampleMean(), getSampleStandardDeviation(), resetSample()
  • CI mock support (if enabled): setTemperature()

Internal/Private Components for Review

  • MAX31865 device instance initialization (Adafruit_MAX31865 thermo)
  • Nominal resistance and reference resistor values (RTDnominal, refResistor)
  • History buffer management (history, HISTORY_SIZE, historyIndex)
  • Timing and sampling interval tracking (lastTime)
  • firstTime flag usage and initialization flow

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions