forked from xiaozhi/xiaozhi-esp32
Enhance audio feedback mechanism by introducing a flag to play a popup (#1560)
* Enhance audio feedback mechanism by introducing a flag to play a popup sound after transitioning to listening mode. Update Schedule method to accept rvalue references for callbacks. Bump esp-ml307 component version to 3.5.3. Adjust signal strength thresholds in Ml307Board for better accuracy. * Update esp-wifi-connect component version to 3.0.2 in idf_component.yml * Adjust Wi-Fi signal strength thresholds in WifiBoard for improved accuracy in network state icon representation.
This commit is contained in:
@@ -75,7 +75,7 @@ public:
|
||||
/**
|
||||
* Schedule a callback to be executed in the main task
|
||||
*/
|
||||
void Schedule(std::function<void()> callback);
|
||||
void Schedule(std::function<void()>&& callback);
|
||||
|
||||
/**
|
||||
* Alert with status, message, emotion and optional sound
|
||||
@@ -139,6 +139,7 @@ private:
|
||||
bool has_server_time_ = false;
|
||||
bool aborted_ = false;
|
||||
bool assets_version_checked_ = false;
|
||||
bool play_popup_on_listening_ = false; // Flag to play popup sound after state changes to listening
|
||||
int clock_ticks_ = 0;
|
||||
TaskHandle_t activation_task_handle_ = nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user