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

Overlay window with gearing info #456

Closed
wants to merge 2 commits into from

Conversation

krusty82
Copy link

I added a small overlay window with the gearing.
The window is always-on-top and semitransparent.
You can overlay it to the CTP to keep track of your virtual gearing.

(I also changed the scale on the power display, but this can be ignored, that's just for me)

WouterJD added a commit that referenced this pull request Jan 27, 2024
@WouterJD
Copy link
Owner

WouterJD commented Jan 27, 2024

Hi Thomas, I have imported your code - but not using the pull.

  1. The overlay is a great idea, but I want to avoid a lot of documentation updates.
    So I did the following:
  • when FortiusAnt is NOT active and the gearbox is used, the Gearbox overlay appears.
  • if the user closes the overlay, it never comes back
  1. The modification of the power meter is made dynamic; if you exceed 400Watts (600, 800, 1000) it rescales automatically.

The updates are now available; antDongle and usbTrainer; please test
And it's a bit sloppy to do this in the master, but did not take the pain to create a branch this time.

Perhaps, I should have done the modifications in your branch, but honestly admit I'm not very familiar with all these functionalties. Sorry for that; I know it's not the expected way of work :-)

@WouterJD
Copy link
Owner

Hi Thomas, any feedback?

@krusty82
Copy link
Author

Hi Thomas, any feedback?

In my test, the Overlay did not show up.
I deactivated the GUI and activated the virtual gearing.

Also I like to have both, overlay and GUI (on the second screen)
But I must say, that your implementation is quite elegant.
And different from my trial-and-error method :)

@WouterJD
Copy link
Owner

The panel should show up:

  • when virtual gear is used
  • rge GUI is not active (does not have the ficus; another app is active)

I'll test too

@krusty82
Copy link
Author

The panel should show up:

  • when virtual gear is used
  • rge GUI is not active (does not have the ficus; another app is active)

I'll test too

Oh, I misunderstood the "active" part. I thought the GUI mustn't be visible.
I tested again, and it is working.
Only a small thing, the overlay window is sizeable, which is not necessary, and windows will maximise it if dragged to the top of the screen.
I think removing wx.DEFAULT_FRAME_STYLE from the frame style should fix that.

The resizing of the power display I will test later. I need some warmup to get over 400 Watts ;)

@WouterJD
Copy link
Owner

I think removing wx.DEFAULT_FRAME_STYLE from the frame style should fix that.

Yeah, I discovered that too.
I agree that no resizing is usefull, but the close-button is - what settings should I use?

@WouterJD
Copy link
Owner

The resizing of the power display I will test later. I need some warmup to get over 400 Watts ;)

Great. Now provide screen-prints for > 400 >600 > 800 Watt :-)
To be published in Raspberry-Pi-Hall-of-Fame

@krusty82
Copy link
Author

I think removing wx.DEFAULT_FRAME_STYLE from the frame style should fix that.

Yeah, I discovered that too. I agree that no resizing is usefull, but the close-button is - what settings should I use?

Okay, then replacing wx.DEFAULT_FRAME_STYLE with wx.CLOSE_BOX should do the trick.

@krusty82
Copy link
Author

The resizing of the power display I will test later. I need some warmup to get over 400 Watts ;)

Great. Now provide screen-prints for > 400 >600 > 800 Watt :-) To be published in Raspberry-Pi-Hall-of-Fame

I forgot to take screenshots :(
But I also only got slightly above 600 Watts. The resizing worked, but I noticed that with the resize, the array for averageing the power got reset, so the needle startet at 0 again.

WouterJD added a commit that referenced this pull request Jan 31, 2024
@WouterJD
Copy link
Owner

Should be solved in current FortiusAndGui.py

@WouterJD
Copy link
Owner

Okay, then replacing wx.DEFAULT_FRAME_STYLE with wx.CLOSE_BOX should do the trick.

Will check; just done training.

@WouterJD
Copy link
Owner

Hi @krusty82 what shall we do; do you want to merge your branch with master or shall I close this one with comments

@krusty82
Copy link
Author

Hi @krusty82 what shall we do; do you want to merge your branch with master or shall I close this one with comments

You can close it. Your solution works perfectly and is much eleganter than mine.

@WouterJD
Copy link
Owner

Suggestions from this PR have been adopted and integrated in the master,.

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