Aquarium Cooling Controller
ESP32 firmware for aquarium cooling fan control, monitoring, telemetry, and fault handling.
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
OledStatusDisplay Class Reference

Optional OLED renderer with fail-open behavior. More...

#include <oled_status_display.h>

Public Member Functions

bool begin (uint32_t nowMs)
 Probes and initializes a compatible OLED if one is present.
 
void update (uint32_t nowMs, const SensorSnapshot &sensorSnapshot, bool faultSnapshotValid, const FaultPolicySnapshot &policySnapshot)
 Updates the visible OLED state from current controller snapshots.
 
bool isAvailable () const
 Indicates whether a compatible OLED is currently available.
 
OledDisplayMode mode () const
 Returns the last rendered or selected display mode.
 
const char * modeLabel () const
 Returns a short diagnostic label for the current mode.
 
const char * primaryText () const
 Returns the primary visible text used for the current mode.
 
const char * secondaryText () const
 Returns the secondary visible text used for the current mode.
 
uint8_t address () const
 Returns the detected I2C address when the display is available.
 

Detailed Description

Optional OLED renderer with fail-open behavior.

The display is intentionally non-critical. If the OLED is missing, cannot be initialized, or later fails during I2C writes, the class disables itself and leaves the rest of the controller unaffected.

Member Function Documentation

◆ address()

uint8_t OledStatusDisplay::address ( ) const

Returns the detected I2C address when the display is available.

Returns
Active I2C address, or 0 when unavailable.

◆ begin()

bool OledStatusDisplay::begin ( uint32_t  nowMs)

Probes and initializes a compatible OLED if one is present.

Parameters
nowMsCurrent monotonic timestamp in milliseconds.
Returns
True when a display was detected and initialized.

◆ isAvailable()

bool OledStatusDisplay::isAvailable ( ) const

Indicates whether a compatible OLED is currently available.

Returns
True when the display path is active.

◆ mode()

OledDisplayMode OledStatusDisplay::mode ( ) const

Returns the last rendered or selected display mode.

Returns
Current mode label.

◆ modeLabel()

const char * OledStatusDisplay::modeLabel ( ) const

Returns a short diagnostic label for the current mode.

Returns
Null-terminated label string.

◆ primaryText()

const char * OledStatusDisplay::primaryText ( ) const

Returns the primary visible text used for the current mode.

Returns
Null-terminated text buffer.

◆ secondaryText()

const char * OledStatusDisplay::secondaryText ( ) const

Returns the secondary visible text used for the current mode.

Returns
Null-terminated text buffer.

◆ update()

void OledStatusDisplay::update ( uint32_t  nowMs,
const SensorSnapshot &  sensorSnapshot,
bool  faultSnapshotValid,
const FaultPolicySnapshot &  policySnapshot 
)

Updates the visible OLED state from current controller snapshots.

Parameters
nowMsCurrent monotonic timestamp in milliseconds.
sensorSnapshotLatest sensor state.
faultSnapshotValidTrue when policy/fault snapshots are valid.
policySnapshotLatest fault policy state.

The documentation for this class was generated from the following files: