Small clippy cleanups

This commit is contained in:
Luke D. Jones
2025-01-04 20:04:07 +13:00
parent 2b7a2a5be3
commit 2123f369ad
6 changed files with 25 additions and 26 deletions

View File

@@ -129,6 +129,14 @@ pub const fn pkt_set_mode(slash_type: SlashType, mode: SlashMode) -> [SlashUsbPa
[pkt1, pkt2]
}
/// DEVICE SETTINGS
/// Interval:
/// - 1 = 0x5d, 0xd3, 0x3, 0x1, 0x8, 0xab, 0xff, 0x1, 0x1, 0x6, 0x19, 0xff, 0x1
/// - 5 = 0x5d, 0xd3, 0x3, 0x1, 0x8, 0xab, 0xff, 0x1, 0x1, 0x6, 0x19, 0xff, 0x5
/// Brightness: 100
/// - 100 = 0x5d, 0xd3, 0x3, 0x1, 0x8, 0xab, 0xff, 0x1, 0x1, 0x6, 0xff, 0xff
/// - 000 = 0x5d, 0xd3, 0x3, 0x1, 0x8, 0xab, 0xff, 0x1, 0x1, 0x6, 0x00, 0xff
/// - off = 0x5d, 0xd3, 0x3, 0x1, 0x8, 0xab, 0xff, 0x1, 0x0, 0x6, 0xff, 0xff
#[inline]
pub const fn pkt_set_options(
slash_type: SlashType,
@@ -144,10 +152,10 @@ pub const fn pkt_set_options(
pkt[2] = 0x03;
pkt[3] = 0x01;
pkt[4] = 0x08;
pkt[5] = 0xab;
pkt[6] = 0xff;
pkt[5] = 0xab; // Setting byte 1
pkt[6] = 0xff; // Setting byte 2
pkt[7] = 0x01;
pkt[8] = status_byte;
pkt[8] = status_byte; // Setting enable/disable
pkt[9] = 0x06;
pkt[10] = brightness;
pkt[11] = 0xff;