forked from xiaozhi/xiaozhi-esp32
Enhance device activation and OTA update process
- Add support for device activation with audio feedback - Refactor OTA update flow to include activation code handling - Update asset management for localized sound resources - Improve error handling and device state management - Reorganize binary asset includes and CMake configuration
This commit is contained in:
@@ -35,6 +35,7 @@ enum DeviceState {
|
||||
kDeviceStateListening,
|
||||
kDeviceStateSpeaking,
|
||||
kDeviceStateUpgrading,
|
||||
kDeviceStateActivating,
|
||||
kDeviceStateFatalError
|
||||
};
|
||||
|
||||
@@ -55,12 +56,13 @@ public:
|
||||
bool IsVoiceDetected() const { return voice_detected_; }
|
||||
void Schedule(std::function<void()> callback);
|
||||
void SetDeviceState(DeviceState state);
|
||||
void Alert(const std::string& title, const std::string& message);
|
||||
void Alert(const std::string& status, const std::string& message, const std::string& emotion = "", const std::string& sound = "");
|
||||
void AbortSpeaking(AbortReason reason);
|
||||
void ToggleChatState();
|
||||
void StartListening();
|
||||
void StopListening();
|
||||
void UpdateIotStates();
|
||||
void Reboot();
|
||||
|
||||
private:
|
||||
Application();
|
||||
@@ -100,7 +102,7 @@ private:
|
||||
void ResetDecoder();
|
||||
void SetDecodeSampleRate(int sample_rate);
|
||||
void CheckNewVersion();
|
||||
void DisplayActivationCode();
|
||||
void ShowActivationCode();
|
||||
|
||||
void PlayLocalFile(const char* data, size_t size);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user