Open alistar79 opened 1 year ago
Not sure how to poke the state of usb0 in python but have a dodgy hack as I don't think the device will hit 0 power and still shutdown gracefully so I have hacked line 90 as so
if capacity <= self.options['shutdown']:
to
if capacity <= self.options['shutdown'] and capacity > 0:
When plugged into usb0 pisugar2 is switched off and device restarts. Anyway to get it to check if usb0 is active before restarting?