cooling/cooling.cc
/// Start the fan (if we have control of it)
///
Start the fan (if we have control of it)
Start the fan ( if we have control of it )
void Cooling::start_fan()
{
    if (not m_fan_control_enabled) return;
    if (m_fan_running) return;
    if (m_fan_gpio) {
        try {
            m_fan_gpio.set_value(GPIO_ON); 
            LOG_INFO(Lgr) << "Started FAN at temp =" << m_degc;
            m_last_cool_start = time(0);
            m_fan_running = true;
        } catch ( std::exception &ex ) {
            LOG_ERROR(Lgr) << "Fan Start operation failed: " << ex.what();
            m_gpio_errors++;
        }
    }
}
void Cooling :: start_fan ( ) { if ( not m_fan_control_enabled ) return ; if ( m_fan_running ) return ; if ( m_fan_gpio ) { try { m_fan_gpio . set_value ( GPIO_ON ) ; LOG_INFO ( Lgr ) << " " << m_degc ; m_last_cool_start = time ( 0 ) ; m_fan_running = true ; } catch ( std :: exception & ex ) { LOG_ERROR ( Lgr ) << " " << ex . what ( ) ; m_gpio_errors ++ ; } } }
Start the fan (if we have control of it)
Start the fan ( if we have control of it )
// turn fan on