This commit is contained in:
Moritz Ruth 2024-03-04 12:29:44 +01:00
parent 566ffb49f3
commit 13f307d387
Signed by: moritzruth
GPG key ID: C9BBAB79405EE56D
12 changed files with 543 additions and 69 deletions

View file

@ -47,9 +47,43 @@ pub enum HandlerEvent {
Key { path: KeyPath, event: KeyEvent },
}
#[derive(Debug, PartialEq, Clone, Copy, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub enum VibrationPattern {
Short,
Medium,
Long,
Low,
ShortLow,
ShortLower,
Lower,
Lowest,
DescendSlow,
DescendMed,
DescendFast,
AscendSlow,
AscendMed,
AscendFast,
RevSlowest,
RevSlow,
RevMed,
RevFast,
RevFaster,
RevFastest,
RiseFall,
Buzz,
Rumble5,
Rumble4,
Rumble3,
Rumble2,
Rumble1,
VeryLong,
}
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
#[serde(tag = "command", rename_all = "kebab-case")]
pub enum HandlerCommand {
Vibrate { pattern: VibrationPattern },
SetKeyStyle { path: KeyPath, value: Option<KeyStyle> },
SetKnobStyle { path: KnobPath, value: Option<KnobStyle> },
SetKnobValue { path: KnobPath, value: Option<f32> },