Skip to content

Commit

Permalink
flatten hue settings struct
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelLieb committed Mar 3, 2024
1 parent fbbabd5 commit 5c2d297
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
13 changes: 6 additions & 7 deletions config_template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ threshold_range = 8
fixed_threshold = 5.0
delay = 2

# Alternative (worse) Onset detection algorithm
# Alternative Onset detection algorithm
# You can only use HFC OR SpecFlux
# [OnsetDetector]
# algorithm = "HFC"
Expand Down Expand Up @@ -98,29 +98,28 @@ area = "Entertainment Area uuid"
# Option to specify where credentials are saved after Push Link authentication
# auth_file = "Path/to/file.cbor"

[Hue.LightSettings]
drum_decay_rate = 8.0
fullband_color = [[65535, 0, 0], [2, 0, 1]]
color_envelope = false

[Hue.LightSettings.NoteDecay]
[Hue.NoteDecay]
secs = 0
nanos = 100000000

[Hue.LightSettings.HihatDecay]
[Hue.HihatDecay]
secs = 0
nanos = 80000000

[Hue.LightSettings.FullbandDecay]
[Hue.FullbandDecay]
secs = 0
nanos = 250000000

[Hue.PushLinkTimeout]
secs = 0
secs = 30
nanos = 0

[Hue.Timeout]
secs = 0
secs = 2
nanos = 0

[[WLED]]
Expand Down
1 change: 1 addition & 0 deletions src/utils/lights/hue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ pub struct HueSettings {
pub area: Option<String>,
#[serde(rename = "auth_file")]
pub auth_file: Option<String>,
#[serde(flatten)]
pub light_settings: LightSettings,
pub push_link_timeout: Duration,
pub timeout: Duration,
Expand Down

0 comments on commit 5c2d297

Please sign in to comment.