updated and tested the auto-trim mode of the accell offsets. Works great, although it's slow, only .6° a second.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1525 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
7205208801
commit
09df4b35ea
@ -98,15 +98,15 @@ void read_trim_switch()
|
||||
void trim_accel()
|
||||
{
|
||||
if(rc_1.control_in > 0){
|
||||
imu.ay(imu.ay() - 1);
|
||||
}else if (rc_1.control_in < 0){
|
||||
imu.ay(imu.ay() + 1);
|
||||
}else if (rc_1.control_in < 0){
|
||||
imu.ay(imu.ay() - 1);
|
||||
}
|
||||
|
||||
if(rc_2.control_in > 0){
|
||||
imu.ax(imu.ax() - 1);
|
||||
}else if (rc_2.control_in < 0){
|
||||
imu.ax(imu.ax() + 1);
|
||||
}else if (rc_2.control_in < 0){
|
||||
imu.ax(imu.ax() - 1);
|
||||
}
|
||||
|
||||
Serial.printf("r:%ld p:%ld ax:%d, ay:%d, az:%d\n", dcm.roll_sensor, dcm.pitch_sensor, imu.ax(), imu.ay(), imu.az());
|
||||
|
Loading…
Reference in New Issue
Block a user