Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase ESP flashing timeout by 5s to match GAP8 #527

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cflib/bootloader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def flash(self, filename: str, targets: List[Target], cf=None, enable_console_lo
self.progress_cb('Deck updated! Restarting...', int(100))
if current_index != -1:
PowerSwitch(self.clink).reboot_to_fw()
if any(deck.target == 'bcAI:gap8' for deck in deck_targets):
if any(deck.target in ['bcAI:gap8', 'bcAI:esp'] for deck in deck_targets):
time.sleep(7)
else:
time.sleep(2)
Expand Down Expand Up @@ -337,7 +337,7 @@ def flash_full(self, cf: Optional[Crazyflie] = None,

if filename is not None:
self.flash(filename, targets, cf, enable_console_log=enable_console_log)
self.reset_to_firmware()
self.reset_to_firmware(boot_delay=5.0)

def _get_flash_artifacts_from_zip(self, filename):
if not zipfile.is_zipfile(filename):
Expand Down Expand Up @@ -604,7 +604,7 @@ def _flash_deck_incrementally(self, artifacts: List[FlashArtifact], targets: Lis
self.progress_cb(f'Updating deck {deck.name}', 0)

# Test and wait for the deck to be started
if any(deck.name == 'bcAI:gap8' for deck in decks.values()):
if any(deck.name in ['bcAI:gap8', 'bcAI:esp'] for deck in decks.values()):
timeout_time = time.time() + 9
else:
timeout_time = time.time() + 4
Expand Down Expand Up @@ -634,7 +634,7 @@ def _flash_deck_incrementally(self, artifacts: List[FlashArtifact], targets: Lis
continue

# Wait for bootloader to be ready
if any(deck.name == 'bcAI:gap8' for deck in decks.values()):
if any(deck.name in ['bcAI:gap8', 'bcAI:esp'] for deck in decks.values()):
timeout_time = time.time() + 9
else:
timeout_time = time.time() + 4
Expand Down