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

Timers way off #109

Closed
ph4r opened this issue Mar 19, 2022 · 17 comments
Closed

Timers way off #109

ph4r opened this issue Mar 19, 2022 · 17 comments

Comments

@ph4r
Copy link

ph4r commented Mar 19, 2022

FluxDiag.zip
I started this 90 minute workout from vo2fast just as I started the Tour of Watopia event in Zwift. I kept Zwift in the foreground for a long time, I was tunning 0.1.29 Flux in Chrome 99 on Windows 10 using BLE Connections. The first interval ended promptly at 5 minutes as it should, but the 20 minutes interval that followed lasted nearly 40 minutes, and the interval and elapsed timer in Flux were very wrong. The 60 minute interval that followed lasted about 62 minutes which isn't great, but I could deal with it for this low-intensity workout. I loaded the workout, set my ftp and weight and pressed the play with a cirlce around it button and didn't press anything else in the interface until stop at the end. Here is the same workout as recorded by Zwift https://www.strava.com/activities/6849027852.

@dvmarinoff
Copy link
Owner

Hi and thanks for trying out the app.

In general the browser tab wont’t be able to sit in the background for a long time, maybe 5-10 min depending on the OS. At some point it will get suspended and the whole app along with the timer will freeze at this point in time. There might be a workaround by using the esoteric WebWorkers, but they tend to be limited and complicated. Will do some research and will give it a try.

I typically use Flux on my Android phone, and only cycle to the Zwift/RGT Companion App for a couple of minutes if I really need them (they don’t do much that the keyboard shortcuts can’t). Another option is to run Flux and Zwift in a split screen, which works for me on Mac and Android, but I don’t know what’s the state of this on Win10.

@dvmarinoff
Copy link
Owner

dvmarinoff commented Mar 20, 2022

@ph4r

Did some changes, by moving the Timer interval to a WebWorker, and my initial testing looks hopeful. The app was able to stay in background with RGT running in the foreground. How long is yet to be determined, but on MacOS the simulator script did a whole 1+ hour workout without issues and I had time to do only a small 25 min session today. Will need more time to confirm it works on Win10 and Android, I just have to ride some long sessions on each platform no other way around it.

Keeping the foreground app in windowed mode, works a bit better than having it in fullscreen mode, in which case some minor things like the painting of the live power graph are glitching.

You can try the latest work with the developer version.

@ph4r
Copy link
Author

ph4r commented Mar 21, 2022 via email

@ph4r
Copy link
Author

ph4r commented Mar 25, 2022 via email

@dvmarinoff
Copy link
Owner

Thanks for the feedback!

I am trying to unpack this, please correct me if I got it wrong.

  • you enter new FTP,
  • start a workout,
  • enter new FTP, at interval 5
  • resume workout, but its in interval 7

I know I am a bit behind on writing the manuals and How-To's so lets start with all the buttons:

___1_____2____3_____4____5_____6
Screenshot 2022-03-25 at 18 11 29

  1. the play with a circle starts the currently selected workout, and also the clock and recording if it ain't running already, if the User wants to just start a workout pressing this is enough,
  2. the play button is used to start/resume the clock and recording, shortcut: 'SPACEBAR' key
  3. pause button, shortcut: 'SPACEBAR' key
  4. lap / skip button, this will create a new Lap in free ride, or skip to next interval in workout, after the workout is over the app switches automatically to free ride, it can also be used before the workout is started, shortcut 'L' key
  5. stop, to see the stop button the User needs to first use the pause button,
  6. download workout, will be available after the recording is stopped

Other shortcuts are: 'e' for ERG mode, 'r', for Resistance mode, 's' for Slope/SIM mode, 'UP'/'Down' arrow keys for adjusting the current active mode target.

I am a bit confused by your description, the app doesn't have auto-pause functionality, and I couldn't recreate the play with a circle button not starting the workout or clock issue. FTP change is also dynamic you can change the value anytime, and it is not suppose to skip an interval, but it also want update the current target, only the remaining ones.

