Skip to content
Snippets Groups Projects
Commit 872ec65a authored by Robert Lefebvre's avatar Robert Lefebvre
Browse files

Fix Auto_Trim to allow it to actually be called when setup on Ch7 pulldown menu in MP.

parent c0a381f1
No related branches found
No related tags found
No related merge requests found
......@@ -72,11 +72,6 @@ static void read_trim_switch()
}
}
#elif CH7_OPTION == CH7_AUTO_TRIM
if (g.rc_7.radio_in > CH_7_PWM_TRIGGER){
auto_level_counter = 10;
}
#else
// this is the normal operation set by the mission planner
......@@ -152,6 +147,10 @@ static void read_trim_switch()
// 3 = command total
}
}
}else if (g.ch7_option == CH7_AUTO_TRIM){
if (g.rc_7.radio_in > CH_7_PWM_TRIGGER){
auto_level_counter = 10;
}
}
#endif
......@@ -212,7 +211,7 @@ static void trim_accel()
trim_roll = constrain(trim_roll, -1.5, 1.5);
trim_pitch = constrain(trim_pitch, -1.5, 1.5);
if(g.rc_1.control_in > 200){ // Roll RIght
if(g.rc_1.control_in > 200){ // Roll Right
imu.ay(imu.ay() - trim_roll);
}else if (g.rc_1.control_in < -200){
imu.ay(imu.ay() - trim_roll);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment