mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Merge remote-tracking branch 'origin/skarlsso/OP-1455_no_output_from_test_outputs' into next
This commit is contained in:
commit
849bbfd481
@ -126,6 +126,17 @@ void ConfigOutputWidget::enableControls(bool enable)
|
||||
ui->channelOutTest->setEnabled(enable);
|
||||
}
|
||||
|
||||
/**
|
||||
Force update all channels with the values in the OutputChannelForms.
|
||||
*/
|
||||
void ConfigOutputWidget::sendAllChannelTests()
|
||||
{
|
||||
for (unsigned int i = 0; i < ActuatorCommand::CHANNEL_NUMELEM; i++) {
|
||||
OutputChannelForm *form = getOutputChannelForm(i);
|
||||
sendChannelTest(i, form->neutral());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Toggles the channel testing mode by making the GCS take over
|
||||
the ActuatorCommand objects
|
||||
@ -178,6 +189,11 @@ void ConfigOutputWidget::runChannelTests(bool state)
|
||||
}
|
||||
obj->setMetadata(mdata);
|
||||
obj->updated();
|
||||
|
||||
// Setup the correct initial channel values when the channel testing mode is turned on.
|
||||
if (state) {
|
||||
sendAllChannelTests();
|
||||
}
|
||||
}
|
||||
|
||||
OutputChannelForm *ConfigOutputWidget::getOutputChannelForm(const int index) const
|
||||
|
@ -58,7 +58,11 @@ private:
|
||||
void updateChannelInSlider(QSlider *slider, QLabel *min, QLabel *max, QCheckBox *rev, int value);
|
||||
|
||||
void assignOutputChannel(UAVDataObject *obj, QString &str);
|
||||
|
||||
OutputChannelForm *getOutputChannelForm(const int index) const;
|
||||
|
||||
void sendAllChannelTests();
|
||||
|
||||
int mccDataRate;
|
||||
|
||||
UAVObject::Metadata accInitialData;
|
||||
|
Loading…
x
Reference in New Issue
Block a user