Function actuate_heater

Source
fn actuate_heater(
    command: InternalCommand,
    mutex_device_scheduler_heating: &Arc<Mutex<i32>>,
    mutex_blocked_during_actuation: &mut bool,
    heating_channels: &mut HeatingChannels,
)
Expand description

Sends a command to the relay manager to actuate the heater and waits for a response.

This private helper function encapsulates the logic for sending a command (either SwitchOn or SwitchOff) to the relay manager. It handles channel communication, error logging, and updates the shared actuation mutex.

ยงArguments

  • command - The InternalCommand to send (SwitchOn or SwitchOff).
  • mutex_device_scheduler_heating - A reference to the shared actuation mutex.
  • mutex_blocked_during_actuation - A mutable flag to track if the actuation mutex was blocked.
  • heating_channels - A mutable reference to the struct containing the channels.