debug(vd960DBN): performPeriodicTask 拉包失败打印 resp 状态 + 注释闭合

- 第二分包未进发送函数, 加条件打印 (仅当队列有货但拉包返回0时)
  BLE pull FAIL: resp flag/amt/seq/off 一烧录即知第二包断在哪
- 补 ble_notify_chunk_max 注释块闭合 */
This commit is contained in:
wangfq
2026-08-12 11:55:44 +08:00
parent 5eef0756f2
commit 070db9f383
2 changed files with 9 additions and 1 deletions
@@ -190,6 +190,7 @@ static uint8_t set_net_info_to_ready(uint8_t * dat_dst)
* and whole pkt <= MAX_BLE_Notify_Buf_LEN (local buf, no overflow)
* MTU=23 -> 14, MTU=96 -> 87, MTU>=103 -> 94
* =============================================================
*/
static uint16_t ble_notify_chunk_max(void)
{
uint16_t _mtu = peripheral_get_mtu();
@@ -694,7 +694,14 @@ static void performPeriodicTask(void)
do NOT rely on poll_dbn_ble rx events */
if(g_notify_buftemp.flag == 0)
{
g_flag_notify_temp = set_response_to_notify(&g_buf_ble_response, &g_notify_buftemp);
uint8_t _pull = set_response_to_notify(&g_buf_ble_response, &g_notify_buftemp);
g_flag_notify_temp = _pull;
if(_pull == 0 && g_buf_ble_response.flag)
{
PRINT("BLE pull FAIL: resp flag=%d amt=%d seq=%d off=%d\n",
g_buf_ble_response.flag, g_buf_ble_response.pkg_amount,
g_buf_ble_response.pkg_seq, g_buf_ble_response.dat_offset);
}
}
}