WouterJD / FortiusANT

FortiusANT enables a pre-smart Tacx trainer (usb- or ANT-connected) to communicate with TrainerRoad, Rouvy or Zwift through ANT or Bluetooth LE.
GNU General Public License v3.0
143 stars 77 forks source link

Overlay window with gearing info #456

Closed krusty82 closed 4 months ago

krusty82 commented 5 months ago

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 commented 5 months ago

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
  2. 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 commented 5 months ago

Hi Thomas, any feedback?

krusty82 commented 5 months ago

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 commented 5 months ago

The panel should show up:

krusty82 commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

Should be solved in current FortiusAndGui.py

WouterJD commented 5 months ago

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

Will check; just done training.

WouterJD commented 4 months ago

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

krusty82 commented 4 months ago

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 commented 4 months ago

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