There are multiple in progress features on the development version the new big one is the Course simulation. This one got multiple updates for almost every day of the current week, and it's possible that something there is causing an issue, but my first attempts couldn't recreate the described problems, will keep trying, but my best current explanation is that there was some mix up with the short keys or the meaning of the buttons.

As for workout of the day sync, this feature would require at least a server and maybe user accounts for some platforms, which means more complexity to manage including legal one (like GDPR) plus some costs for server time and databases. Until I figure out how to monetize this project this feature won't be available.

Again, thanks for the feedback it is very valuable!

@ph4r
Copy link
Author

ph4r commented Mar 25, 2022 via email

@ph4r
Copy link
Author

ph4r commented Mar 27, 2022 via email

@dvmarinoff
Copy link
Owner

dvmarinoff commented Mar 28, 2022

Your description identified another issue, at the end of my workout it
didn't go to free-ride, it stayed at the same ERG Power and the Interval
Time started counting up instead of counting down,

Yes, that is exactly how it should work, the app will stay in the last active mode at the last known target, but since the structured intervals are over, the clock will count up to indicate open ended laps. Stop will reset the interval counter, mode and target to the beggining of the workout.

  • interval time graphical indicator,

Not too hard to make, but in my opinion it only duplicates information already available and creates clutter. If more people request it I will try to come up with something, but only for large enough screens.

  • compact view mode,

In November last year I refactored almost all of the styling and views to bring better responsiveness and cover device screens from tiny phones to 4K monitors. One of the nice to have features was Dock mode (very short + very wide). The problem here is that MacOS and Windows for some reason restrict the minimum height of the browser window to about 300px. To be viable it needs to fall down to like 140-160px. So this remains an option only for linux (Ubuntu) where the User can resize the browser window to whatever size. There are 2 possible workarounds for this, but both have some drawbacks:

  1. Creating installable app with something like Electron,
  2. Creating installable PWA by adding a service worker,

Since this will also be a pretty solid solution for the ‘use app in background’ issue, I’ll put some time in to investigate, and create a demo. Here is how the current design looks in the device screen simulator (1600x150px):
localhost_1234_(Dock Mode (M))

  • Better display Interval information with mouseover tooltips,

I’ve been wanting to solve this one for a long time, but I am seriously stuck on the design of the whole feature. I’ve tried many approaches and I am not happy with any of them, the current one with the tooltips is just the one I dislike the least. Since this feature is still in design phase I didn’t put any effort to make it responsive to changing screen sizes. Put I agree that it’s annoying will give it another try soon.

@ph4r
Copy link
Author

ph4r commented Mar 28, 2022 via email

@ph4r
Copy link
Author

ph4r commented Mar 29, 2022 via email

@dvmarinoff
Copy link
Owner

Nice one, haven't thought about that!

Here is how it looks on MacOS (27'' monitor) with RGT:
Screenshot 2022-03-30 at 9 51 27

BTW I can't see the attached images on github or in gmail, they appear as only as text: [image: image.png].

@dvmarinoff
Copy link
Owner

dvmarinoff commented Mar 30, 2022

Added some changes to the developer version:

  • responsive tooltips, font size is a little bigger and scales with the base font size of the workout list section for each media query
  • tooltips now show up also for the list of workouts and courses,
  • workout/course graphs are now fully calculated with javascript,
  • workouts/course graph will respond to window resize event, which itself is debounced on 300ms,
  • resolved some style clashes between Dock mode and Landscape phone media queries
  • correct setting of initial altitude on course change,
  • on workout end the trainer is set to slope mode and 0%

Next I am going to put some time into refining Dock mode, if you have ideas and suggestions now is the time to share.

@ph4r
Copy link
Author

ph4r commented Mar 30, 2022 via email

@dvmarinoff
Copy link
Owner

just opened a specific issue for improving Dock mode, will close this one and move the discussion there

@ph4r
Copy link
Author

ph4r commented Oct 11, 2022 via email

@ph4r
Copy link
Author

ph4r commented Oct 11, 2022 via email

@dvmarinoff
Copy link
Owner

Hey, @ph4r

glad it worked, did you had the app in the background for the whole duration?

BTW I can't see the attached image can you edit the comment with the Markdown syntax: [file_name](url)

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

No branches or pull requests

2 participants