fix(tasoller): hardware so good firmware so shit
This commit is contained in:
parent
c6f3fb529b
commit
ff147a97d7
@ -31,9 +31,9 @@
|
||||
//! ### OUT Bulk (0x03)
|
||||
//! - Content length: 240 bytes
|
||||
//! - Bytes 0..3: magic bytes [0x42, 0x4C, 0x00]
|
||||
//! - Bytes 3..96: Slider LED (GRB order, right -> left)
|
||||
//! - Bytes 96..168: Left tower LED (GRB)
|
||||
//! - Bytes 168..240: Right tower LED (GRB)
|
||||
//! - Bytes 3..96: Slider LED (BGR order, right -> left)
|
||||
//! - Bytes 96..168: Left tower LEDs (GRB)
|
||||
//! - Bytes 168..240: Right tower LEDs (GRB)
|
||||
|
||||
#[cfg(any(chuni, chusanapp))]
|
||||
use anyhow::Result;
|
||||
@ -117,9 +117,9 @@ pub fn set_slider_leds<T: UsbContext>(
|
||||
rgb: &[u8],
|
||||
) -> Result<()> {
|
||||
for (buf_chunk, state_chunk) in output[3..96].chunks_mut(3).take(31).zip(rgb.chunks(3)) {
|
||||
buf_chunk[0] = state_chunk[1];
|
||||
buf_chunk[1] = state_chunk[0];
|
||||
buf_chunk[2] = state_chunk[2];
|
||||
buf_chunk[0] = state_chunk[2];
|
||||
buf_chunk[1] = state_chunk[1];
|
||||
buf_chunk[2] = state_chunk[0];
|
||||
}
|
||||
|
||||
device.write_bulk(0x03, output, TIMEOUT)?;
|
||||
|
@ -19,8 +19,8 @@
|
||||
//! - Content length: 240 bytes
|
||||
//! - Bytes 0..3: magic bytes [0x42, 0x4C, 0x00]
|
||||
//! - Bytes 3..96: Slider LED (GRB order, right -> left)
|
||||
//! - Bytes 96..168: Left tower LED (GRB)
|
||||
//! - Bytes 168..240: Right tower LED (GRB)
|
||||
//! - Bytes 96..168: Left tower LEDs (GRB)
|
||||
//! - Bytes 168..240: Right tower LEDs (GRB)
|
||||
|
||||
#[cfg(any(chuni, chusanapp))]
|
||||
use anyhow::Result;
|
||||
|
Loading…
Reference in New Issue
Block a user