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

Method receivedUpdate

WirelessGamingReceiver/WirelessHIDDevice.cpp:222–241  ·  view source on GitHub ↗

Received an update of a specific value

Source from the content-addressed store, hash-verified

220
221// Received an update of a specific value
222void WirelessHIDDevice::receivedUpdate(unsigned char type, unsigned char *data)
223{
224 switch (type)
225 {
226 case 0x13: // Battery level
227 battery = data[0];
228 {
229 OSObject *prop = OSNumber::withNumber(battery, 8);
230 if (prop != NULL)
231 {
232 setProperty(kIOWirelessBatteryLevel, prop);
233 prop->release();
234 }
235 }
236 break;
237
238 default:
239 break;
240 }
241}
242
243// Received a normal HID update from the device
244void WirelessHIDDevice::receivedHIDupdate(unsigned char *data, int length)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected