forked from xiaozhi/xiaozhi-esp32
add hold to talk test
This commit is contained in:
@@ -118,8 +118,15 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void InitializeButtons() {
|
void InitializeButtons() {
|
||||||
boot_button_.OnClick([this]() {
|
// 测试按住说话
|
||||||
Application::GetInstance().ToggleChatState();
|
// boot_button_.OnClick([this]() {
|
||||||
|
// Application::GetInstance().ToggleChatState();
|
||||||
|
// });
|
||||||
|
boot_button_.OnPressDown([this]() {
|
||||||
|
Application::GetInstance().StartListening();
|
||||||
|
});
|
||||||
|
boot_button_.OnPressUp([this]() {
|
||||||
|
Application::GetInstance().StopListening();
|
||||||
});
|
});
|
||||||
|
|
||||||
volume_up_button_.OnClick([this]() {
|
volume_up_button_.OnClick([this]() {
|
||||||
|
|||||||
Reference in New Issue
Block a user