Skip to content

Commit

Permalink
feat(ui): Support open your eyes voice
Browse files Browse the repository at this point in the history
  • Loading branch information
andronat committed Feb 12, 2025
1 parent 6946171 commit 90d4c40
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ui/src/engine/diamond.rs
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,12 @@ impl EventHandler for Runner<DIAMOND_RING_LED_COUNT, DIAMOND_CENTER_LED_COUNT> {
Event::Flow { mode } => {
self.operating_mode = *mode;
}
Event::VoiceOpenEyes => {
self.sound.queue(
sound::Type::Voice(sound::Voice::OpenEyes),
Duration::ZERO,
)?;
}
}
Ok(())
}
Expand Down
4 changes: 4 additions & 0 deletions ui/src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@ event_enum! {
#[event_enum(method = recovery)]
RecoveryImage,

/// Voice open your eyes
#[event_enum(method = voice_open_eyes)]
VoiceOpenEyes,

/// Set volume [0..100]
#[event_enum(method = sound_volume)]
SoundVolume {
Expand Down
6 changes: 6 additions & 0 deletions ui/src/engine/pearl/self_serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,12 @@ impl Runner<PEARL_RING_LED_COUNT, PEARL_CENTER_LED_COUNT> {
.fade_in(1.5),
);
}
Event::VoiceOpenEyes => {
self.sound.queue(
sound::Type::Voice(sound::Voice::OpenEyes),
Duration::ZERO,
)?;
}
_ => {}
}
Ok(())
Expand Down
2 changes: 2 additions & 0 deletions ui/src/sound/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ sound_enum! {
TestFirmwareWarning,
#[sound_enum(file = "voice_please_do_not_shutdown")]
PleaseDontShutDown,
#[sound_enum(file = "voice_iris_open")]
OpenEyes,
}
}

Expand Down

0 comments on commit 90d4c40

Please sign in to comment.