fix(vd960DBN): 删除重复 poll_mqtt 定义 + 加头文件声明
This commit is contained in:
@@ -275,6 +275,7 @@ void dev_send_heartbeat(void);
|
|||||||
void dev_get_timestamp_send(void);
|
void dev_get_timestamp_send(void);
|
||||||
void manage_tcp_message(uint8_t socket, uint8_t *buf, uint32_t len);
|
void manage_tcp_message(uint8_t socket, uint8_t *buf, uint32_t len);
|
||||||
void manage_mqtt_recv_message(char * msg, int length);
|
void manage_mqtt_recv_message(char * msg, int length);
|
||||||
|
void poll_mqtt(void);
|
||||||
|
|
||||||
|
|
||||||
void GetMacAddr(unsigned char *pMAC);
|
void GetMacAddr(unsigned char *pMAC);
|
||||||
|
|||||||
@@ -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
|
* @fn WCHNET_DataManage
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user