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

Apply default settings only if no json file is loaded / improve pairing speed #254

Merged
merged 1 commit into from
Feb 14, 2021

Conversation

switchabl
Copy link
Contributor

  • Only apply -a -g -H0 -A if no CLI arguments are given and no json file was loaded
  • Always show the lower part of the welcome message, even when options are given (I thought this made sense; if you don't like it I will revert)
  • Fixed calls to close for the json file (parentheses are required since Python 3, otherwise it does nothing)

I was investigating the pairing delay problem and in the process I realized that the default settings are applied even if a settings file is present. In particular, pedal stroke analysis is always active, even on trainers that don't support it. This appears to interfere with the pairing process (why remains to be investigated).

With the patch, pairing of the Genius or Vortex+HU for me is consistently

  • immediate with ANTUSB-m
  • < 5s with older ANTUSB2

@WouterJD
Copy link
Owner

-A implies multi-processing
FortiusAntBody's functions run in it's own process, the GUI in the parent process.

GUI functions (like SetValues) send a message to the GUIprocess.

Woukd this impact?

@switchabl
Copy link
Contributor Author

@WouterJD I always thought multi-processing was on by default anyway. But I have to admit I have never really looked at that part of the code properly.

To be honest, I have no clue why -A interferes with pairing. I stumbled on this by accident because it worked with one setup and not with another, so I compared logs and I found that was the only difference. And that turning it off in the settings doesn't do anything because of the bug.

If I figure out what is actually going on I'll let you know.

Do you have any thoughts on the the PR? I assume overriding the settings like this is not expected behaviour and should be fixed in any case, right?

@WouterJD
Copy link
Owner

I will check into detail shortly and think i willmerge as suggested

@WouterJD
Copy link
Owner

Kind a busy these days

@switchabl
Copy link
Contributor Author

No worries, I know the feeling. Take your time to check it properly. Don't want to fix one bug and make a new one.

@WouterJD WouterJD merged commit 5b081c3 into WouterJD:master Feb 14, 2021
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

2 participants