1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-27 16:54:15 +01:00

OP-1567 Added setting PWM out to 1000us.

At motor neutral calibration stop, first set PWM out to 1000us for 500ms
followed by setting it to 0.
This commit is contained in:
Fredrik Arvidsson 2014-10-25 15:01:25 +02:00
parent 4ba856f1d3
commit 7268a676eb

View File

@ -377,6 +377,11 @@ void OutputCalibrationPage::on_motorNeutralButton_toggled(bool checked)
ui->motorNeutralSlider->setEnabled(checked);
quint16 channel = getCurrentChannel();
quint16 safeValue = 0;
if (!checked) {
// Set pwm output to 1000/low for 500ms before turning it to 0
m_calibrationUtil->setChannelOutputValue(1000);
QThread::msleep(500);
}
onStartButtonToggle(ui->motorNeutralButton, channel, m_actuatorSettings[channel].channelNeutral, safeValue, ui->motorNeutralSlider);
}