1、低电 3.7V 只闪红灯不再 1 分钟后关机;电量低于约 5% 自动关机,未充电开机先闪 5 下红灯再睡回,只能充电后才能开机

2、自动/手动互相切换都闪 2 下灯;APP 发停止后再发自动模式可正常启动,手动残留停止不再挡住自动
3、自动模式 1~6 单次最长跑 10 分钟后回待机;关机时长按 12 秒进 OTA,OTA 期间红绿交替闪
This commit is contained in:
2026-08-27 10:20:48 +08:00
parent 3d445ae5c5
commit fdb43011b7
28 changed files with 945 additions and 165 deletions
+3 -3
View File
@@ -115,7 +115,7 @@ static void app_mode_apply_step(void)
return;
}
if (tbl[s_mode.step].ms == 0) {
s_mode.step = 0;
s_mode.step = 0; /* 表尾,回到第 0 步循环 */
}
s_mode.step_t0 = timer_get_ms();
if (tbl[s_mode.step].dir == BSP_MOTOR_STOP) {
@@ -172,7 +172,7 @@ AppMode_Ret_t app_mode_start(uint8_t mode)
return APP_MODE_ERR_PARAM;
}
s_mode.active = mode;
s_mode.step = 0;
s_mode.step = 0; /* 从节拍表第 0 步重新开始 */
app_mode_apply_step();
log_info("auto mode %d start\n", mode);
return APP_MODE_OK;
@@ -201,7 +201,7 @@ void app_mode_run(void)
{
const AppModeStep_t *tbl;
bsp_motor_switch_tick();
bsp_motor_switch_tick(); /* 换向死区:H 桥松开后再切方向 */
if (!s_mode.initialized || s_mode.active == 0) {
return;
}