增加唤醒词播放添加设备验证码
This commit is contained in:
parent
8659087f5d
commit
cd2fbf2a25
@ -125,8 +125,14 @@ void Application::CheckNewVersion() {
|
|||||||
// Activation code is valid
|
// Activation code is valid
|
||||||
SetDeviceState(kDeviceStateActivating);
|
SetDeviceState(kDeviceStateActivating);
|
||||||
ShowActivationCode();
|
ShowActivationCode();
|
||||||
// Check again in 60 seconds
|
|
||||||
vTaskDelay(pdMS_TO_TICKS(60000));
|
// Check again in 60 seconds or until the device is idle
|
||||||
|
for (int i = 0; i < 60; ++i) {
|
||||||
|
if (device_state_ == kDeviceStateIdle) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
vTaskDelay(pdMS_TO_TICKS(1000));
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -488,6 +494,8 @@ void Application::Start() {
|
|||||||
SetDeviceState(kDeviceStateListening);
|
SetDeviceState(kDeviceStateListening);
|
||||||
} else if (device_state_ == kDeviceStateSpeaking) {
|
} else if (device_state_ == kDeviceStateSpeaking) {
|
||||||
AbortSpeaking(kAbortReasonWakeWordDetected);
|
AbortSpeaking(kAbortReasonWakeWordDetected);
|
||||||
|
} else if (device_state_ == kDeviceStateActivating) {
|
||||||
|
SetDeviceState(kDeviceStateIdle);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resume detection
|
// Resume detection
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user