Browse Source

更改主动上报变量名

devtest
zwsd 3 years ago
parent
commit
44e3bf65d7
  1. 2
      main/ble_parse_data.c
  2. 2
      main/ble_parse_data.h
  3. 6
      main/main.c

2
main/ble_parse_data.c

@ -45,7 +45,7 @@ void bluetooth_gatts_try_process_data() {
// {
// ESP_LOGI(BLE_PARSE_DATA_TAG, "deviceStatusReport");
// }
parse_bluetooth_processer->actively_report_flag = true;
parse_bluetooth_processer->auto_report_flag = true;
}
}

2
main/ble_parse_data.h

@ -40,7 +40,7 @@ typedef struct bluetooth_processer {
uint16_t table_handle_m;
bool cmd_flag;
bool actively_report_flag;
bool auto_report_flag;
} bluetooth_processer_t;

6
main/main.c

@ -47,7 +47,7 @@ bluetooth_processer_t s_bluetooth_processer = {
.table_handle_m = 0,
.cmd_flag = false,
.actively_report_flag = false,
.auto_report_flag = false,
};
void app_main(void) {
@ -61,9 +61,9 @@ void app_main(void) {
bluetooth_rx_buffer_send_indicate();
}
bluetooth_gatts_try_process_data();
if (s_bluetooth_processer.actively_report_flag) {
if (s_bluetooth_processer.auto_report_flag) {
receipt_json_get_status();
s_bluetooth_processer.actively_report_flag = false;
s_bluetooth_processer.auto_report_flag = false;
}
}

Loading…
Cancel
Save