zwifit
zwifit copied to clipboard
Incline can't be set to 0%
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