Merge pull request #1269 from pkendall64/crsf-max-output
[ExpressLRS.git] / src / lib / THERMAL / thermal.h
blob1ec9439f8c4d4f67ae9d62c4a5f257986a675c1d
1 #pragma once
3 #include "targets.h"
4 #include "Wire.h"
6 typedef enum
8 THERMAL_STATUS_FAIL = 0,
9 THERMAL_STATUS_NORMAL = 1
10 } Thermal_Status_t;
12 class Thermal
14 private:
15 uint8_t temp_value;
17 public:
18 void init();
19 void handle();
20 uint8_t read_temp();
21 void update_threshold(int index);
22 uint8_t getTempValue() { return temp_value; }
25 #define THERMAL_FAN_DEFAULT_LOW_THRESHOLD 35
26 #define THERMAL_FAN_DEFAULT_HIGH_THRESHOLD 50
28 #define THERMAL_FAN_ALWAYS_ON_LOW_THRESHOLD 0xFF
29 #define THERMAL_FAN_ALWAYS_ON_HIGH_THRESHOLD 0xFD
31 #define THERMAL_FAN_OFF_LOW_THRESHOLD 0x7D
32 #define THERMAL_FAN_OFF_HIGH_THRESHOLD 0x7F