diff --git a/src/backends/tasoller_v1.rs b/src/backends/tasoller_v1.rs index 01cd608..7b19e97 100644 --- a/src/backends/tasoller_v1.rs +++ b/src/backends/tasoller_v1.rs @@ -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( 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)?; diff --git a/src/backends/tasoller_v2.rs b/src/backends/tasoller_v2.rs index f084df7..a2a04b1 100644 --- a/src/backends/tasoller_v2.rs +++ b/src/backends/tasoller_v2.rs @@ -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;