mirror of
				https://github.com/Klipper3d/klipper.git
				synced 2025-10-31 10:25:57 +01:00 
			
		
		
		
	flash_usb: Wait for busnum file to exist when flashing with picoboot
This solves an issue where the USB directory could exist, but the busnum file itself may not exist immediately. This was encountered when flashing a Pico connected to a Raspberry Pi 5. Signed-off-by: Jack Wakefield <jackwakefield@protonmail.com>
This commit is contained in:
		
				
					committed by
					
						 KevinOConnor
						KevinOConnor
					
				
			
			
				
	
			
			
			
						parent
						
							d9236f1c20
						
					
				
				
					commit
					b4aca122a1
				
			| @@ -198,7 +198,7 @@ def flash_picoboot(device, binfile, sudo): | ||||
|     # We need one level up to get access to busnum/devnum files | ||||
|     usbdir = os.path.dirname(devpath) | ||||
|     enter_bootloader(device) | ||||
|     wait_path(usbdir) | ||||
|     wait_path(usbdir + "/busnum") | ||||
|     with open(usbdir + "/busnum") as f: | ||||
|         bus = f.read().strip() | ||||
|     with open(usbdir + "/devnum") as f: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user