chore(contrib): Frostbay OEM Firmware Tools V08 hinzugefügt

- CoolingSystem_ONEC1-FW-TOOL-V1.8 (BLE-FW-TOOL.exe, BLEDebug.EXE,
  coolingsystem_debugger.html, 接口.C, FWConfig.ini, DLLs)
- CoolingSystem_ONEC1_V08.bin (Firmware Binary)
- 壹号冰坞水流量异常处理方法.doc (Dokumentation)

Quelle: GA25水冷固件_V08 — OEM-Flash-Tools für Frostbay ONEC1
Nützlich für Protokoll-Reverse-Engineering (接口.C, debugger.html)
This commit is contained in:
Kay Türtscher 2026-06-19 17:36:13 +02:00
parent d477b99c73
commit cc2d513554
15 changed files with 3109 additions and 0 deletions

View file

@ -0,0 +1,7 @@
[V208]
FW=CoolingSystem_ONEC1_V07.bin
Auto=1
VR=204
BLE=1

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup>
</configuration>

View file

@ -0,0 +1,232 @@
// 20251218 开关机保存风扇和水泵设置的值
void ParseControlCommand() // 解析接收到的20字节控制命令
{
//解析接收到--读写水冷箱基本参数 Ram_op_params_buff[] Byte 0-19
if((write_buff[0]==0xC0)&&(write_buff[1]=0x01)&&(write_buff[19]==0xC0))
{
Jump_OTA();
PRINT("10086000000\n");
}
if(write_buff[0]==0xC1)
{
//打印接收到数据
// uint8_t i;
// for(i=0;i<20;i++)
// PRINT("%x ",write_buff[i]);
// PRINT("\n");
//写
if (write_buff[1]==0x02)
{
// 更新数组
Ram_op_params_buff[3] = write_buff[3]; //模块开关
if (((write_buff[4]>=0)&&(write_buff[4]<6))||(write_buff[4]==0xfe)||(write_buff[4]==0xff)) {
Ram_op_params_buff[4] = write_buff[4]; //运行模式
Clear_Fault_Status();
}
//运行模式为0xFF自定义模式时可修改风扇水泵转数
if (write_buff[4]==0xFF)
{
Ram_op_params_buff[5] = write_buff[5]; //风扇 PWM
Ram_op_params_buff[8] = write_buff[8]; //水泵 PWM
}
if ((write_buff[16]==0xFE)||(write_buff[16]==0xFF))
{
RGB1_mode = 21; //模式
RGB2_mode = 21; //模式
RGB3_mode = 21; //模式
Ram_op_params_buff[20] = write_buff[17];//R 值
Ram_op_params_buff[21] = write_buff[18];//G 值
Ram_op_params_buff[22] = write_buff[19];//B 值
Custom_R[0] = Ram_op_params_buff[20];
Custom_G[0] = Ram_op_params_buff[21];
Custom_B[0] = Ram_op_params_buff[22];
Custom_R[1] = Ram_op_params_buff[20];
Custom_G[1] = Ram_op_params_buff[21];
Custom_B[1] = Ram_op_params_buff[22];
Custom_R[2] = Ram_op_params_buff[20];
Custom_G[2] = Ram_op_params_buff[21];
Custom_B[2] = Ram_op_params_buff[22];
Ram_op_params_buff[43] = 1;
}
else if(write_buff[16]==0xFD)
{
Ram_op_params_buff[17]= write_buff[17];//开关 00 关 01 开
Ram_op_params_buff[18]= write_buff[18];//频率 0-9 档
Ram_op_params_buff[19]= write_buff[19];//亮度
int mode = Ram_op_params_buff[17]; // 0-6: 二进制位对应RGB灯状态
int level = Ram_op_params_buff[19];
int brightness = (level >= 0 && level <= 4) ? brightness_map[level] : 0;
RGB1_Brightness = (mode & 1) ? brightness : 0; // 检查第0位
RGB2_Brightness = (mode & 2) ? brightness : 0; // 检查第1位
RGB3_Brightness = (mode & 4) ? brightness : 0; // 检查第2位
}
else if ((0<(write_buff[16]))&&((write_buff[16])<21))
{
Ram_op_params_buff[16] = write_buff[16];//RGB 模式
RGB1_mode = Ram_op_params_buff[16]; //模式
RGB2_mode = Ram_op_params_buff[16]; //模式
RGB3_mode = Ram_op_params_buff[16]; //模式
Ram_op_params_buff[43] = 0;
PRINT("Ram_op_params_buff[43]\n");
}
Set_Strip_Mode(1, RGB1_mode);
Set_Strip_Mode(2, RGB2_mode);
Set_Strip_Mode(3, RGB3_mode);
system_mode = Ram_op_params_buff[4];//运行模式
fan_gear = Ram_op_params_buff[5];//风扇档位
pump_gear = Ram_op_params_buff[8];//水泵1档位
RGB2_speed = Ram_op_params_buff[18];//速度 全局
RGB3_speed = Ram_op_params_buff[18];//速度 全局
// 更新数组
Ram_op_params_buff[23] = write_buff[23]; // 写入出水温度1
Ram_op_params_buff[24] = write_buff[24]; // 写入风扇转速1
Ram_op_params_buff[25] = write_buff[25]; // 写入出水温度2
Ram_op_params_buff[26] = write_buff[26]; // 写入风扇转速2
Ram_op_params_buff[27] = write_buff[27]; // 写入出水温度3
Ram_op_params_buff[28] = write_buff[28]; // 写入风扇转速3
Ram_op_params_buff[29] = write_buff[29]; // 写入出水温度4
Ram_op_params_buff[30] = write_buff[30]; // 写入风扇转速4
Ram_op_params_buff[31] = write_buff[31]; // 写入出水温度5
Ram_op_params_buff[32] = write_buff[32]; // 写入风扇转速5
Ram_op_params_buff[33] = write_buff[33]; // 写入出水温度6
Ram_op_params_buff[34] = write_buff[34]; // 写入风扇转速6
Ram_op_params_buff[35] = write_buff[35]; // 写入出水温度7
Ram_op_params_buff[36] = write_buff[36]; // 写入风扇转速7
Ram_op_params_buff[37] = write_buff[37]; // 写入出水温度8
Ram_op_params_buff[38] = write_buff[38]; // 写入风扇转速8
Ram_op_params_buff[39] = write_buff[39]; // 写入出水温度9
Ram_op_params_buff[40] = write_buff[40]; // 写入风扇转速9
//写入掉电保存区
save_pending = 1; //保存
}
write_buff[1]=0x20;// 返回校验码
}
//拆开包第1包数据
if(write_buff[0]==0x1C )
{
Ram_op_params_buff[1] = write_buff[1];
Ram_op_params_buff[2] = write_buff[2];
Ram_op_params_buff[3] = write_buff[3]; // 模块开关01=跟随模式02=保存模式04=回连模式(去掉)
Ram_op_params_buff[4] = write_buff[4]; // 运行模式00=关闭01=静音02=轻柔03=强劲04=狂暴FE=智能模式FF=自定义调节
Ram_op_params_buff[5] = write_buff[5]; // 风扇转速设置值: 0x00-0x64 对应PWM占空比 (注:只有在自定义模式下才有效)
Ram_op_params_buff[6] = write_buff[6]; // 风扇转速读取高8位单位r/min转/分钟
Ram_op_params_buff[7] = write_buff[7]; // 风扇转速读取低8位单位r/min转/分钟)
Ram_op_params_buff[8] = write_buff[8]; // 水泵转速设置值0-64对应占空比 (注:只有在自定义模式下才有效)
Ram_op_params_buff[9] = write_buff[9]; // 水泵转速读取高8位单位r/min转/分钟)
Ram_op_params_buff[10] = write_buff[10]; // 水泵转速读取低8位单位r/min转/分钟)
Ram_op_params_buff[11] = write_buff[11]; // 水流量高8位单位mL/min毫升/分钟)
Ram_op_params_buff[12] = write_buff[12]; // 水流量低8位单位mL/min毫升/分钟)
Ram_op_params_buff[13] = write_buff[13]; // 进水温度
Ram_op_params_buff[14] = write_buff[14]; // 出水温度
Ram_op_params_buff[15] = write_buff[15]; // 状态位00=正常01=水泵异常02=流量异常04=风扇异常08=出水温异常10=进水温度异常20=流量上升检测40=流量下降检测
Ram_op_params_buff[16] = write_buff[16]; // 预设模式0~13后3位显示开关、频率、亮度FD=设置RGB开关/频率/亮度 FE=自定义颜色后3位字节显示RGB值
Ram_op_params_buff[17] = write_buff[17]; // FD-RGB开关全局 00=关01=开
Ram_op_params_buff[18] = write_buff[18]; // FD-RGB频率全局0-9档
Ram_op_params_buff[19] = write_buff[19]; // FD-RGB亮度全局0-4档
}
//拆开包第2包数据
if(write_buff[0]==0x2C )
{
Ram_op_params_buff[20] = write_buff[1]; // R
Ram_op_params_buff[21] = write_buff[2]; // G
Ram_op_params_buff[22] = write_buff[3]; // B
Ram_op_params_buff[23] = write_buff[4]; // 写入出水温度1
Ram_op_params_buff[24] = write_buff[5]; // 写入风扇转速1
Ram_op_params_buff[25] = write_buff[6]; // 写入出水温度2
Ram_op_params_buff[26] = write_buff[7]; // 写入风扇转速2
Ram_op_params_buff[27] = write_buff[8]; // 写入出水温度3
Ram_op_params_buff[28] = write_buff[9]; // 写入风扇转速3
Ram_op_params_buff[29] = write_buff[10]; // 写入出水温度4
Ram_op_params_buff[30] = write_buff[11]; // 写入风扇转速4
Ram_op_params_buff[31] = write_buff[12]; // 写入出水温度5
Ram_op_params_buff[32] = write_buff[13]; // 写入风扇转速5
Ram_op_params_buff[33] = write_buff[14]; // 写入出水温度6
Ram_op_params_buff[34] = write_buff[15]; // 写入风扇转速6
Ram_op_params_buff[35] = write_buff[16]; // 写入出水温度7
Ram_op_params_buff[36] = write_buff[17]; // 写入风扇转速7
Ram_op_params_buff[37] = write_buff[18]; // 写入出水温度8
Ram_op_params_buff[38] = write_buff[19]; // 写入风扇转速8
}
//拆开包第3包数据
if(write_buff[0]==0x3C )
{
Ram_op_params_buff[39] = write_buff[1]; //写入出水温度9
Ram_op_params_buff[40] = write_buff[2]; //写入风扇转速9
Ram_op_params_buff[41] = write_buff[3]; //
Ram_op_params_buff[42] = write_buff[4]; //
Ram_op_params_buff[43] = write_buff[5]; //
Ram_op_params_buff[44] = write_buff[6]; //
Ram_op_params_buff[45] = write_buff[7]; //
Ram_op_params_buff[46] = write_buff[8]; //
Ram_op_params_buff[47] = write_buff[9]; //
Ram_op_params_buff[48] = write_buff[10]; //
Ram_op_params_buff[49] = write_buff[11]; //
Ram_op_params_buff[50] = write_buff[12]; //
Ram_op_params_buff[51] = write_buff[13]; //
Ram_op_params_buff[52] = write_buff[14]; //
Ram_op_params_buff[53] = write_buff[15]; //
Ram_op_params_buff[54] = write_buff[16]; //
Ram_op_params_buff[55] = write_buff[17]; //
Ram_op_params_buff[56] = write_buff[18]; //
Ram_op_params_buff[57] = write_buff[19]; // 水泵风扇不工作时 自动关闭RGB 时间
}
//1.BLE 读取MCU 数据 一次读取 64字节数据
//buff[0] 帧头 0xC1
//buff[1] ~ buff[57] 有效数据
// 2. 根据需求修改 // buff[1] ~ buff[57] 参数
//发送数据时 将64字节 拆分3包 共发送57字节 有效数据
//第1包 帧头 0x1C + 19 个有效数据 读取Buff[1] ~Buff[19]
//第2包 帧头 0x2C + 19 个有效数据 读取Buff[20] ~Buff[38]
//第3包 帧头 0x3C + 19 个有效数据 读取Buff[39] ~Buff[57]
}