mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-08 02:17:07 +08:00
move initial pwm trim update to pwm_ioctl load case
This commit is contained in:
committed by
Lorenz Meier
parent
6a6e9d02a3
commit
08d36fe2af
@@ -771,10 +771,7 @@ PX4FMU::update_pwm_trims()
|
||||
{
|
||||
PX4_DEBUG("update_pwm_trims");
|
||||
|
||||
if (_mixers == nullptr) {
|
||||
PX4_WARN("no mixers defined");
|
||||
|
||||
} else {
|
||||
if (_mixers != nullptr) {
|
||||
|
||||
int16_t values[_max_actuators] = {};
|
||||
|
||||
@@ -970,7 +967,6 @@ PX4FMU::cycle()
|
||||
pwm_limit_init(&_pwm_limit);
|
||||
|
||||
update_pwm_rev_mask();
|
||||
update_pwm_trims();
|
||||
|
||||
#ifdef RC_SERIAL_PORT
|
||||
|
||||
@@ -2347,6 +2343,7 @@ PX4FMU::pwm_ioctl(file *filp, int cmd, unsigned long arg)
|
||||
|
||||
_mixers->groups_required(_groups_required);
|
||||
PX4_DEBUG("loaded mixers \n%s\n", buf);
|
||||
update_pwm_trims();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user