From 220f778117d9f80c4bfbebff63b73a4df37587c8 Mon Sep 17 00:00:00 2001 From: wangfq Date: Mon, 6 Jul 2026 17:30:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(vd960DBN):=20=E5=88=A0=E9=99=A4=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=20poll=5Fmqtt=20=E5=AE=9A=E4=B9=89=20+=20=E5=8A=A0?= =?UTF-8?q?=E5=A4=B4=E6=96=87=E4=BB=B6=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../APP/include/net_srv.h | 1 + .../OnlyUpdateApp_Peripheral/APP/net_srv.c | 23 ------------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/include/net_srv.h b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/include/net_srv.h index 83d5b7a..e466f58 100644 --- a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/include/net_srv.h +++ b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/include/net_srv.h @@ -275,6 +275,7 @@ void dev_send_heartbeat(void); void dev_get_timestamp_send(void); void manage_tcp_message(uint8_t socket, uint8_t *buf, uint32_t len); void manage_mqtt_recv_message(char * msg, int length); +void poll_mqtt(void); void GetMacAddr(unsigned char *pMAC); diff --git a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/net_srv.c b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/net_srv.c index 5123f53..af956ee 100644 --- a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/net_srv.c +++ b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/net_srv.c @@ -423,29 +423,6 @@ void mqtt_data_manage(uint8_t id) -/********************************************************************* - * @fn poll_mqtt - * - * @brief MQTT 心跳轮询 — IoT 模式 (ref: DBN101GA) - * - * @return none - */ -void poll_mqtt(void) -{ - if (g_net_state.flag < 2) return; - - static uint8_t _ping_counter = 0; - _ping_counter++; - - if (_ping_counter >= 90) { // ~9s (roughly, based on loop period) - _ping_counter = 0; - MQTT_Pingreq(); - PRINT("MQTT PINGREQ\n"); - } -} - - - /********************************************************************* * @fn WCHNET_DataManage *