Skip to content

Conversation

john-michaelburke
Copy link
Collaborator

@john-michaelburke john-michaelburke commented Mar 30, 2022

  • Uprevs libsettings-rs to 0.6.8.

  • Applies a 1 second timeout on all read and write settings via with_timeout helpers in libsettings-rs "0.6.8". This can be validated by connecting to the piksi-relay. Previously, it would take the full 15 seconds for a single setting read to timeout. Additionally, if you attempted disconnecting in this first 15s it would lock up the app and not allow one to connect to another device.

  • Reworks the global timeout on read_all_settings by decoupling the global timeout from the individual settings read timeouts. Now a separate thread runs that will exit on a the watched ConnectionState (switching to either disconnected/connecting/disconnecting) or the global 15s timeout expiring. This can be validated by disconnecting from a serial device (while loading settings), previously this would lock up the app.

  • Minor additional check to prevent the app from trying to reconnect if the connection dialog is open.

There may be some additional corner cases not handled here we will need to watch out for but this looks very promising as we approach our release.

Copy link
Contributor

@notoriaga notoriaga left a comment

Choose a reason for hiding this comment

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

Settings and connections, the gifts that keep on giving.

Also I wrote a couple of unit tests for the new watch functions, should I just push them here?

const NTRIP_SETTING_GROUP: &str = "ntrip";
const NTRIP_ENABLE_SETTING_KEY: &str = "enable";

const SETTINGS_READ_WRITE_TIMEOUT_MS: Duration = Duration::from_millis(1000);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: drop the _MS, its not really "in" milliseconds its just a duration

Copy link
Collaborator Author

@john-michaelburke john-michaelburke Mar 31, 2022

Choose a reason for hiding this comment

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

Done. @notoriaga you are more than welcome to add unittests directly here. Fetch this most recent commit though.

@john-michaelburke john-michaelburke force-pushed the john-michaelburke/cpp-693 branch from 01ba1b4 to 93c499a Compare March 31, 2022 17:26
@john-michaelburke john-michaelburke enabled auto-merge (squash) March 31, 2022 17:28
@john-michaelburke john-michaelburke merged commit 1b59862 into main Mar 31, 2022
@john-michaelburke john-michaelburke deleted the john-michaelburke/cpp-693 branch March 31, 2022 18:17
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.

2 participants