固件 0.1.5~0.1.13-c5:刷机模式、多组 WiFi、热插拔初始化、总线锁误判、硬重启断 VBUS
- 0.1.5/0.1.6:刷机模式(flash_mode,最多 2 路,60 分钟可加钟)——窗口内顶高按 4450 mV 绝对值判、不断 VBUS - 0.1.7/0.1.8:反灌断 VBUS 阈值放宽到 -300 mA(adb reboot bootloader 过渡实测 -208 mA) - 0.1.9:WiFi 最多存 4 组,连不上轮换;NVS v1 自动迁移并双写(OTA 回滚仍能上网) - 0.1.10:热插拔进来的刀片重新初始化 PCA9555 + INA226(否则 VBUS 常开、电流恒读 0) - 0.1.11:i2cbus 嵌套检测改看本任务持锁(原全局标志让 key 随机回 busy、vbus 随机回 io) - 0.1.12:硬重启先断 VBUS,开机校验通过 60 s 后再接回(否则假重启 / 误判没开机 / 进关机充电) - 0.1.13:这一路被安全判据断电时一并退出刷机模式(事件 21 arg 254) 26 ctest 全绿;新增用例均先在旧代码上确认变红。板 B 已 OTA 到 0.1.13-c5 并实测。 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
这个提交包含在:
@@ -7,6 +7,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "board_pins.h"
|
||||
#include "chgmode.h"
|
||||
#include "cmd_priv.h"
|
||||
#include "evlog.h"
|
||||
#include "hal_gpio.h"
|
||||
@@ -69,6 +70,8 @@ static void rail_obj(cj_writer_t *w, int rail, const safety_snap_t *s)
|
||||
cj_w(w, ",\"pg\":null,\"flt\":null");
|
||||
}
|
||||
}
|
||||
/* 0.1.5:刷机模式剩余秒数(0 = 没开)。 */
|
||||
cj_w(w, ",\"chg\":%lu", (unsigned long)chgmode_left_s(rail, hal_time_now_ms()));
|
||||
cj_w(w, ",\"st\":\"%s\",\"res\":\"%s\"}", t_actuator_state_str(t_actuator_state(rail)),
|
||||
t_actuator_result_str(t_actuator_last_result(rail)));
|
||||
}
|
||||
@@ -131,9 +134,10 @@ void cmd_report_status(cj_writer_t *w, const cmd_env_t *env)
|
||||
thermal_obj(w, env->thermal);
|
||||
}
|
||||
if (s != NULL) {
|
||||
cj_w(w, ",\"safety\":{\"cycles\":%lu,\"skipped\":%lu,\"i2c_err\":%lu,\"events\":%lu}",
|
||||
cj_w(w, ",\"safety\":{\"cycles\":%lu,\"skipped\":%lu,\"i2c_err\":%lu,\"events\":%lu,\"inits\":%lu}",
|
||||
(unsigned long)s->cycles, (unsigned long)s->skipped,
|
||||
(unsigned long)s->i2c_errors, (unsigned long)s->events);
|
||||
(unsigned long)s->i2c_errors, (unsigned long)s->events,
|
||||
(unsigned long)s->blade_inits);
|
||||
}
|
||||
ota_obj(w);
|
||||
evlog_stats_t es;
|
||||
|
||||
在新工单中引用
屏蔽一个用户