diff --git a/fw-AC63_BT_SDK/apps/spp_and_le/app_temperature.c b/fw-AC63_BT_SDK/apps/spp_and_le/app_temperature.c index c5eacb9..3c9fad8 100644 --- a/fw-AC63_BT_SDK/apps/spp_and_le/app_temperature.c +++ b/fw-AC63_BT_SDK/apps/spp_and_le/app_temperature.c @@ -357,6 +357,7 @@ static uint8_t reversal(uint8_t data) ff_temp_data[4] = (ntc >> 8) & 0xFF; ff_temp_data[5] = (ntc) & 0xFF; //batt + battery = get_cur_battery_level() *10; ff_temp_data[6] = battery & 0xFF; trans_client_adv_data_set_ff(ff_temp_data,sizeof(ff_temp_data)); gpio_direction_output(IO_PORTB_05, 0); @@ -428,6 +429,8 @@ void temperature_charge_state(int state){ temperature_work_led(0); delay_ms_by_timer0(150); } + //接入充电关闭蓝牙广播 + ble_op_adv_enable(0); //spple_power_event_to_user(POWER_EVENT_POWER_SOFTOFF); //printf("!!!!!!!!!!!!!! CHARGING POWER OFF!!!!!!!!!!!!!!!!\n"); //printf("BLE_TEMPERATURE_CHARGE_STATE_CHARGING 2\n"); @@ -445,6 +448,9 @@ void temperature_charge_state(int state){ //temperature_charge_led(0); temperature_work_led(1); sys_s_hi_timerout_add(NULL,temperature_poweron_led_timeout,2000); + + //拔出充电打开蓝牙广播 + ble_op_adv_enable(1); break; //低电 case BLE_TEMPERATURE_CHARGE_STATE_LOWPOWER: