forked from xiaozhi/xiaozhi-esp32
add uuid to board
This commit is contained in:
@@ -61,7 +61,11 @@ void Application::CheckNewVersion() {
|
||||
ota_.SetPostData(board.GetJson());
|
||||
|
||||
while (true) {
|
||||
if (ota_.CheckVersion()) {
|
||||
bool success = ota_.CheckVersion();
|
||||
if (ota_.HasActivationCode()) {
|
||||
DisplayActivationCode();
|
||||
}
|
||||
if (success) {
|
||||
if (ota_.HasNewVersion()) {
|
||||
Alert("Info", "正在升级固件");
|
||||
// Wait for the chat state to be idle
|
||||
@@ -115,6 +119,13 @@ void Application::CheckNewVersion() {
|
||||
}
|
||||
}
|
||||
|
||||
void Application::DisplayActivationCode() {
|
||||
ESP_LOGW(TAG, "Activation Message: %s", ota_.GetActivationMessage().c_str());
|
||||
ESP_LOGW(TAG, "Activation Code: %s", ota_.GetActivationCode().c_str());
|
||||
auto display = Board::GetInstance().GetDisplay();
|
||||
display->ShowNotification(ota_.GetActivationMessage(), 30000);
|
||||
}
|
||||
|
||||
void Application::Alert(const std::string& title, const std::string& message) {
|
||||
ESP_LOGW(TAG, "Alert: %s, %s", title.c_str(), message.c_str());
|
||||
auto display = Board::GetInstance().GetDisplay();
|
||||
|
||||
Reference in New Issue
Block a user