Module worker

Module worker 

Source
Expand description

Background worker for BLE sensor operations.

This module contains the SensorWorker which handles all Bluetooth Low Energy operations in a background task, keeping the UI thread responsive. The worker communicates with the UI thread via channels:

  • Receives Commands from the UI to perform operations
  • Sends SensorEvents back to report results and status updates

§Architecture

The worker runs in a separate Tokio task and uses tokio::select! to handle:

  • Incoming commands from the UI
  • Periodic auto-refresh of sensor readings (when enabled)

All BLE operations are performed here to avoid blocking the UI rendering loop.

Structs§

SensorWorker
Background worker that handles BLE operations.