mirror of
https://github.com/opentx/opentx.git
synced 2025-07-15 20:35:17 +03:00
Add gyro settings computations
This commit is contained in:
parent
ca8fa60874
commit
d775a91545
5 changed files with 9 additions and 5 deletions
|
@ -66,5 +66,8 @@ void Gyro::wakeup()
|
|||
outputs[0] = rad2RESX(atan2f(accValues[1], accValues[2]));
|
||||
outputs[1] = rad2RESX(atan2f(-accValues[0], accValues[2]));
|
||||
|
||||
scaled_outputs[0] = limit(-RESX, (int)(outputs[0] - g_eeGeneral.gyroOffset * RESX/180) * (180 / (GYRO_MAX_DEFAULT + g_eeGeneral.gyroMax)), RESX);
|
||||
scaled_outputs[1] = limit(-RESX, outputs[1] * (180 / (GYRO_MAX_DEFAULT + g_eeGeneral.gyroMax)), RESX);
|
||||
|
||||
// TRACE("%d %d", values[0], values[1]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue