Demonstrates:
#include <chrono>
#include <thread>
#include <spdlog/spdlog.h>
int main()
{
spdlog::set_level(spdlog::level::info);
spdlog::flush_on(spdlog::level::trace);
spdlog::error("Doly service stop failed");
return -1;
}
{
spdlog::error("FanControl init failed");
return -2;
}
spdlog::info("Fan speed set to 100%");
std::this_thread::sleep_for(std::chrono::seconds(7));
spdlog::info("Fan turned off");
return 0;
}
Public API for Doly fan control.
Shared helper utilities and common types used across the Doly SDK.
int8_t setFanSpeed(uint8_t percentage)
Set fan speed as a percentage.
float getVersion()
Get current library version.
int8_t init(bool auto_control)
Initialize the Fan Control module.
int8_t dispose()
Dispose the Fan Control module and release resources.
int8_t stopDolyService()
Stop the background Doly service (if running).