mirror of https://github.com/ArduPilot/ardupilot
Flipped the signs. Should be right.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1500 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
3558567aad
commit
53b2560412
|
@ -98,15 +98,15 @@ void read_trim_switch()
|
||||||
void trim_accel()
|
void trim_accel()
|
||||||
{
|
{
|
||||||
if(rc_1.control_in > 0){
|
if(rc_1.control_in > 0){
|
||||||
imu.ay(imu.ay() + 1);
|
|
||||||
}else if (rc_1.control_in < 0){
|
|
||||||
imu.ay(imu.ay() - 1);
|
imu.ay(imu.ay() - 1);
|
||||||
|
}else if (rc_1.control_in < 0){
|
||||||
|
imu.ay(imu.ay() + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(rc_2.control_in > 0){
|
if(rc_2.control_in > 0){
|
||||||
imu.ax(imu.ax() + 1);
|
|
||||||
}else if (rc_2.control_in < 0){
|
|
||||||
imu.ax(imu.ax() - 1);
|
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());
|
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