1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 06:45:16 +03:00

change divisions by acc_1G to multiply by the reciprocal value

This commit is contained in:
leocb 2018-08-09 14:41:05 -03:00
parent 946cbd257f
commit 34b0707cb6
8 changed files with 13 additions and 11 deletions

View file

@ -362,6 +362,7 @@ bool accInit(uint32_t gyroSamplingInverval)
}
acc.dev.acc_1G = 256; // set default
acc.dev.initFn(&acc.dev); // driver initialisation
acc.dev.acc_1G_rec = 1 / acc.dev.acc_1G;
// set the acc sampling interval according to the gyro sampling interval
switch (gyroSamplingInverval) { // Switch statement kept in place to change acc sampling interval in the future
case 500: