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

Improve SNTP options #2613

Merged
merged 4 commits into from
Apr 3, 2023
Merged

Improve SNTP options #2613

merged 4 commits into from
Apr 3, 2023

Conversation

networkfusion
Copy link
Member

@networkfusion networkfusion commented Apr 2, 2023

Description

Improves default startup delay of SNTP for ChibiOS targets.

Motivation and Context

By default the delay was 30 seconds.
Given that return NetworkHelper.SetupAndConnectNetwork(requiresDateTime: true, token: token);
Where all samples (and appropriate timeout) would be CancellationTokenSource cs = new(10000); // ten seconds
It generally fails as the SNTP helper was not yet started yet.
It passes on a restart of the target because enough time has generally elapsed by the time the user has noticed and re-plugged the USB.

Although there are a number of improvements could be made, this fixes the most specific issue and also makes aware and fixes similar related to TI targets.

How Has This Been Tested?

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • New feature (non-breaking change which adds functionality to code)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dev Containers (changes related with Dev Containers, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist

  • My code follows the code style of this project (only if there are changes in source code).
  • My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • I have read the CONTRIBUTING document.
  • I have tested everything locally and all new and existing tests passed (only if there are changes in source code).

Add comments on TI targets.
@nfbot nfbot changed the title Improve STM32 SNTP options. Improve STM32 SNTP options Apr 2, 2023
@josesimoes josesimoes changed the title Improve STM32 SNTP options Improve SNTP options Apr 3, 2023
@josesimoes josesimoes added Area: Common libs Everything related with common libraries Series: TI-CC32xx and removed Type: bug labels Apr 3, 2023
Copy link
Member

@josesimoes josesimoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for looking into this.

@josesimoes josesimoes merged commit 1deab79 into main Apr 3, 2023
@josesimoes josesimoes deleted the improve-sntp branch April 3, 2023 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Common libs Everything related with common libraries Series: TI-CC32xx Type: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants