LidClosed mode for Slash Lightning

This commit is contained in:
Serge
2024-02-24 12:02:43 +01:00
parent 61cc54b709
commit 34d2273ff5
4 changed files with 37 additions and 1 deletions

View File

@@ -56,6 +56,11 @@ namespace GHelper.AnimeMatrix
if (deviceSlash is not null) SetSlash(wakeUp);
}
public void SetLidMode()
{
if (deviceSlash is not null) deviceSlash.SetLidMode(AppConfig.Is("matrix_lid"));
}
public void SetSlash(bool wakeUp = false)
{

View File

@@ -127,6 +127,11 @@ namespace GHelper.AnimeMatrix
Set(Packet<SlashPacket>(0xD8, 0x01, 0x00, 0x01, status ? (byte)0x80 : (byte)0x00));
}
public void SetLidMode(bool status)
{
Set(Packet<SlashPacket>(0xD8, 0x00, 0x00, 0x02, 0xA5, status ? (byte)0x80 : (byte)0x00));
}
public void Set(Packet packet)
{
_usbProvider?.Set(packet.Data);