Parcourir la source

RP2MCU: Fix USB console not connecting

There was a regression caused by commit 7238526d551f0f3 which
caused the USB console not to connect after the first SCSI request
had been processed.

This seems to be related to the USB request timeout of 500 ms, where
the polling interval was previously 1000 ms.

I didn't research deep enough to find why this works before the first
SCSI request, nor why it doesn't work afterwards. The USB IRQ still
seems to be called so it has something to do with the userspace
processing of requests. Possibly the USB MSC support also affects
it.

In any case, lowering the polling interval to 50 ms fixed the issue
and gives just as good performance.
Petteri Aimonen il y a 7 mois
Parent
commit
11004b68eb
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      lib/ZuluSCSI_platform_RP2MCU/ZuluSCSI_platform.cpp

+ 1 - 1
lib/ZuluSCSI_platform_RP2MCU/ZuluSCSI_platform.cpp

@@ -665,7 +665,7 @@ static bool usb_serial_connected()
     if (platform_msc_lock_get()) return connected; // Avoid re-entrant USB events
 #endif
 
-    if (last_check_time == 0 || (uint32_t)(millis() - last_check_time) > 1000)
+    if (last_check_time == 0 || (uint32_t)(millis() - last_check_time) > 50)
     {
         connected = bool(Serial);
         last_check_time = millis();