mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-03-02 15:43:53 +08:00
* like that * don't need that * cln * one lock like that? * or that * rename * guard with __name__ check * lib import * 20 min is on the edge
34 lines
547 B
Python
34 lines
547 B
Python
from panda import Panda, PandaDFU
|
|
from panda.tests.libs.resetter import Resetter
|
|
|
|
|
|
if __name__ == "__main__":
|
|
r = Resetter()
|
|
|
|
r.enable_boot(True)
|
|
r.cycle_power(5)
|
|
r.enable_boot(False)
|
|
|
|
pandas = PandaDFU.list()
|
|
print(pandas)
|
|
assert len(pandas) == 7
|
|
|
|
for serial in pandas:
|
|
p = PandaDFU(serial)
|
|
p.recover()
|
|
|
|
r.cycle_power(5)
|
|
|
|
pandas = Panda.list()
|
|
print(pandas)
|
|
assert len(pandas) == 7
|
|
|
|
for serial in pandas:
|
|
pf = Panda(serial)
|
|
if pf.bootstub:
|
|
pf.flash()
|
|
pf.close()
|
|
|
|
r.cycle_power(0)
|
|
r.close()
|