Skip to content

Commit

Permalink
Fix bug where position display was not default
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Horacek <petr@zlosynth.com>
  • Loading branch information
phoracek committed Nov 12, 2023
1 parent 139882b commit 54ece4c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions control/src/cache/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ impl Default for Configuration {
fn default() -> Self {
Self {
rewind_speed: [(0, 0), (1, 1), (2, 2), (3, 3)],
// TODO: Change this to position. Make sure there is fallback set from the get go
default_display_page: DisplayPage::Heads,
default_display_page: DisplayPage::Position,
position_reset_mapping: None,
pause_resume_mapping: None,
tap_interval_denominator: 1,
Expand Down
2 changes: 1 addition & 1 deletion control/src/cache/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ fn ticked_alt_attribute(age: u32, menu: AltAttributeScreen) -> Option<Screen> {
}

fn ticked_attribute(age: u32, menu: AttributeScreen) -> Option<Screen> {
if age > 2000 {
if age > 2000 && !matches!(menu, AttributeScreen::Position(_)) {
None
} else {
Some(Screen::Attribute(age + 1, menu))
Expand Down
1 change: 0 additions & 1 deletion control/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,6 @@ mod tests {
input.drive = 0.1;
apply_input_snapshot(&mut store, input);
assert_eq!(store.state, State::Normal);
assert_animation(&mut store, &[0000]);
}

#[test]
Expand Down

0 comments on commit 54ece4c

Please sign in to comment.