linux-automation / usbsdmux

USB-SD-Mux Project - Driver and Documentation
GNU Lesser General Public License v2.1
66 stars 19 forks source link

usbsdmux: honor wait argument in mode_disconnect() #28

Closed Bastian-Krause closed 3 years ago

Bastian-Krause commented 4 years ago

Only sleep one second until the voltage-supply of the SD card is ~0 if wait=True is given.

Fixes: 3f9f04a ("High Level Application to control the usb-sd-mux from the command line")

jluebbe commented 4 years ago

Why shouldn't this be the default?

Bastian-Krause commented 4 years ago

Hm? It is the default, look at the wait parameter in the method header. The only call of UsbSdMux.mode_disconnect(wait=False) happens in UsbSdMux.__init__() which sets the output-values to defaults. I don't really understand the reasoning behind this, maybe @SmithChart can help here? All I understand is that the wait parameter is currently unused and I tried to fix that by doing the obvious.