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

#216 g UI crash on raspberry #225

Merged
merged 20 commits into from
Feb 4, 2021
Merged

#216 g UI crash on raspberry #225

merged 20 commits into from
Feb 4, 2021

Conversation

GewoonGijs
Copy link
Contributor

@WouterJD I tested it yesterday evening, and it worked like a charm. Had a nice workout on Strava :)

@WouterJD
Copy link
Owner

@GewoonGijs now you've put me on the CallAfter() track; I also noted that the UI works better.

The data-fields op top of the SpeedMeters did not always refresh and all I knew to do is the code in
https://github.com/WouterJD/FortiusANT/blob/%23216-GUI-crash-on-raspberry/pythoncode/FortiusAntGui.py#L846
adding an alternating dot or comma to force refresh.
This already proves to be unnecesary; thanks!

Perhaps you can answer the question why self.panel.Refresh() is required to keep the data-fields visible.
The fields are more stable but still flickering a bit.

Perhaps it's related to the drawing actions in OnPaint().

Your suggestions are appreciated

@GewoonGijs
Copy link
Contributor Author

Hi Wouter, I just looked in to it, and i think the problem is that the TextCtrl's are on top of the SpeedMeter controls. As is explained here http://wxpython-users.1045709.n5.nabble.com/wxPanels-and-Raise-td2316013.html wxPython has nog proper way to handle two controls that are placed on top of each other. I think the proper way to solve this is to place the textCtrl's below the SpeedMeter gauges. Maybe you can make the SpeedMeter a little less hig, and create som space for the text Ctrl's.

The self.panel.Refresh() works, because the complete panel is painted from scratch every cycle I think.

@WouterJD
Copy link
Owner

Thanks. I keep it asis then - no big issue.
The callafter() is already a hughe improvement👍

@WouterJD WouterJD merged commit b79720c into master Feb 4, 2021
@WouterJD WouterJD deleted the #216-GUI-crash-on-raspberry branch February 4, 2021 14:34
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