Open koenkooi opened 10 years ago
Looks like everything is happening around here https://github.com/koenkooi/multiwii-firmware/blob/flexbot-quad/Sensors.cpp#L1365 for the gyro, and here https://github.com/koenkooi/multiwii-firmware/blob/flexbot-quad/Sensors.cpp#L1390 for the acc. The value doesn't get changed afterwards.
And the calibration is happening here https://github.com/koenkooi/multiwii-firmware/blob/flexbot-quad/Sensors.cpp#L328 for the gyro and here https://github.com/koenkooi/multiwii-firmware/blob/flexbot-quad/Sensors.cpp#L398 for the acc. (Just so I'm not looking for them afterwards).
Reading through the multiwii forum I came across this:
http://www.multiwii.com/forum/viewtopic.php?f=7&t=3880
The MPU6050 is being used in low-accuracy mode because multiwii was designed for Wii sensors. Sebastion has a patch:
https://github.com/sebastianherp/multiwii-firmware/commit/03b3d8a976855d7b54c3eb71729e4fecc0a8f40a
The multiwii internals have been reworked, so it doesn't apply anymore, but I think the two improvements are worth investigating. Reading all values in one go should be straightforward, the range and divider changes will need some considerations.