Flips key index horizontally, for use with Original v1 Stream Deck
(kind: &Kind, key: u8)
| 47 | |
| 48 | /// Flips key index horizontally, for use with Original v1 Stream Deck |
| 49 | pub fn flip_key_index(kind: &Kind, key: u8) -> u8 { |
| 50 | let col = key % kind.column_count(); |
| 51 | (key - col) + ((kind.column_count() - 1) - col) |
| 52 | } |
| 53 | |
| 54 | /// Reads button states, empty vector if no data |
| 55 | pub fn read_button_states(kind: &Kind, states: &[u8]) -> Vec<bool> { |
no test coverage detected