Jari пре 3 месеци
родитељ
комит
4138fcadb9
3 измењених фајлова са 7 додато и 3 уклоњено
  1. 2 1
      OpenPuck/OpenPuck.ino
  2. 3 1
      OpenPuck/mode_lizard.cpp
  3. 2 1
      OpenPuck/puck_hid.cpp

+ 2 - 1
OpenPuck/OpenPuck.ino

@@ -109,7 +109,8 @@ void usbReenumerate(uint8_t k)
 void modeSwitchReboot(uint8_t mode)
 {
 	if (modeValid(mode))
-		saveMode(mode); // 0xFF / invalid => keep the current mode (bond-import reboot)
+		saveMode(
+			mode); // 0xFF / invalid => keep the current mode (bond-import reboot)
 	if (USBDevice.mounted())
 		USBDevice.detach();
 	delay(60); // let the host see the disconnect before the pullup returns on reset

+ 3 - 1
OpenPuck/mode_lizard.cpp

@@ -101,7 +101,9 @@ static bool plt[NSLOT] = { false };
 static float sacc = 0;
 static uint8_t pmbtn = 0; // last-sent mouse buttons
 static uint8_t prevCC = 0; // last-sent consumer bits
-static uint8_t pmod = 0, pkc[6] = { 0, 0, 0, 0, 0, 0 }; // last-sent kbd modifier + keycodes
+static uint8_t pmod = 0, pkc[6] = {
+	0, 0, 0, 0, 0, 0
+}; // last-sent kbd modifier + keycodes
 
 void rfLizard(Adafruit_USBD_HID *mdev, Adafruit_USBD_HID *kdev, uint8_t mrid,
 	      uint8_t krid)

+ 2 - 1
OpenPuck/puck_hid.cpp

@@ -907,7 +907,8 @@ void SteamPuckController::task()
 				static const uint8_t neutral45[45] = { 0 };
 				for (int s = 0; s < NSLOT; s++)
 					if (g_slot[s].used && hid[s].ready())
-						usbTxHid(&hid[s], 0x45, neutral45,
+						usbTxHid(&hid[s], 0x45,
+							 neutral45,
 							 sizeof neutral45);
 			}
 			wasLizard = nowLizard;