MCPcopy Create free account
hub / github.com/360Controller/360Controller / SetLEDs

Method SetLEDs

WirelessGamingReceiver/WirelessHIDDevice.cpp:50–60  ·  view source on GitHub ↗

Sets the LED with the same format as the wired controller

Source from the content-addressed store, hash-verified

48
49// Sets the LED with the same format as the wired controller
50void WirelessHIDDevice::SetLEDs(int mode)
51{
52 unsigned char buf[] = {0x00, 0x00, 0x08, (unsigned char)(0x40 + (mode % 0x0e)), 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
53 WirelessDevice *device = OSDynamicCast(WirelessDevice, getProvider());
54
55 if (device != NULL)
56 {
57 device->SendPacket(buf, sizeof(buf));
58 device->SendPacket(weirdStart, sizeof(weirdStart));
59 }
60}
61
62// Returns the battery level
63unsigned char WirelessHIDDevice::GetBatteryLevel(void)

Callers

nothing calls this directly

Calls 1

SendPacketMethod · 0.80

Tested by

no test coverage detected