mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-18 17:23:52 +08:00
* temporarily disable Jenkins * firmware * python lib * tests * .. * usb load switch to high * it is still red * usb power mode remove * Revert "temporarily disable Jenkins" This reverts commit a911cfad8daf10763489b7e7bc10107e77eef4bf. * forgot this * common periph * change name * board tick * add V2 to CI * update known bootstub
36 lines
729 B
Python
36 lines
729 B
Python
from panda import Panda, PandaDFU
|
|
from panda.tests.libs.resetter import Resetter
|
|
|
|
|
|
# resets power for both jungles(ports 1 and 2) and USB hubs(port 3)
|
|
# puts pandas into DFU mode and flashes bootstub + app
|
|
if __name__ == "__main__":
|
|
r = Resetter()
|
|
|
|
r.enable_boot(True)
|
|
r.cycle_power(delay=5, ports=[1,2,3])
|
|
r.enable_boot(False)
|
|
|
|
pandas = PandaDFU.list()
|
|
print(pandas)
|
|
assert len(pandas) == 8
|
|
|
|
for serial in pandas:
|
|
p = PandaDFU(serial)
|
|
p.recover()
|
|
|
|
r.cycle_power(delay=5, ports=[1,2])
|
|
|
|
pandas = Panda.list()
|
|
print(pandas)
|
|
assert len(pandas) == 8
|
|
|
|
for serial in pandas:
|
|
pf = Panda(serial)
|
|
if pf.bootstub:
|
|
pf.flash()
|
|
pf.close()
|
|
|
|
r.cycle_power(delay=0, ports=[1,2])
|
|
r.close()
|