Sfoglia il codice sorgente

Prevent repeated Steam connection reports

Co-authored-by: safijari <5191844+safijari@users.noreply.github.com>
copilot-swe-agent[bot] 1 settimana fa
parent
commit
be97ee1906
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      OpenPuck/puck_hid.cpp

+ 2 - 2
OpenPuck/puck_hid.cpp

@@ -1058,8 +1058,8 @@ void SteamPuckController::task()
 			last43[s] = millis();
 		}
 	}
-	// Reset edge state for slots that are no longer used/ready (so a re-bond sees a fresh edge).
+	// Reset edge state only when the slot or USB device goes away; ready() is transiently false while busy.
 	for (int s = 0; s < NSLOT; s++)
-		if (!g_slot[s].used || !hid[s].ready())
+		if (!g_slot[s].used || !USBDevice.mounted())
 			usbConn[s] = false;
 }