forked from xiaozhi/xiaozhi-esp32
fix:小智云聊some bugfix (#1238)
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
static QueueHandle_t gpio_evt_queue = NULL;
|
||||
uint16_t battCnt;//闪灯次数
|
||||
int battLife = -1; //电量
|
||||
int battLife = 70; //电量
|
||||
|
||||
// 中断服务程序
|
||||
static void IRAM_ATTR batt_mon_isr_handler(void* arg) {
|
||||
|
||||
@@ -145,7 +145,6 @@ public:
|
||||
power_manager_->CheckStartup();
|
||||
InitializePowerSaveTimer();
|
||||
InitializeSpi();
|
||||
InitializeButtons();
|
||||
InitializeSt7789Display();
|
||||
power_manager_->OnChargingStatusDisChanged([this](bool is_discharging) {
|
||||
if(power_save_timer_){
|
||||
@@ -158,8 +157,14 @@ public:
|
||||
});
|
||||
if(GetNetworkType() == NetworkType::WIFI){
|
||||
power_manager_->Shutdown4G();
|
||||
}else{
|
||||
power_manager_->Start4G();
|
||||
}
|
||||
GetBacklight()->RestoreBrightness();
|
||||
while(gpio_get_level(BOOT_BUTTON_PIN) == 0){
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
InitializeButtons();
|
||||
}
|
||||
|
||||
virtual AudioCodec* GetAudioCodec() override {
|
||||
|
||||
Reference in New Issue
Block a user