From b7559c9ccafce9940700defc69e19dcc03787df1 Mon Sep 17 00:00:00 2001 From: zwsd Date: Thu, 21 Jul 2022 17:22:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=BB=E5=8A=A8=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81=EF=BC=8C=E6=9B=B4?= =?UTF-8?q?=E6=8D=A2=E4=B8=BB=E5=8A=A8=E4=B8=8A=E6=8A=A5=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/main/main.c b/main/main.c index c46ae9f..7d20fa8 100644 --- a/main/main.c +++ b/main/main.c @@ -51,14 +51,10 @@ bluetooth_processer_t s_bluetooth_processer = { void app_main(void) { constructor_bluetooth_processer(&s_bluetooth_processer); - - bluetooth_auto_report_format_receipt(); ble_spp_server_demo_app_main(&s_bluetooth_processer); timer_group_init(TIMER_GROUP_0, TIMER_0, false, timer_group0_interval_num, timer_interval_ms); + while (true) { - if (s_bluetooth_processer.table_handle_m != 0) { - bluetooth_tx_buffer_send_indicate(); - } bluetooth_gatts_try_process_data(); if (s_bluetooth_processer.auto_report_flag) { receipt_json_get_status(); @@ -138,6 +134,8 @@ void bluetooth_tx_buffer_send_indicate() { uint8_t temp_count_remainder = 0; uint8_t i = 0; + bluetooth_auto_report_format_receipt(); + temp_lenght = strlen(bluetooth_tx_buffer); temp_count_total = temp_lenght / 15;