Skip to content
This repository has been archived by the owner on May 8, 2021. It is now read-only.

Incline can't be set to 0% #39

Open
FuturityUK opened this issue Apr 9, 2021 · 0 comments
Open

Incline can't be set to 0% #39

FuturityUK opened this issue Apr 9, 2021 · 0 comments

Comments

@FuturityUK
Copy link

Describe the bug
Either in the frontend, or in my case a simple test Android App, setting a control message where incline is set to 0 results in:
newIncline == undefined
This is in the controlRequested() fuction in the file: ./src/ble/ifit/index.js

To Reproduce
In the frontend, increase the incline, wait for the treadmill to reach the set incline value, then set it to 0%. Nothing will happen.

Expected behavior
When the control message has incline=0, it should set the incline to 0%

Screenshots
None, as it is easy to reproduce.

Desktop (please complete the following information):
Tested in Chrome, Firefox, and also an Android App written in MIT App Inventor 2

Additional context
My workaround in my basic app is to set an incline of -1 whenever I want to set the incline to 0. The current Zwifit code will automatically see that this is lower than 0 and set the incline to 0. I've tested this via debug in my code, but I haven't tested it on my treadmill as I'm having problems switching into control mode

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant