Doly C++ SDK v1.00
Loading...
Searching...
No Matches
FanControl Namespace Reference

Functions

int8_t init (bool auto_control)
 Initialize the Fan Control module.
int8_t dispose ()
 Dispose the Fan Control module and release resources.
int8_t setFanSpeed (uint8_t percentage)
 Set fan speed as a percentage.
bool isActive ()
 Check whether the Fan Control module is active (initialized).
float getVersion ()
 Get current library version.

Function Documentation

◆ dispose()

int8_t FanControl::dispose ( )

Dispose the Fan Control module and release resources.

Returns
Status code:
  • 0 : success
  • 1 : not initialized
  • <0 : error
Examples
FanControl/main.cpp.

◆ getVersion()

float FanControl::getVersion ( )

Get current library version.

Original note: format 0.XYZ (3 digits after major).

Returns
Version as float.
Examples
FanControl/main.cpp.

◆ init()

int8_t FanControl::init ( bool auto_control)

Initialize the Fan Control module.

Parameters
auto_controlIf true, automatic temperature control will manage fan speed.
Returns
Status code:
  • 0 : success
  • 1 : already initialized
  • <0 : error (implementation-defined)
Examples
FanControl/main.cpp.

◆ isActive()

bool FanControl::isActive ( )

Check whether the Fan Control module is active (initialized).

Returns
true if initialized; false otherwise.

◆ setFanSpeed()

int8_t FanControl::setFanSpeed ( uint8_t percentage)

Set fan speed as a percentage.

Parameters
percentageFan speed percentage (0..100).
Returns
Status code:
  • <0 : error
Note
If auto_control was enabled in init(), the automatic controller may override or adjust the fan speed over time.
Examples
FanControl/main.cpp.