diff options
author | Justin Berger <j.david.berger@gmail.com> | 2018-04-21 00:26:31 -0600 |
---|---|---|
committer | Justin Berger <j.david.berger@gmail.com> | 2018-04-21 00:26:31 -0600 |
commit | 00cd1e5e17062c816a3b289a90c7d3afa6208fd4 (patch) | |
tree | 5c5c4b19d0f4af5041adc98ee358a2d303abb48c | |
parent | 135904406d50bc2199698c3177307e470151e7f9 (diff) | |
download | libsurvive-00cd1e5e17062c816a3b289a90c7d3afa6208fd4.tar.gz libsurvive-00cd1e5e17062c816a3b289a90c7d3afa6208fd4.tar.bz2 |
Adjusted and verified acc values on HMD
-rw-r--r-- | src/survive_default_devices.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/survive_default_devices.c b/src/survive_default_devices.c index 4fa3284..44dca1d 100644 --- a/src/survive_default_devices.c +++ b/src/survive_default_devices.c @@ -173,16 +173,12 @@ int survive_load_htc_config_format(SurviveObject *so, char *ct0conf, int len) { // Handle device-specific sacling. if (strcmp(so->codename, "HMD") == 0) { if (so->acc_scale) { - so->acc_scale[0] *= -1. / 8192.0; - so->acc_scale[1] *= -1. / 8192.0; - so->acc_scale[2] *= 1. / 8192.0; + scale3d(so->acc_scale, so->acc_scale, 1. / 8192.0); } if (so->acc_bias) scale3d(so->acc_bias, so->acc_bias, 2. / 1000.); // Odd but seems right. if (so->gyro_scale) { - so->gyro_scale[0] *= -0.000065665; - so->gyro_scale[1] *= -0.000065665; - so->gyro_scale[2] *= 0.000065665; + scale3d(so->gyro_scale, so->gyro_scale, 0.000065665); } } else if (memcmp(so->codename, "WM", 2) == 0) { if (so->acc_scale) |