set fan curve functionality

This commit is contained in:
2026-06-07 17:50:46 +02:00
parent f9272f8d1c
commit f74d9bf539
2 changed files with 51 additions and 1 deletions

View File

@@ -10,6 +10,12 @@
#define AIO_COLOR_WHITE { 255, 255, 255 }
#define AIO_COLOR_OFF { 0, 0, 0 }
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
// roughly converts fan speed to duty
#define SPD2DTY(spd) MAX(0, MIN(spd * 100 / max_fan_speed, 100))
enum aio_pump_mode_t : uint8_t {
QUIET,
BALANCED,
@@ -29,7 +35,12 @@ struct rgb_t {
uint8_t b;
};
struct aio_t{
struct curve_point_t {
uint8_t temp;
uint8_t duty;
};
struct aio_t {
libusb_device_handle* handle;
enum aio_pump_mode_t pump_mode;
float water_temp;