mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-19 09:54:15 +01:00
Revert "OP-522: fixed throttle calibration if input channel is reversed"
This reverts commit 0ba605812e8db132cefc749c6b4a0ef363d037a1. The real problem was not with this, but due to unexpected reverse checkbox behaviour. Reverse checkboxes are completely ignored at the start of calibration, they can be even set checked initially. But change of checkbox does not reverse the GCS control gadget display. This should probably be fixed.
This commit is contained in:
parent
868c97acc3
commit
52d22c59d3
@ -538,7 +538,7 @@ void ConfigInputWidget::updateChannels(UAVObject* controlCommand)
|
||||
obj->setMetadata(mdata);
|
||||
|
||||
// Set some slider values to better defaults
|
||||
// Find what channel we used for throttle, set it 2% about min:
|
||||
// Find some channels first
|
||||
int throttleChannel = -1;
|
||||
int fmChannel = -1;
|
||||
for (int i=0; i < inChannelAssign.length(); i++) {
|
||||
@ -558,17 +558,10 @@ void ConfigInputWidget::updateChannels(UAVObject* controlCommand)
|
||||
|
||||
// Throttle neutral defaults to 2% of range
|
||||
if (throttleChannel > -1) {
|
||||
if (inRevCheckboxes[throttleChannel]->isChecked()) {
|
||||
inSliders.at(throttleChannel)->setValue(
|
||||
inSliders.at(throttleChannel)->maximum() -
|
||||
(inSliders.at(throttleChannel)->maximum()-
|
||||
inSliders.at(throttleChannel)->minimum())*0.02);
|
||||
} else {
|
||||
inSliders.at(throttleChannel)->setValue(
|
||||
inSliders.at(throttleChannel)->minimum() +
|
||||
(inSliders.at(throttleChannel)->maximum()-
|
||||
inSliders.at(throttleChannel)->minimum())*0.02);
|
||||
}
|
||||
inSliders.at(throttleChannel)->setValue(
|
||||
inSliders.at(throttleChannel)->minimum() +
|
||||
(inSliders.at(throttleChannel)->maximum()-
|
||||
inSliders.at(throttleChannel)->minimum())*0.02);
|
||||
}
|
||||
|
||||
// Flight mode at 50% of range:
|
||||
|
Loading…
x
Reference in New Issue
Block a user