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

Fixes boot #6

Merged
merged 2 commits into from
Mar 28, 2024
Merged

Fixes boot #6

merged 2 commits into from
Mar 28, 2024

Conversation

Bentlybro
Copy link
Member

@Bentlybro Bentlybro commented Mar 28, 2024

this bit of code was preventing boot as it was waiting for serial, by removing it the device is now able to properly boot!

while (!Serial)
{
  delay(10);
}

things to note: removing this loop means we won't see the startup logs unless we directly restart it while its connected to serial

Update

added a 500ms wait to check if there is serial, if so connect to that if not start as normal

  unsigned long startMillis = millis();
  while (!Serial && millis() - startMillis < 500)
  {
    delay(10); // Short delay to prevent hanging in a tight loop
  }

@Bentlybro Bentlybro marked this pull request as draft March 28, 2024 23:26
@Bentlybro Bentlybro marked this pull request as ready for review March 28, 2024 23:44
@akshaynarisetti
Copy link
Collaborator

Looks Good @Bentlybro, let’s merge this

@Bentlybro Bentlybro merged commit f92dd90 into BasedHardware:main Mar 28, 2024
@Wladefant
Copy link
Contributor

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants