SideLaserTemp.h
1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
********************************************************************
* @file SideLaserTemp.h
* SideLaserTemp.h 的头文件
*
*********************************************************************
*/
/* Define to prevent recursive inclusion 避免重定义 -------------------------------------*/
#ifndef SIDE_LASER_TEMP_H
#define SIDE_LASER_TEMP_H
/* Includes ------------------------------------------------------------------*/
#include "JZsdk_Base/JZsdk_Code/JZsdk_Code.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* 常亮定义*/
// 温控状态定义
typedef enum {
THERMAL_STATE_NORMAL = 0, // 正常状态
THERMAL_STATE_THROTTLING, // 温控调节状态
THERMAL_STATE_SHUTDOWN, // 强制关停状态
THERMAL_STATE_RECOVERING // 恢复中状态
}ThermalState;
typedef struct JZsdkSideLaserTemp {
int maxtemp; //超过这个温度强制关停
int mintemp; //最小温度,从这个温度开始降低亮度
int hysteresis; // 温度回差,防止频繁切换(建议2-3度)
int TargetLumen; //目标亮度
int CurrentLumen; //当前亮度
int SafeMinLumen; // 安全最低亮度
int frequency; //检查频率,单位hz
ThermalState state; // 当前温控状态
int last_temp; // 上次检测温度
int throttle_start_temp; // 开始温控的温度记录
int throttle_counter; // 温控次数计数器
}JZsdkSideLaserTemp;
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
#ifdef __cplusplus
}
#endif
#endif