Skip to content

Commit ff28586

Browse files
committed
add hold to talk test
1 parent e4382fa commit ff28586

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

main/boards/kevin-box-2/kevin_box_board.cc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,15 @@ class KevinBoxBoard : public Ml307Board {
118118
}
119119

120120
void InitializeButtons() {
121-
boot_button_.OnClick([this]() {
122-
Application::GetInstance().ToggleChatState();
121+
// 测试按住说话
122+
// boot_button_.OnClick([this]() {
123+
// Application::GetInstance().ToggleChatState();
124+
// });
125+
boot_button_.OnPressDown([this]() {
126+
Application::GetInstance().StartListening();
127+
});
128+
boot_button_.OnPressUp([this]() {
129+
Application::GetInstance().StopListening();
123130
});
124131

125132
volume_up_button_.OnClick([this]() {

0 commit comments

Comments
 (0)