Skip to content

Conversation

notoriaga
Copy link
Contributor

No description provided.


pub fn import(&mut self, path: String) -> Result<()> {
let mut f = {
let path = PathBuf::from(path.trim_start_matches("file://"));
Copy link
Collaborator

@john-michaelburke john-michaelburke Sep 13, 2021

Choose a reason for hiding this comment

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

Might need to test this functionality on windows. I have experienced issues in the past with an additional slash. See:
https://github.com/swift-nav/console_pp/blob/d0995c42c0a1bbd08b1ca39b27e5d505f4c2284e/resources/UpdateTabComponents/FileIOSelectLocalFileAndDestPath.qml#L99

What I was seeing is that the returned path would have a prefix with three slashes file:/// and replacing this with an empty string would work for windows but kill the root / for unix i.e. file:///usr/bin would become usr/bin

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll do some quick testing on Windows to see what happens

Copy link
Contributor

Choose a reason for hiding this comment

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

I get this when trying to export settings on windows:

Screenshot 2021-09-13 201610

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved the leading '/' fix into Utils.fileUrlToString and switched the import/export to use that helper so should be good

@silverjam
Copy link
Contributor

Seeing an issue when attempting to adjust the imu.acc_range setting:

Screenshot 2021-09-13 204334

Reports the following error:

Screenshot 2021-09-13 204353

@notoriaga notoriaga force-pushed the steve/settings-tab2 branch 2 times, most recently from bd58702 to fe416bf Compare September 14, 2021 19:47
@notoriaga
Copy link
Contributor Author

Seeing an issue when attempting to adjust the imu.acc_range setting:

Screenshot 2021-09-13 204334

Reports the following error:

Screenshot 2021-09-13 204353

So it looks like there is no special case for this setting, rather the old console will update the enumerated_possible_values with whats returned by the device rather than just using the settings.yaml - https://github.com/swift-nav/piksi_tools/blob/18596b98df8f1609dce809041b647fbb6edb47bb/piksi_tools/console/settings_view.py#L581. Doing something similar it appears to work

@silverjam
Copy link
Contributor

I think we're almost there, I'm seeing an issue on Windows now when importing settings:

Screenshot 2021-09-14 211133

@john-michaelburke
Copy link
Collaborator

I think we're almost there, I'm seeing an issue on Windows now when importing settings:

Screenshot 2021-09-14 211133

I could take a look on my windows machine tomorrow morning.

@silverjam
Copy link
Contributor

I think we're almost there, I'm seeing an issue on Windows now when importing settings:

Screenshot 2021-09-14 211133

Latest pushes fixes this issue and I'm able to import successfully

@notoriaga notoriaga merged commit e7c5d73 into main Sep 15, 2021
@notoriaga notoriaga deleted the steve/settings-tab2 branch September 15, 2021 19:30
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.

3 participants