Skip to content

Commit

Permalink
Change position display rotation
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 e1ef0f8 commit 139882b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion control/src/cache/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ fn leds_for_attribute(attribute: AttributeScreen) -> [bool; 8] {
AttributeScreen::HeadsOverview((top, bottom)) => [
top[0], top[1], top[2], top[3], bottom[0], bottom[1], bottom[2], bottom[3],
],
AttributeScreen::Position(position) => index_to_leds(position),
AttributeScreen::Position(position) => position_to_leds(position),
AttributeScreen::OctaveOffset(offset) => {
let mut leds = [false; 8];
if offset >= leds.len() {
Expand Down Expand Up @@ -517,6 +517,16 @@ fn index_to_leds(index: usize) -> [bool; 8] {
leds
}

fn position_to_leds(position: usize) -> [bool; 8] {
let mut leds = [false; 8];
if position < 4 {
leds[position] = true;
} else {
leds[7 - (position - 4)] = true;
}
leds
}

fn dry_wet_to_leds(phase: f32) -> [bool; 8] {
let mut leds = [false; 8];

Expand Down

0 comments on commit 139882b

Please sign in to comment.