forked from beerpsi/chuniio-yubideck
fix slider LED order
This commit is contained in:
parent
4a28826edb
commit
cdf7d49fbe
@ -12,7 +12,6 @@ use std::{
|
||||
};
|
||||
|
||||
use ::log::error;
|
||||
use anyhow::{anyhow, Result};
|
||||
use shared_memory::Shmem;
|
||||
use winapi::{
|
||||
shared::{
|
||||
@ -34,6 +33,7 @@ cfg_if::cfg_if! {
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
use anyhow::{anyhow, Result};
|
||||
use ::log::info;
|
||||
use rusb::{DeviceHandle, GlobalContext};
|
||||
|
||||
@ -294,7 +294,7 @@ pub unsafe extern "C" fn chuni_io_slider_set_leds(rgb: *const u8) {
|
||||
|
||||
for (buf_chunk, state_chunk) in buf[1..61]
|
||||
.chunks_mut(3)
|
||||
.zip(ground.chunks(3).skip(11).take(20).rev())
|
||||
.zip(ground.chunks(3).take(20))
|
||||
{
|
||||
buf_chunk[0] = state_chunk[0];
|
||||
buf_chunk[1] = state_chunk[1];
|
||||
@ -303,7 +303,7 @@ pub unsafe extern "C" fn chuni_io_slider_set_leds(rgb: *const u8) {
|
||||
|
||||
for (buf_chunk, state_chunk) in buf[62..95]
|
||||
.chunks_mut(3)
|
||||
.zip(ground.chunks(3).take(11).rev())
|
||||
.zip(ground.chunks(3).skip(20).take(11))
|
||||
{
|
||||
buf_chunk[0] = state_chunk[0];
|
||||
buf_chunk[1] = state_chunk[1];
|
||||
|
Loading…
Reference in New Issue
Block a user