Skip to content

Commit

Permalink
Plane: servos auto trim: disable when trim finished only if SERVO_AUT…
Browse files Browse the repository at this point in the history
…O_TRIM was set to PERMANENT
  • Loading branch information
shellixyz committed Dec 10, 2023
1 parent b53ab9f commit a8966e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/SRV_Channel/SRV_Channels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ void SRV_Channels::init(uint32_t motor_mask, AP_HAL::RCOutput::output_mode mode)

void SRV_Channels::disable_autotrim_if_temporary_enabled()
{
if (auto_trim == SRV_Channels::SERVO_AUTO_TRIM_ONCE) {
if (auto_trim != SRV_Channels::SERVO_AUTO_TRIM_PERMANENT) {
auto_trim.set_and_save(SRV_Channels::SERVO_AUTO_TRIM_DISABLED);
}
}
Expand Down

0 comments on commit a8966e8

Please sign in to comment.