固件 0.1.19~0.1.21-c5:配网热点(SoftAP + 网页)、风扇 40 ℃ 以下断电

- 0.1.19 配网热点:没配 WiFi / 连续 60 s 连不上时自己开 SoftAP,192.168.4.1 网页里加删 WiFi、改 MQTT;
  配置拼成 wifi / mqtt 命令走唯一的命令处理器(新链路号 3 CMD_LINK_AP),MQTT 仍不收配置命令
- 0.1.20 热点口令固定 88888888
- 0.1.21 风扇:板温 >=40 ℃ 上电、<38 ℃ 断电,40~65 ℃ 线性调速;fan 命令加可选 sec(下限到点自动交回)
- mqtt 命令加 keep_pass;net 回应加 ap;status 的 fan 加 left
- 新增 test_prov(13 例),test_t_thermal +3;29 ctest 全绿

Co-Authored-By: Claude Opus 5.5 <[email protected]>
这个提交包含在:
zhou yang
2026-10-06 14:35:44 +08:00
共同撰写人 Claude Opus 5.5
父节点 3bf4548c62
当前提交 ece65f7c19
共修改 24 个文件,包含 1925 行新增和 324 行删除
+14 -1
查看文件
@@ -401,8 +401,21 @@ cmd_err_t do_fan(ctx_t *c)
if (duty < 0 || duty > 1000) {
return reject(c, CMD_ERR_RANGE, duty);
}
/* `sec`(0.1.21,可选):这个下限保持多少秒,到期自动回 0。不给 / 0 = 一直保持(老行为)。
定时续期的上位机(AppTask)用它:它挂了,风扇不会永远停在最后那个转速上。 */
int64_t sec = 0;
const int gs = cj_get_int(c->o, "sec", &sec);
if (gs < 0) {
return CMD_ERR_ARG;
}
if (sec < 0 || sec > T_THERMAL_FLOOR_TTL_MAX_S) {
return reject(c, CMD_ERR_RANGE, sec);
}
/* 手动值只是**下限**:温度曲线要得更高时照曲线来(t_thermal.h)。0 = 交回自动。 */
t_thermal_set_floor((uint16_t)duty);
t_thermal_set_floor_for((uint16_t)duty, (uint32_t)sec * 1000u);
cj_w(c->w, ",\"floor\":%u", (unsigned)t_thermal_floor());
if (gs == 1) {
cj_w(c->w, ",\"sec\":%lu", (unsigned long)((t_thermal_floor_left_ms() + 999u) / 1000u));
}
return CMD_OK;
}