dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
configgroundvehiclewidget.cpp
Go to the documentation of this file.
1 
13 /*
14  * This program is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation; either version 3 of the License, or
17  * (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful, but
20  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  * for more details.
23  *
24  * You should have received a copy of the GNU General Public License along
25  * with this program; if not, see <http://www.gnu.org/licenses/>
26  */
27 #include "actuatorcommand.h"
30 #include "mixersettings.h"
31 
32 #include <QDebug>
33 #include <QStringList>
34 #include <QWidget>
35 #include <QTextEdit>
36 #include <QVBoxLayout>
37 #include <QPushButton>
38 #include <QBrush>
39 #include <math.h>
40 
44 ConfigGroundVehicleWidget::ConfigGroundVehicleWidget(Ui_AircraftWidget *aircraft, QWidget *parent)
45  : VehicleConfig(parent)
46 {
47  m_aircraft = aircraft;
48 }
49 
54 {
55  // Do nothing
56 }
57 
61 void ConfigGroundVehicleWidget::setupUI(SystemSettings::AirframeTypeOptions frameType)
62 {
63  m_aircraft->differentialSteeringMixBox->setHidden(true);
64  // STILL NEEDS WORK
65  // Setup the UI
66  setComboCurrentIndex(m_aircraft->aircraftType, m_aircraft->aircraftType->findText("Ground"));
67 
68  m_aircraft->gvEngineChannelBox->setEnabled(false);
69  m_aircraft->gvEngineLabel->setEnabled(false);
70 
71  m_aircraft->gvAileron1ChannelBox->setEnabled(false);
72  m_aircraft->gvAileron1Label->setEnabled(false);
73 
74  m_aircraft->gvAileron2ChannelBox->setEnabled(false);
75  m_aircraft->gvAileron2Label->setEnabled(false);
76 
77  if (frameType == SystemSettings::AIRFRAMETYPE_GROUNDVEHICLEDIFFERENTIAL) { // Tank
78  setComboCurrentIndex(m_aircraft->groundVehicleType,
79  m_aircraft->groundVehicleType->findText("Differential (tank)"));
80  m_aircraft->gvMotor1ChannelBox->setEnabled(true);
81  m_aircraft->gvMotor1Label->setEnabled(true);
82 
83  m_aircraft->gvMotor2ChannelBox->setEnabled(true);
84  m_aircraft->gvMotor2Label->setEnabled(true);
85 
86  m_aircraft->gvMotor1Label->setText("Left motor");
87  m_aircraft->gvMotor2Label->setText("Right motor");
88 
89  m_aircraft->gvSteering1ChannelBox->setEnabled(false);
90  m_aircraft->gvSteering1Label->setEnabled(false);
91 
92  m_aircraft->gvSteering2ChannelBox->setEnabled(false);
93  m_aircraft->gvSteering2Label->setEnabled(false);
94 
95  m_aircraft->gvSteering2Label->setText("Rear steering");
96 
97  m_aircraft->differentialSteeringMixBox->setHidden(false);
98 
99  } else if (frameType == SystemSettings::AIRFRAMETYPE_GROUNDVEHICLEMOTORCYCLE) { // Motorcycle
100  setComboCurrentIndex(m_aircraft->groundVehicleType,
101  m_aircraft->groundVehicleType->findText("Motorcycle"));
102  m_aircraft->gvMotor1ChannelBox->setEnabled(false);
103  m_aircraft->gvMotor1Label->setEnabled(false);
104 
105  m_aircraft->gvMotor2ChannelBox->setEnabled(true);
106  m_aircraft->gvMotor2Label->setEnabled(true);
107 
108  m_aircraft->gvMotor1Label->setText("Front motor");
109  m_aircraft->gvMotor2Label->setText("Rear motor");
110 
111  m_aircraft->gvSteering1ChannelBox->setEnabled(true);
112  m_aircraft->gvSteering1Label->setEnabled(true);
113 
114  m_aircraft->gvSteering2ChannelBox->setEnabled(true);
115  m_aircraft->gvSteering2Label->setEnabled(true);
116 
117  m_aircraft->gvSteering2Label->setText("Balancing");
118 
119  m_aircraft->differentialSteeringMixBox->setHidden(true);
120  } else { // Car
121  setComboCurrentIndex(m_aircraft->groundVehicleType,
122  m_aircraft->groundVehicleType->findText("Turnable (car)"));
123 
124  m_aircraft->gvMotor1ChannelBox->setEnabled(true);
125  m_aircraft->gvMotor1Label->setEnabled(true);
126 
127  m_aircraft->gvMotor2ChannelBox->setEnabled(true);
128  m_aircraft->gvMotor2Label->setEnabled(true);
129 
130  m_aircraft->gvMotor1Label->setText("Front motor");
131  m_aircraft->gvMotor2Label->setText("Rear motor");
132 
133  m_aircraft->gvSteering1ChannelBox->setEnabled(true);
134  m_aircraft->gvSteering1Label->setEnabled(true);
135 
136  m_aircraft->gvSteering2ChannelBox->setEnabled(true);
137  m_aircraft->gvSteering2Label->setEnabled(true);
138 
139  m_aircraft->differentialSteeringMixBox->setHidden(true);
140  }
141 }
142 
143 void ConfigGroundVehicleWidget::ResetActuators(GUIConfigDataUnion *configData)
144 {
145  configData->ground.GroundVehicleSteering1 = 0;
146  configData->ground.GroundVehicleSteering2 = 0;
147  configData->ground.GroundVehicleThrottle1 = 0;
148  configData->ground.GroundVehicleThrottle2 = 0;
149 }
150 
151 QStringList ConfigGroundVehicleWidget::getChannelDescriptions()
152 {
153  int i;
154  QStringList channelDesc;
155 
156  // init a channel_numelem list of channel desc defaults
157  for (i = 0; i < (int)(ActuatorCommand::CHANNEL_NUMELEM); i++) {
158  channelDesc.append(QString("-"));
159  }
160 
161  // get the gui config data
162  GUIConfigDataUnion configData = GetConfigData();
163 
164  if (configData.ground.GroundVehicleSteering1 > 0)
165  channelDesc[configData.ground.GroundVehicleSteering1 - 1] = QString("GroundSteering1");
166  if (configData.ground.GroundVehicleSteering2 > 0)
167  channelDesc[configData.ground.GroundVehicleSteering2 - 1] = QString("GroundSteering2");
168  if (configData.ground.GroundVehicleThrottle1 > 0)
169  channelDesc[configData.ground.GroundVehicleThrottle1 - 1] = QString("GroundThrottle1");
170  if (configData.ground.GroundVehicleThrottle2 > 0)
171  channelDesc[configData.ground.GroundVehicleThrottle2 - 1] = QString("GroundThrottle2");
172 
173  return channelDesc;
174 }
175 
180 SystemSettings::AirframeTypeOptions ConfigGroundVehicleWidget::updateConfigObjectsFromWidgets()
181 {
182  SystemSettings::AirframeTypeOptions airframeType =
183  SystemSettings::AIRFRAMETYPE_GROUNDVEHICLECAR;
184 
185  // Save the curve (common to all ground vehicle frames)
186  MixerSettings *mixerSettings = MixerSettings::GetInstance(getObjectManager());
187  Q_ASSERT(mixerSettings);
188 
189  // All airframe types must start with "GroundVehicle"
190  if (m_aircraft->groundVehicleType->currentText() == "Turnable (car)") {
191  airframeType = SystemSettings::AIRFRAMETYPE_GROUNDVEHICLECAR;
192  setupGroundVehicleCar(airframeType);
193  } else if (m_aircraft->groundVehicleType->currentText() == "Differential (tank)") {
194  airframeType = SystemSettings::AIRFRAMETYPE_GROUNDVEHICLEDIFFERENTIAL;
195  setupGroundVehicleDifferential(airframeType);
196  } else { // "Motorcycle"
197  airframeType = SystemSettings::AIRFRAMETYPE_GROUNDVEHICLEMOTORCYCLE;
198  setupGroundVehicleMotorcycle(airframeType);
199  }
200 
201  return airframeType;
202 }
203 
207 void ConfigGroundVehicleWidget::refreshAirframeWidgetsValues(
208  SystemSettings::AirframeTypeOptions frameType)
209 {
210  MixerSettings *mixerSettings = MixerSettings::GetInstance(getObjectManager());
211  Q_ASSERT(mixerSettings);
212 
214 
215  // THIS SECTION STILL NEEDS WORK. FOR THE MOMENT, USE THE FIXED-WING ONBOARD SETTING IN ORDER TO
216  // MINIMIZE CHANCES OF BOLLOXING REAL CODE
217  // Retrieve channel setup values
218  setComboCurrentIndex(m_aircraft->gvMotor1ChannelBox, config.ground.GroundVehicleThrottle1);
219  setComboCurrentIndex(m_aircraft->gvMotor2ChannelBox, config.ground.GroundVehicleThrottle2);
220  setComboCurrentIndex(m_aircraft->gvSteering1ChannelBox, config.ground.GroundVehicleSteering1);
221  setComboCurrentIndex(m_aircraft->gvSteering2ChannelBox, config.ground.GroundVehicleSteering2);
222 
223  if (frameType == SystemSettings::AIRFRAMETYPE_GROUNDVEHICLEDIFFERENTIAL) {
224  // CURRENTLY BROKEN UNTIL WE DECIDE HOW DIFFERENTIAL SHOULD BEHAVE
225  // If the vehicle type is "differential", restore the slider setting
226 
227  // Find the channel number for Motor1
228  int channel = m_aircraft->gvMotor1ChannelBox->currentIndex() - 1;
229  if (channel > -1) { // If for some reason the actuators were incoherent, we might fail here,
230  // hence the check.
231 
232  m_aircraft->differentialSteeringSlider1->setValue(
233  getMixerVectorValue(mixerSettings, channel, MixerSettings::MIXER1VECTOR_ROLL)
234  * 100);
235  m_aircraft->differentialSteeringSlider2->setValue(
236  getMixerVectorValue(mixerSettings, channel, MixerSettings::MIXER1VECTOR_PITCH)
237  * 100);
238  }
239  }
240  if (frameType == SystemSettings::AIRFRAMETYPE_GROUNDVEHICLEMOTORCYCLE) {
241  // CURRENTLY BROKEN UNTIL WE DECIDE HOW MOTORCYCLE SHOULD BEHAVE
242  // obj =
243  //dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
244  // Q_ASSERT(obj);
245  // int chMixerNumber = m_aircraft->gvMotor1ChannelBox->currentIndex()-1;
246  // if (chMixerNumber >=0) {
247  // field = obj->getField(mixerVectors.at(chMixerNumber));
248  // int ti = field->getElementNames().indexOf("Yaw");
249  // m_aircraft->differentialSteeringSlider1->setValue(field->getDouble(ti)*100);
250  //
251  // ti = field->getElementNames().indexOf("Pitch");
252  // m_aircraft->differentialSteeringSlider2->setValue(field->getDouble(ti)*100);
253  // }
254  }
255 }
256 
262 bool ConfigGroundVehicleWidget::setupGroundVehicleMotorcycle(
263  SystemSettings::AirframeTypeOptions airframeType)
264 {
265  // Check coherence:
266  // Show any config errors in GUI
267  if (throwConfigError(airframeType)) {
268  return false;
269  }
270 
271  // Now setup the channels:
273  ResetActuators(&config);
274 
275  config.ground.GroundVehicleThrottle1 = m_aircraft->gvMotor1ChannelBox->currentIndex();
276  config.ground.GroundVehicleThrottle2 = m_aircraft->gvMotor2ChannelBox->currentIndex();
277 
278  SetConfigData(config, SystemSettings::AIRFRAMETYPE_GROUNDVEHICLEMOTORCYCLE);
279 
280  MixerSettings *mixerSettings = MixerSettings::GetInstance(getObjectManager());
281  Q_ASSERT(mixerSettings);
282  resetMixers(mixerSettings);
283 
284  // motor
285  int channel = m_aircraft->gvMotor2ChannelBox->currentIndex() - 1;
286  setMixerType(mixerSettings, channel, MixerSettings::MIXER1TYPE_MOTOR);
287  setMixerVectorValue(mixerSettings, channel, MixerSettings::MIXER1VECTOR_THROTTLECURVE1,
288  mixerScale);
289  setMixerVectorValue(mixerSettings, channel, MixerSettings::MIXER1VECTOR_YAW, mixerScale);
290 
291  // steering
292  channel = m_aircraft->gvSteering1ChannelBox->currentIndex() - 1;
293  setMixerType(mixerSettings, channel, MixerSettings::MIXER1TYPE_SERVO);
294  setMixerVectorValue(mixerSettings, channel, MixerSettings::MIXER1VECTOR_YAW, -mixerScale);
295  setMixerVectorValue(mixerSettings, channel, MixerSettings::MIXER1VECTOR_ROLL, -mixerScale);
296 
297  // balance
298  channel = m_aircraft->gvSteering2ChannelBox->currentIndex() - 1;
299  setMixerType(mixerSettings, channel, MixerSettings::MIXER1TYPE_SERVO);
300  setMixerVectorValue(mixerSettings, channel, MixerSettings::MIXER1VECTOR_YAW, mixerScale);
301  setMixerVectorValue(mixerSettings, channel, MixerSettings::MIXER1VECTOR_ROLL, mixerScale);
302 
303  m_aircraft->gvStatusLabel->setText("Mixer generated");
304 
305  return true;
306 }
307 
313 bool ConfigGroundVehicleWidget::setupGroundVehicleDifferential(
314  SystemSettings::AirframeTypeOptions airframeType)
315 {
316  // Check coherence:
317  // Show any config errors in GUI
318 
319  if (throwConfigError(airframeType)) {
320  return false;
321  }
322 
323  // Now setup the channels:
325  ResetActuators(&config);
326 
327  config.ground.GroundVehicleThrottle1 = m_aircraft->gvMotor1ChannelBox->currentIndex();
328  config.ground.GroundVehicleThrottle2 = m_aircraft->gvMotor2ChannelBox->currentIndex();
329 
330  SetConfigData(config, SystemSettings::AIRFRAMETYPE_GROUNDVEHICLEDIFFERENTIAL);
331 
332  MixerSettings *mixerSettings = MixerSettings::GetInstance(getObjectManager());
333  Q_ASSERT(mixerSettings);
334  resetMixers(mixerSettings);
335 
336  // left motor
337  int channel = m_aircraft->gvMotor1ChannelBox->currentIndex() - 1;
338  setMixerType(mixerSettings, channel, MixerSettings::MIXER1TYPE_MOTOR);
339  setMixerVectorValue(mixerSettings, channel, MixerSettings::MIXER1VECTOR_THROTTLECURVE1,
340  mixerScale);
341  setMixerVectorValue(mixerSettings, channel, MixerSettings::MIXER1VECTOR_YAW, mixerScale);
342 
343  // right motor
344  channel = m_aircraft->gvMotor2ChannelBox->currentIndex() - 1;
345  setMixerType(mixerSettings, channel, MixerSettings::MIXER1TYPE_MOTOR);
346  setMixerVectorValue(mixerSettings, channel, MixerSettings::MIXER1VECTOR_THROTTLECURVE2,
347  mixerScale);
348  setMixerVectorValue(mixerSettings, channel, MixerSettings::MIXER1VECTOR_YAW, -mixerScale);
349 
350  // Output success message
351  m_aircraft->gvStatusLabel->setText("Mixer generated");
352 
353  return true;
354 }
355 
361 bool ConfigGroundVehicleWidget::setupGroundVehicleCar(
362  SystemSettings::AirframeTypeOptions airframeType)
363 {
364  // Check coherence:
365  // Show any config errors in GUI
366  if (throwConfigError(airframeType)) {
367  return false;
368  }
369 
370  // Now setup the channels:
372  ResetActuators(&config);
373 
374  config.ground.GroundVehicleThrottle1 = m_aircraft->gvMotor1ChannelBox->currentIndex();
375  config.ground.GroundVehicleThrottle2 = m_aircraft->gvMotor2ChannelBox->currentIndex();
376  config.ground.GroundVehicleSteering1 = m_aircraft->gvSteering1ChannelBox->currentIndex();
377  config.ground.GroundVehicleSteering2 = m_aircraft->gvSteering2ChannelBox->currentIndex();
378 
379  SetConfigData(config, SystemSettings::AIRFRAMETYPE_GROUNDVEHICLECAR);
380 
381  MixerSettings *mixerSettings = MixerSettings::GetInstance(getObjectManager());
382  Q_ASSERT(mixerSettings);
383  resetMixers(mixerSettings);
384 
385  int channel = m_aircraft->gvSteering1ChannelBox->currentIndex() - 1;
386  setMixerType(mixerSettings, channel, MixerSettings::MIXER1TYPE_SERVO);
387  setMixerVectorValue(mixerSettings, channel, MixerSettings::MIXER1VECTOR_YAW, mixerScale);
388 
389  channel = m_aircraft->gvSteering2ChannelBox->currentIndex() - 1;
390  setMixerType(mixerSettings, channel, MixerSettings::MIXER1TYPE_SERVO);
391  setMixerVectorValue(mixerSettings, channel, MixerSettings::MIXER1VECTOR_YAW, -mixerScale);
392 
393  channel = m_aircraft->gvMotor1ChannelBox->currentIndex() - 1;
394  setMixerType(mixerSettings, channel, MixerSettings::MIXER1TYPE_MOTOR);
395  setMixerVectorValue(mixerSettings, channel, MixerSettings::MIXER1VECTOR_THROTTLECURVE1,
396  mixerScale);
397 
398  channel = m_aircraft->gvMotor2ChannelBox->currentIndex() - 1;
399  setMixerType(mixerSettings, channel, MixerSettings::MIXER1TYPE_MOTOR);
400  setMixerVectorValue(mixerSettings, channel, MixerSettings::MIXER1VECTOR_THROTTLECURVE2,
401  mixerScale);
402 
403  // Output success message
404  m_aircraft->gvStatusLabel->setText("Mixer generated");
405 
406  return true;
407 }
408 
413 bool ConfigGroundVehicleWidget::throwConfigError(SystemSettings::AirframeTypeOptions airframeType)
414 {
415  // Initialize configuration error flag
416  bool error = false;
417 
418  // Create a red block. All combo boxes are the same size, so any one should do as a model
419  int size = m_aircraft->gvEngineChannelBox->style()->pixelMetric(QStyle::PM_SmallIconSize);
420  QPixmap pixmap(size, size);
421  pixmap.fill(QColor("red"));
422 
423  if (airframeType == SystemSettings::AIRFRAMETYPE_GROUNDVEHICLECAR) { // Car
424  if (m_aircraft->gvMotor1ChannelBox->currentText() == "None"
425  && m_aircraft->gvMotor2ChannelBox->currentText() == "None") {
426  pixmap.fill(QColor("green"));
427  m_aircraft->gvMotor1ChannelBox->setItemData(0, pixmap,
428  Qt::DecorationRole); // Set color palettes
429  m_aircraft->gvMotor2ChannelBox->setItemData(0, pixmap,
430  Qt::DecorationRole); // Set color palettes
431  // m_aircraft->gvMotor1Label->setText("<font color='red'>" +
432  //m_aircraft->gvMotor1Label->text() + "</font>");
433  // m_aircraft->gvMotor2Label->setText("<font color='red'>" +
434  //m_aircraft->gvMotor2Label->text() + "</font>");
435  error = true;
436 
437  } else {
438  m_aircraft->gvMotor1ChannelBox->setItemData(0, 0,
439  Qt::DecorationRole); // Reset color palettes
440  m_aircraft->gvMotor2ChannelBox->setItemData(0, 0,
441  Qt::DecorationRole); // Reset color palettes
442  // QTextEdit* htmlText=new QTextEdit(m_aircraft->gvMotor1Label->text()); //
443  //HtmlText is any QString with html tags.
444  // m_aircraft->gvMotor1Label->setText(htmlText->toPlainText());
445  // delete htmlText;
446  //
447  // htmlText=new QTextEdit(m_aircraft->gvMotor2Label->text()); // HtmlText is any
448  //QString with html tags.
449  // m_aircraft->gvMotor2Label->setText(htmlText->toPlainText());
450  }
451 
452  if (m_aircraft->gvSteering1ChannelBox->currentText() == "None"
453  && m_aircraft->gvSteering2ChannelBox->currentText() == "None") {
454  m_aircraft->gvSteering1ChannelBox->setItemData(
455  0, pixmap, Qt::DecorationRole); // Set color palettes
456  m_aircraft->gvSteering2ChannelBox->setItemData(
457  0, pixmap, Qt::DecorationRole); // Set color palettes
458  // m_aircraft->gvStatusLabel->setText("<font color='red'>ERROR: check steering
459  //channel assignment</font>");
460  // m_aircraft->gvSteering1Label->setText("<font color='red'>" +
461  //m_aircraft->gvSteering1Label->text() + "</font>");
462  // m_aircraft->gvSteering2Label->setText("<font color='red'>" +
463  //m_aircraft->gvSteering2Label->text() + "</font>");
464  error = true;
465  } else {
466  m_aircraft->gvSteering1ChannelBox->setItemData(
467  0, 0, Qt::DecorationRole); // Reset color palettes
468  m_aircraft->gvSteering2ChannelBox->setItemData(
469  0, 0, Qt::DecorationRole); // Reset color palettes
470  // QTextEdit* htmlText=new QTextEdit(m_aircraft->gvSteering1Label->text()); //
471  //HtmlText is any QString with html tags.
472  // m_aircraft->gvSteering1Label->setText(htmlText->toPlainText());
473  // delete htmlText;
474  //
475  // htmlText=new QTextEdit(m_aircraft->gvSteering2Label->text()); // HtmlText is
476  //any QString with html tags.
477  // m_aircraft->gvSteering2Label->setText(htmlText->toPlainText());
478  }
479 
480  } else if (airframeType == SystemSettings::AIRFRAMETYPE_GROUNDVEHICLEDIFFERENTIAL) { // Tank
481  if (m_aircraft->gvMotor1ChannelBox->currentText() == "None"
482  || m_aircraft->gvMotor2ChannelBox->currentText() == "None") {
483  m_aircraft->gvMotor1ChannelBox->setItemData(0, pixmap,
484  Qt::DecorationRole); // Set color palettes
485  m_aircraft->gvMotor2ChannelBox->setItemData(0, pixmap,
486  Qt::DecorationRole); // Set color palettes
487  error = true;
488  } else {
489  m_aircraft->gvMotor1ChannelBox->setItemData(0, 0,
490  Qt::DecorationRole); // Reset color palettes
491  m_aircraft->gvMotor2ChannelBox->setItemData(0, 0,
492  Qt::DecorationRole); // Reset color palettes
493  }
494 
495  // Always reset
496  m_aircraft->gvSteering1ChannelBox->setItemData(0, 0,
497  Qt::DecorationRole); // Reset color palettes
498  m_aircraft->gvSteering2ChannelBox->setItemData(0, 0,
499  Qt::DecorationRole); // Reset color palettes
500  } else if (airframeType == SystemSettings::AIRFRAMETYPE_GROUNDVEHICLEMOTORCYCLE) { // Motorcycle
501  if (m_aircraft->gvMotor1ChannelBox->currentText() == "None"
502  && m_aircraft->gvMotor2ChannelBox->currentText() == "None") {
503  m_aircraft->gvMotor2ChannelBox->setItemData(0, pixmap,
504  Qt::DecorationRole); // Set color palettes
505  error = true;
506  } else {
507  m_aircraft->gvMotor2ChannelBox->setItemData(0, 0,
508  Qt::DecorationRole); // Reset color palettes
509  }
510 
511  if (m_aircraft->gvSteering1ChannelBox->currentText() == "None"
512  && m_aircraft->gvSteering2ChannelBox->currentText() == "None") {
513  m_aircraft->gvSteering1ChannelBox->setItemData(
514  0, pixmap, Qt::DecorationRole); // Set color palettes
515  error = true;
516  } else {
517  m_aircraft->gvSteering1ChannelBox->setItemData(
518  0, 0, Qt::DecorationRole); // Reset color palettes
519  }
520 
521  // Always reset
522  m_aircraft->gvMotor1ChannelBox->setItemData(0, 0,
523  Qt::DecorationRole); // Reset color palettes
524  m_aircraft->gvSteering2ChannelBox->setItemData(0, 0,
525  Qt::DecorationRole); // Reset color palettes
526  }
527 
528  if (error) {
529  m_aircraft->gvStatusLabel->setText(
530  QString("<font color='red'>ERROR: Assign all necessary channels</font>"));
531  }
532  return error;
533 }
static void SetConfigData(GUIConfigDataUnion configData, SystemSettings::AirframeTypeOptions vehicle)
static GUIConfigDataUnion GetConfigData()
for i
Definition: OPPlots.m:140
double getMixerVectorValue(UAVDataObject *mixer, int channel, MixerSettings::Mixer1VectorElem elementName)
groundGUISettingsStruct ground
void resetMixers(UAVDataObject *mixer)
void setMixerType(UAVDataObject *mixer, int channel, MixerSettings::Mixer1TypeOptions mixerType)
void setMixerVectorValue(UAVDataObject *mixer, int channel, MixerSettings::Mixer1VectorElem elementName, double value)
ConfigGroundVehicleWidget(Ui_AircraftWidget *aircraft=nullptr, QWidget *parent=nullptr)
else error('Your technical computing program does not support file choosers.Please input the file name in the argument. ') end elseif nargin >0 logfile
UAVObjectManager * getObjectManager()
ConfigTaskWidget::getObjectManager Utility function to get a pointer to the object manager...
static const double mixerScale
static void setComboCurrentIndex(QComboBox *box, int index)