-
Notifications
You must be signed in to change notification settings - Fork 130
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
Added slider to settings gui for adjusting wake up sensitivity #80
Conversation
Thanks for your PR. Need some more days. Still working on #76 |
I tested it on my OMOTE. Values bigger than let's say 50% of the slider are not really usable, bause the OMOTE immediately wakes up, without any movement. Default from @CoretechR was 0x45, which is already quite sensitive. And it should be checked if there is already a value in preferences. If not, the old default of 0x45 should be used. |
Ok, I’ll add a default in preferences for 0x45 and set the minimum to 0x40. |
Does this really work for you? Old default value: First version of PR: Second version of PR: Values that are written to the IMU should be between 0x7F and 0x40. Now they are between 0x3F and 0x00. |
Sliders only support ranges from min to max but the slider visual and the setting to the IMU are reversed. At the IMU we therefore store 0x7F, which is the maximum possible value, minus the slider value: 0x7F-0x3A = 0x45. So if the minimum IMU value is practically 0x40, the maximum slider value shuld be 0x3F. We use a non signed variable so we only need to do a sanitycheck on the maximum slider value of 0x3F.
Should be fixed now, the threshold of the IMU will be set to: |
Sorry, but this still does not work. Could you please test it? This cannot work:
-> now you ALWAYS have 0x40 as slider value
-> now you ALWAYS have 0x3F as threshold value. Please test with Serial.print
|
Not abandoned but want to test it thoroughly this time. |
I’ll issue a new req. when I’m ready. |
The settings page now has an added slider with which you can adjust the sensitivity of movement detection for waking up Omote. After adjusting the slider the changes take effect when Omote falls to sleep again.
The greater the value of the slider (the more you slide it to the right), the more sensitive Omote is for movement to wake it up again.