Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (21 sloc) 949 Bytes
import os, sys, inspect
import time
import logging
lib_folder = os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0], '..')
lib_load = os.path.realpath(os.path.abspath(lib_folder))
if lib_load not in sys.path:
sys.path.insert(0, lib_load)
FORMAT = '%(levelname)-8s %(message)s'
logger = logging.getLogger('USB Hub Status')
import capablerobot_usbhub
hub = capablerobot_usbhub.USBHub()
hub.i2c.enable()"Port Connections : {}".format(hub.connections()))"Port Speeds : {}".format(hub.speeds()))"Port Currents (mA)")" Measured : " + " ".join([("%.2f" % v).rjust(7) for v in hub.power.measurements()]))" Limit : {}".format(hub.power.limits()))" Alerts : {}".format(" ".join(hub.power.alerts())))" State : {}".format(hub.power.state()))
You can’t perform that action at this time.