adafruit / Adafruit_TinyUSB_Arduino

Arduino library for TinyUSB
MIT License
476 stars 127 forks source link

Allow to see progress of file copy #434

Closed philippejadin closed 2 months ago

philippejadin commented 3 months ago

Is your feature request related to a problem? Please describe. First, thank you for the great library! When copying a file from a host computer (linux) to an sdcard connected to a pi pico using usb (with this example : https://github.com/adafruit/Adafruit_TinyUSB_Arduino/blob/master/examples/MassStorage/msc_sdfat/msc_sdfat.ino) , it works fine, but there is no progress bar on the linux side. For example, I copy a 20 Mb file, the progress bar stays at 0%, and after a minute of so, jumps to 100%. Since the transfer is slow (which is expected I guess), the end user might think the copy process staled.

Describe the solution you'd like If possible, provide a progress information of the copy to the host OS.

Describe alternatives you've considered One could warn the enduser that the copy will jump from 0 to 100% and might take a while to complete.

hathach commented 2 months ago

we don't how to do that, it is probably not usb related. OS probably decide the nnumber of bytes is too small to show progres. If you figure it out, PR is welcome