修复一下问题:

A用户绑定IPC和门夹弹力绳,分享给B用户;
A用户先进入门夹弹力绳页面,已唤醒玩具,B用户再进入页面
A用户退出页面下发休眠指令,B用户操作玩具,未提示操作成功/失败
This commit is contained in:
2026-09-10 11:43:33 +08:00
parent 026d6d5da7
commit 5875d2a339
5 changed files with 155 additions and 45 deletions
+11 -3
View File
@@ -2,10 +2,11 @@
* @file app_function.h
* @brief 设备功能开关(DP0)+ 自动玩法(DP1)+ 手动点动(DP2)+ 按键动作
* @author cyWu <1917507415@qq.com>
* @date 2026.08.25
* @version V1.0.0
* @date 2026.09.10
* @version V1.2.0
* @history
* - V1.0.0, 2026.08.25, cyWu, 首次发布,实现 DP0 开关、自动玩法、手动点动与按键动作
* - V1.2.0, 2026.09.10, cyWu, 软关后 APP 下发其它控制 DP 也可唤醒功能
*
* @note 本模块决定“电机现在该不该转、转哪种”,会读 app_power/app_pair 的
* 状态作为阻塞条件(充电中/深睡中/配对中都不能转),也会触发
@@ -30,6 +31,13 @@ void app_function_init(void);
*/
void app_function_dp_hand_write(uint8_t cmd);
/**
* @brief APP 下发了非关机控制 DP(玩法/点动等),软关时下一拍唤醒功能
* @note 与关机 DP 同一帧到达时不要调用,避免关完立刻被同包其它 DP 拉开
* @return 无
*/
void app_function_on_app_cmd(void);
/**
* @brief 跟随 APP 下发的 DP0/DP1,并处理 DP2 手动点动,每个业务 tick 调用一次
* @return 无
@@ -50,7 +58,7 @@ void app_function_tick_1ms(uint16_t dt);
void app_function_stop_all(void);
/**
* @brief 软关:电机停、DP0=0,等 APP/短按再开(USB 拔出 / APP 关时用)
* @brief 软关:电机停、DP0=0,等 APP 开机/其它指令/短按再开(USB 拔出 / APP 关时用)
* @return 无
*/
void app_function_soft_off(void);