ESP-LiveControl  1.99.1
HTTP server, AJAX API backend and Vue.js web application implementing self-contained, zero-install WiFi remote control of hardware modules attached to the Espressif ESP32 SoC
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
AuxHwDrv Class Reference

Auxiliary hardware driver for ESP-AJAX-Lab This implements GPIO control for relays, fan, enable and reset signals and PWM generation used as a reference signal for hardware overcurrent limiter. More...

#include <aux_hw_drv.hpp>

Collaboration diagram for AuxHwDrv:
Collaboration graph
[legend]

Public Member Functions

void set_current_limit (float value)
 
void set_relay_ref_active (bool state)
 
void set_relay_dut_active (bool state)
 
void set_fan_active (bool state)
 
void set_fan_override (bool new_state)
 
void set_drv_supply_active (bool state)
 
void set_drv_disabled (bool state)
 
void update_temperature_sensors ()
 Only updates the state structure for temperature sensors. Other state variables are only modified by setter functions above.
 
void evaluate_temperature_sensors ()
 Check if temperature exceeds threshold value and switch fan accordingly. More...
 

Static Public Member Functions

static void reset_oc_shutdown_start ()
 
static void reset_oc_shutdown_finish ()
 

Public Attributes

AuxHwDrvState state
 
SensorKTY81_121 sensor_temp_1 {aux_hw_conf.temp_ch_1}
 
SensorKTY81_121 sensor_temp_2 {aux_hw_conf.temp_ch_2}
 

Static Public Attributes

static constexpr auto aux_hw_conf = AuxHwDrvConfig{}
 

Detailed Description

Auxiliary hardware driver for ESP-AJAX-Lab This implements GPIO control for relays, fan, enable and reset signals and PWM generation used as a reference signal for hardware overcurrent limiter.

Further, temperature sensor readout is triggered here by calling update_temperature_sensors() member peroiodically from timer task in PsPWMAppHwControl::on_periodic_update_timer().

This class is also used as a container for its public attribute members which represent the hardware state and are read-accessed externally.

Member Function Documentation

◆ evaluate_temperature_sensors()

void AuxHwDrv::evaluate_temperature_sensors ( )

Check if temperature exceeds threshold value and switch fan accordingly.

To be called periodically from slow timer event


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