feat: 新增激光定时关闭与姿态角持续输出测试功能,编码转UTF-8

1. 激光定时自动关闭:默认10分钟,laser on启动计时,超时自动关并上报
2. laser time <min>可配置定时分钟数,0=关闭定时
3. att on/off持续输出姿态角(Pitch/Roll/Yaw),不注册不低功耗
4. 20个源文件从GB2312编码转为UTF-8 with BOM
This commit is contained in:
2026-07-20 17:04:48 +08:00
parent 70758b1c06
commit 72844ff821
20 changed files with 1388 additions and 1260 deletions
+11 -11
View File
@@ -1,4 +1,4 @@
#ifndef __ALGORITHM_H
#ifndef __ALGORITHM_H
#define __ALGORITHM_H
#include <math.h>
@@ -11,20 +11,20 @@
#define CRC16_BASE 0xA001
// 峰值谷值检查结果结构体
// 峰值谷值检查结果结构体
typedef struct {
bool peaks_positive; // 所有峰值是否大于0
bool valleys_negative; // 所有谷值是否小于0
int peak_count; // 检测到的峰值数量
int valley_count; // 检测到的谷值数量
bool peaks_positive; // 所有峰值是否大于0
bool valleys_negative; // 所有谷值是否小于0
int peak_count; // 检测到的峰值数量
int valley_count; // 检测到的谷值数量
} PeakValleyCheck;
// 趋势分析结果结构体
// 趋势分析结果结构体
typedef struct {
double slope; // 线性斜率
int sign_changes; // 符号变化次数
char trend_type; // 趋势类型
char steepness; // 陡峭度
double slope; // 线性斜率
int sign_changes; // 符号变化次数
char trend_type; // 趋势类型
char steepness; // 陡峭度
} TrendResult;
PeakValleyCheck check_peaks_valleys(int data[], int length);