mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
OPReview-40 : Disable min/max output channel range controls when doing a servo test, in order to avoid mistakes by careless users.
This commit is contained in:
parent
69c27aa1ce
commit
ab7fdfcc1f
@ -265,10 +265,27 @@ void ConfigOutputWidget::runChannelTests(bool state)
|
||||
mdata.gcsTelemetryAcked = false;
|
||||
mdata.gcsTelemetryUpdateMode = UAVObject::UPDATEMODE_ONCHANGE;
|
||||
mdata.gcsTelemetryUpdatePeriod = 100;
|
||||
|
||||
// Prevent stupid users from touching the minimum & maximum ranges while
|
||||
// moving the sliders. Thanks Ivan for the tip :)
|
||||
foreach (QSpinBox* box, outMin) {
|
||||
box->setEnabled(false);
|
||||
}
|
||||
foreach (QSpinBox* box, outMax) {
|
||||
box->setEnabled(false);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
mdata = accInitialData; // Restore metadata
|
||||
foreach (QSpinBox* box, outMin) {
|
||||
box->setEnabled(true);
|
||||
}
|
||||
foreach (QSpinBox* box, outMax) {
|
||||
box->setEnabled(true);
|
||||
}
|
||||
|
||||
}
|
||||
obj->setMetadata(mdata);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user