SlimeVR / SlimeVR-Tracker-ESP

SlimeVR tracker firmware for ESP32/ESP8266 and different IMUs
Apache License 2.0
840 stars 288 forks source link

Fix rest detection timescale #305

Closed wigwagwent closed 6 months ago

wigwagwent commented 10 months ago

Sensor fusion expects the time to be in seconds while rest detection expects it to be in microseconds. This makes is so when the update sensor fusion is called the rest detection now gets the time in micros. Also linear acceleration was missing parentheses giving wrong results (only lsm6dsv uses this to my knowledge)

ButterscotchV commented 8 months ago

The time scale can probably be moved to RestDetection.h can't it? I think it's odd to have it different, otherwise this does look good I think?

wigwagwent commented 7 months ago

I changed the rest detection to be in seconds instead of in microseconds like it was before. I am not able to test this. The best way to test would be see if you can still calibrate a bmi160.