mirror of https://github.com/commaai/panda.git
cleanup
This commit is contained in:
parent
55b7965d9c
commit
f6bfea959d
|
@ -27,7 +27,7 @@ void bootkick_tick(bool ignition, bool recent_heartbeat) {
|
|||
* only try once per panda boot, since openpilot will reset panda on startup
|
||||
* once BOOT_RESET is triggered, it stays until countdown is finished
|
||||
*/
|
||||
if ((boot_state == BOOT_BOOTKICK) && (boot_state_prev == BOOT_STANDBY) && !bootkick_reset_triggered) {
|
||||
if (!bootkick_reset_triggerd && (boot_state == BOOT_BOOTKICK) && (boot_state_prev == BOOT_STANDBY)) {
|
||||
waiting_to_boot_countdown = 45U;
|
||||
}
|
||||
if (waiting_to_boot_countdown > 0U) {
|
||||
|
|
|
@ -14,15 +14,14 @@ def pj():
|
|||
jungle = PandaJungle(JUNGLE_SERIAL)
|
||||
jungle.flash()
|
||||
|
||||
#jungle.reset()
|
||||
jungle.reset()
|
||||
jungle.set_ignition(False)
|
||||
|
||||
yield jungle
|
||||
|
||||
#jungle.set_panda_power(False)
|
||||
jungle.set_panda_power(False)
|
||||
jungle.close()
|
||||
|
||||
# TODO: the on-device script relies on the health packet, so this
|
||||
@pytest.fixture(scope="function")
|
||||
def p(pj):
|
||||
# note that the 3X's panda lib isn't updated, which
|
||||
|
@ -140,15 +139,16 @@ def test_recovery_from_qdl(p, pj):
|
|||
# try to boot
|
||||
time.sleep(1)
|
||||
pj.set_ignition(True)
|
||||
|
||||
# normally, this GPIO is set immediately since it's first enabled in the ABL
|
||||
for i in range(30):
|
||||
assert not p.read_som_gpio()
|
||||
time.sleep(1)
|
||||
time.sleep(3)
|
||||
|
||||
# release FORCE_USB_BOOT
|
||||
for i in range(10):
|
||||
pj.set_header_pin(i, 0)
|
||||
|
||||
# normally, this GPIO is set immediately since it's first enabled in the ABL
|
||||
for i in range(40):
|
||||
assert not p.read_som_gpio()
|
||||
time.sleep(1)
|
||||
|
||||
# should boot after 45s
|
||||
wait_for_boot(p, pj, reset_expected=True, bootkick=True, timeout=120)
|
||||
|
|
Loading…
Reference in New Issue