dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
vehicleconfigurationhelper.cpp
Go to the documentation of this file.
1 
17 /*
18  * This program is free software; you can redistribute it and/or modify
19  * it under the terms of the GNU General Public License as published by
20  * the Free Software Foundation; either version 3 of the License, or
21  * (at your option) any later version.
22  *
23  * This program is distributed in the hope that it will be useful, but
24  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
25  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
26  * for more details.
27  *
28  * You should have received a copy of the GNU General Public License along
29  * with this program; if not, see <http://www.gnu.org/licenses/>
30  */
31 
33 
34 #include <actuatorsettings.h>
35 #include <attitudesettings.h>
36 #include <mixersettings.h>
37 #include <systemsettings.h>
38 #include <manualcontrolsettings.h>
39 #include <sensorsettings.h>
40 #include <stabilizationsettings.h>
41 
44 
45 #include <QDebug>
46 
47 const float VehicleConfigurationHelper::DEFAULT_ENABLED_ACCEL_TAU = 0.1;
48 
50  : m_configSource(configSource)
51  , m_uavoManager(nullptr)
52  , m_transactionOK(false)
53  , m_transactionTimeout(false)
54  , m_currentTransactionObjectID(-1)
55  , m_progress(0)
56 {
57  Q_ASSERT(m_configSource);
58  ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
59  m_uavoManager = pm->getObject<UAVObjectManager>();
60  Q_ASSERT(m_uavoManager);
61 }
62 
64 {
65  m_progress = 0;
66  clearModifiedObjects();
67  resetVehicleConfig();
68  resetGUIData();
69  if (!saveChangesToController(save)) {
70  return false;
71  }
72 
73  m_progress = 0;
74  applyHardwareConfiguration();
75  applyVehicleConfiguration();
76  applyActuatorConfiguration();
77  applyFlighModeConfiguration();
78 
79  if (save) {
80  applySensorBiasConfiguration();
81  }
82 
83  applyStabilizationConfiguration();
84  applyManualControlDefaults();
85 
86  bool result = saveChangesToController(save);
87  emit saveProgress(m_modifiedObjects.count() + 1, ++m_progress,
88  result ? tr("Done!") : tr("Failed!"));
89  return result;
90 }
91 
93 {
94  m_progress = 0;
95  clearModifiedObjects();
96  applyHardwareConfiguration();
97  applyManualControlDefaults();
98 
99  bool result = saveChangesToController(save);
100  emit saveProgress(m_modifiedObjects.count() + 1, ++m_progress,
101  result ? tr("Done!") : tr("Failed!"));
102  return result;
103 }
104 
105 void VehicleConfigurationHelper::addModifiedObject(UAVDataObject *object, QString description)
106 {
107  m_modifiedObjects << new QPair<UAVDataObject *, QString>(object, description);
108 }
109 
110 void VehicleConfigurationHelper::clearModifiedObjects()
111 {
112  for (int i = 0; i < m_modifiedObjects.count(); i++) {
113  QPair<UAVDataObject *, QString> *pair = m_modifiedObjects.at(i);
114  delete pair;
115  }
116  m_modifiedObjects.clear();
117 }
118 
125 void VehicleConfigurationHelper::applyHardwareConfiguration()
126 {
127  Core::IBoardType *boardPlugin = m_configSource->getControllerType();
128  Q_ASSERT(boardPlugin);
129  if (!boardPlugin)
130  return;
131 
132  Core::IBoardType::InputType newType = m_configSource->getInputType();
133  bool success = boardPlugin->setInputType(newType);
134 
135  if (success) {
136  UAVDataObject *hwSettings =
137  dynamic_cast<UAVDataObject *>(m_uavoManager->getObject(boardPlugin->getHwUAVO()));
138  Q_ASSERT(hwSettings);
139  if (hwSettings)
140  addModifiedObject(hwSettings, tr("Writing hardware settings"));
141  }
142 }
143 
144 void VehicleConfigurationHelper::applyVehicleConfiguration()
145 {
146  switch (m_configSource->getVehicleType()) {
148  switch (m_configSource->getVehicleSubType()) {
150  setupTriCopter();
151  break;
154  setupQuadCopter();
155  break;
159  setupHexaCopter();
160  break;
165  setupOctoCopter();
166  break;
167  default:
168  break;
169  }
170  break;
171  }
175  // TODO: Implement settings for other vehicle types?
176  break;
177  default:
178  break;
179  }
180 }
181 
182 void VehicleConfigurationHelper::applyActuatorConfiguration()
183 {
184  ActuatorSettings *actSettings = ActuatorSettings::GetInstance(m_uavoManager);
185 
186  Core::IBoardType *boardPlugin = m_configSource->getControllerType();
187  Q_ASSERT(boardPlugin);
188  if (!boardPlugin)
189  return;
190 
191  switch (m_configSource->getVehicleType()) {
193  ActuatorSettings::DataFields data = actSettings->getData();
194 
195  QList<actuatorChannelSettings> actuatorSettings = m_configSource->getActuatorSettings();
196  data.MotorsSpinWhileArmed = ActuatorSettings::MOTORSSPINWHILEARMED_FALSE;
197 
198  for (quint16 i = 0; i < ActuatorSettings::TIMERUPDATEFREQ_NUMELEM; i++) {
199  data.TimerUpdateFreq[i] = ESC_FREQUENCY_LEGACY;
200  }
201 
202  int max_motors = 0;
203 
204  quint16 updateFrequency = ESC_FREQUENCY_LEGACY;
205  switch (m_configSource->getESCType()) {
207  updateFrequency = ESC_FREQUENCY_LEGACY;
208  break;
210  updateFrequency = ESC_FREQUENCY_RAPID;
211  break;
214  updateFrequency = ESC_FREQUENCY_SYNCPWM;
215  break;
217  updateFrequency = ESC_FREQUENCY_DSHOT300;
218  break;
220  updateFrequency = ESC_FREQUENCY_DSHOT600;
221  break;
223  updateFrequency = ESC_FREQUENCY_DSHOT1200;
224  break;
225  default:
226  break;
227  }
228 
229  // TOOD: vehicle specific sets of update frequencies
230  switch (m_configSource->getVehicleSubType()) {
232  // Ignore the servo for now.
233  max_motors = 3;
234 
235  data.MotorsSpinWhileArmed = ActuatorSettings::MOTORSSPINWHILEARMED_TRUE;
236  break;
239  max_motors = 4;
240 
241  data.MotorsSpinWhileArmed = ActuatorSettings::MOTORSSPINWHILEARMED_TRUE;
242  break;
246  max_motors = 6;
247 
248  data.MotorsSpinWhileArmed = ActuatorSettings::MOTORSSPINWHILEARMED_TRUE;
249 
250  break;
255  max_motors = 8;
256 
257  data.MotorsSpinWhileArmed = ActuatorSettings::MOTORSSPINWHILEARMED_TRUE;
258  break;
259  default:
260  break;
261  }
262 
263  for (quint16 i = 0; i < ActuatorSettings::CHANNELMAX_NUMELEM; i++) {
264  if (i < max_motors) {
265  data.ChannelMin[i] = actuatorSettings[i].channelMin;
266  data.ChannelNeutral[i] = actuatorSettings[i].channelNeutral;
267  data.ChannelMax[i] = actuatorSettings[i].channelMax;
268 
269  // Channels are 1-indexed in boardplugin and UI. :(
270  int bankNum = boardPlugin->getBankFromOutputChannel(i + 1);
271 
272  if (bankNum >= 0) {
273  data.TimerUpdateFreq[bankNum] = updateFrequency;
274  }
275  } else {
276  data.ChannelMin[i] = 0;
277  data.ChannelNeutral[i] = 0;
278  data.ChannelMax[i] = 0;
279  }
280  }
281 
282  actSettings->setData(data);
283  addModifiedObject(actSettings, tr("Writing actuator settings"));
284  break;
285  }
289  // TODO: Implement settings for other vehicle types?
290  break;
291  default:
292  break;
293  }
294 }
295 
296 void VehicleConfigurationHelper::applyFlighModeConfiguration()
297 {
298  ManualControlSettings *controlSettings = ManualControlSettings::GetInstance(m_uavoManager);
299 
300  Q_ASSERT(controlSettings);
301 
302  ManualControlSettings::DataFields data = controlSettings->getData();
303  data.Stabilization1Settings[0] = ManualControlSettings::STABILIZATION1SETTINGS_ATTITUDE;
304  data.Stabilization1Settings[1] = ManualControlSettings::STABILIZATION1SETTINGS_ATTITUDE;
305  data.Stabilization1Settings[2] = ManualControlSettings::STABILIZATION1SETTINGS_AXISLOCK;
306  data.Stabilization2Settings[0] = ManualControlSettings::STABILIZATION2SETTINGS_ATTITUDE;
307  data.Stabilization2Settings[1] = ManualControlSettings::STABILIZATION2SETTINGS_ATTITUDE;
308  data.Stabilization2Settings[2] = ManualControlSettings::STABILIZATION2SETTINGS_RATE;
309  data.Stabilization3Settings[0] = ManualControlSettings::STABILIZATION3SETTINGS_RATE;
310  data.Stabilization3Settings[1] = ManualControlSettings::STABILIZATION3SETTINGS_RATE;
311  data.Stabilization3Settings[2] = ManualControlSettings::STABILIZATION3SETTINGS_RATE;
312  data.FlightModeNumber = 3;
313  data.FlightModePosition[0] = ManualControlSettings::FLIGHTMODEPOSITION_LEVELING;
314  data.FlightModePosition[1] = ManualControlSettings::FLIGHTMODEPOSITION_ACRO;
315  data.FlightModePosition[2] = ManualControlSettings::FLIGHTMODEPOSITION_STABILIZED1;
316  data.FlightModePosition[3] = ManualControlSettings::FLIGHTMODEPOSITION_ALTITUDEHOLD;
317  data.FlightModePosition[4] = ManualControlSettings::FLIGHTMODEPOSITION_POSITIONHOLD;
318  data.FlightModePosition[5] = ManualControlSettings::FLIGHTMODEPOSITION_MANUAL;
319  controlSettings->setData(data);
320  addModifiedObject(controlSettings, tr("Writing flight mode settings"));
321 }
322 
327 void VehicleConfigurationHelper::applySensorBiasConfiguration()
328 {
329  // add the sensor settings and attitude settings determined by the calibration
330  // object. for consistency with the other methods later calibration should store
331  // the relevant parameters and apply them here.
332 
333  AttitudeSettings *attitudeSettings = AttitudeSettings::GetInstance(m_uavoManager);
334  Q_ASSERT(attitudeSettings);
335  if (attitudeSettings)
336  addModifiedObject(attitudeSettings, tr("Writing board rotation settings"));
337 
338  SensorSettings *sensorSettings = SensorSettings::GetInstance(m_uavoManager);
339  Q_ASSERT(sensorSettings);
340  if (sensorSettings)
341  addModifiedObject(sensorSettings, tr("Writing gyro bias"));
342 }
343 
344 void VehicleConfigurationHelper::applyStabilizationConfiguration()
345 {
346  StabilizationSettings *stabSettings = StabilizationSettings::GetInstance(m_uavoManager);
347  Q_ASSERT(stabSettings);
348 
349  StabilizationSettings defaultSettings;
350  stabSettings->setData(defaultSettings.getData());
351  addModifiedObject(stabSettings, tr("Writing stabilization settings"));
352 }
353 
354 void VehicleConfigurationHelper::applyMixerConfiguration(mixerChannelSettings channels[])
355 {
356  // Set all mixer data
357  MixerSettings *mSettings = MixerSettings::GetInstance(m_uavoManager);
358 
359  Q_ASSERT(mSettings);
360 
361  // Set Mixer types and values
362  QString mixerTypePattern = "Mixer%1Type";
363  QString mixerVectorPattern = "Mixer%1Vector";
364  for (int i = 0; i < 10; i++) {
365  UAVObjectField *field = mSettings->getField(mixerTypePattern.arg(i + 1));
366  Q_ASSERT(field);
367  field->setValue(field->getOptions().at(channels[i].type));
368 
369  field = mSettings->getField(mixerVectorPattern.arg(i + 1));
370  Q_ASSERT(field);
371  field->setValue((channels[i].throttle1 * 128) / 100, 0);
372  field->setValue((channels[i].throttle2 * 128) / 100, 1);
373  field->setValue((channels[i].roll * 128) / 100, 2);
374  field->setValue((channels[i].pitch * 128) / 100, 3);
375  field->setValue((channels[i].yaw * 128) / 100, 4);
376  field->setValue(0, 5); // Accessory0..Accessory2
377  field->setValue(0, 6);
378  field->setValue(0, 7);
379  }
380 
381  // Apply updates
382  mSettings->setData(mSettings->getData());
383  addModifiedObject(mSettings, tr("Writing mixer settings"));
384 }
385 
386 void VehicleConfigurationHelper::applyMultiGUISettings(SystemSettings::AirframeTypeOptions airframe,
387  GUIConfigDataUnion guiConfig)
388 {
389  SystemSettings *sSettings = SystemSettings::GetInstance(m_uavoManager);
390 
391  Q_ASSERT(sSettings);
392  SystemSettings::DataFields data = sSettings->getData();
393  data.AirframeType = airframe;
394 
395  for (int i = 0; i < (int)(SystemSettings::AIRFRAMECATEGORYSPECIFICCONFIGURATION_NUMELEM); i++) {
396  data.AirframeCategorySpecificConfiguration[i] = guiConfig.UAVObject[i];
397  }
398 
399  sSettings->setData(data);
400  addModifiedObject(sSettings, tr("Writing vehicle settings"));
401 }
402 
403 void VehicleConfigurationHelper::applyManualControlDefaults()
404 {
405  ManualControlSettings *mcSettings = ManualControlSettings::GetInstance(m_uavoManager);
406 
407  Q_ASSERT(mcSettings);
408  ManualControlSettings::DataFields cData = mcSettings->getData();
409 
410  ManualControlSettings::ChannelGroupsOptions channelType =
411  ManualControlSettings::CHANNELGROUPS_PWM;
412 
413  /* For all of these -- minVal and maxVal gathered from multiple autotune
414  * configuration shares. neutVal is the true midpoint. throtNeutVal
415  * is 4% up from min-- which is more than we usually do but conservative
416  * for auto-setup. There are exceptions / cases where this is not right,
417  * like for openLRS s.bus. But it's a decent start for people who will
418  * enter their ranges by hand.
419  */
420  qint16 minVal = 1000;
421  qint16 maxVal = 2000;
422 
423  switch (m_configSource->getInputType()) {
425  channelType = ManualControlSettings::CHANNELGROUPS_PWM;
426  break;
428  channelType = ManualControlSettings::CHANNELGROUPS_PPM;
429  break;
432  minVal = 172;
433  maxVal = 1811;
434  channelType = ManualControlSettings::CHANNELGROUPS_SBUS;
435  break;
437  // Sadly this is the worse one-- it depends upon resolution.
438  // 74-950, 64-940 seen for 10 bit. 192-1856, 23-2025 for 11 bit.
439  minVal = 70;
440  maxVal = 940;
441  channelType = ManualControlSettings::CHANNELGROUPS_DSM;
442  break;
445  minVal = 858;
446  maxVal = 2138;
447  channelType = ManualControlSettings::CHANNELGROUPS_HOTTSUM;
448  break;
450  /* Seems to be 1000..2000 */
451  channelType = ManualControlSettings::CHANNELGROUPS_IBUS;
452  break;
454  minVal = 172;
455  maxVal = 1811;
456  channelType = ManualControlSettings::CHANNELGROUPS_TBSCROSSFIRE;
457  break;
459  // unfortunately Weatronic variant has different scaling, this is the range for standard
460  // impl. per protocol spec.
461  minVal = 585;
462  maxVal = 3510;
463  channelType = ManualControlSettings::CHANNELGROUPS_SRXL;
464  break;
467  channelType = ManualControlSettings::CHANNELGROUPS_NONE;
468  break;
470  break;
471  }
472 
473  qint16 neutralVal = minVal + (maxVal - minVal) / 2;
474  qint16 throttleNeutralVal = static_cast<qint16>(minVal + (maxVal - minVal) * 0.04);
475 
476  for (unsigned int i = 0; i < ManualControlSettings::CHANNELGROUPS_NUMELEM; i++) {
477  cData.ChannelGroups[i] = channelType;
478  cData.ChannelNumber[i] = 0;
479  cData.ChannelMin[i] = minVal;
480  cData.ChannelMax[i] = maxVal;
481  cData.ChannelNeutral[i] = neutralVal;
482  }
483 
484  cData.ChannelNumber[ManualControlSettings::CHANNELGROUPS_THROTTLE] = 1;
485  cData.ChannelNeutral[ManualControlSettings::CHANNELNEUTRAL_THROTTLE] = throttleNeutralVal;
486  cData.ChannelNumber[ManualControlSettings::CHANNELGROUPS_ROLL] = 2;
487  cData.ChannelNumber[ManualControlSettings::CHANNELGROUPS_YAW] = 3;
488  cData.ChannelNumber[ManualControlSettings::CHANNELGROUPS_PITCH] = 4;
489  cData.ChannelNumber[ManualControlSettings::CHANNELGROUPS_FLIGHTMODE] = 5;
490 
491  mcSettings->setData(cData);
492  addModifiedObject(mcSettings, tr("Writing manual control defaults"));
493 }
494 
495 bool VehicleConfigurationHelper::saveChangesToController(bool save)
496 {
497  qDebug() << "Saving modified objects to controller. " << m_modifiedObjects.count()
498  << " objects in found.";
499  const int OUTER_TIMEOUT = 3000 * 20; // 10 seconds timeout for saving all objects
500  const int INNER_TIMEOUT = 2000; // 1 second timeout on every save attempt
501 
502  ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
503  Q_ASSERT(pm);
504  UAVObjectUtilManager *utilMngr = pm->getObject<UAVObjectUtilManager>();
505  Q_ASSERT(utilMngr);
506 
507  QTimer outerTimeoutTimer;
508  outerTimeoutTimer.setSingleShot(true);
509 
510  QTimer innerTimeoutTimer;
511  innerTimeoutTimer.setSingleShot(true);
512 
513  connect(utilMngr, &UAVObjectUtilManager::saveCompleted, this,
514  QOverload<int, bool>::of(&VehicleConfigurationHelper::uavoTransactionCompleted));
515  connect(&innerTimeoutTimer, &QTimer::timeout, &m_eventLoop, &QEventLoop::quit);
516  connect(&outerTimeoutTimer, &QTimer::timeout, this,
517  &VehicleConfigurationHelper::saveChangesTimeout);
518 
519  outerTimeoutTimer.start(OUTER_TIMEOUT);
520  for (int i = 0; i < m_modifiedObjects.count(); i++) {
521  QPair<UAVDataObject *, QString> *objPair = m_modifiedObjects.at(i);
522  m_transactionOK = false;
523  UAVDataObject *obj = objPair->first;
524  QString objDescription = objPair->second;
526  && obj->isSettings()) {
527  emit saveProgress(m_modifiedObjects.count() + 1, ++m_progress, objDescription);
528 
529  m_currentTransactionObjectID = obj->getObjID();
530 
531  connect(obj, QOverload<UAVObject *, bool>::of(&UAVObject::transactionCompleted), this,
532  QOverload<UAVObject *, bool>::of(
533  &VehicleConfigurationHelper::uavoTransactionCompleted));
534  while (!m_transactionOK && !m_transactionTimeout) {
535  // Allow the transaction to take some time
536  innerTimeoutTimer.start(INNER_TIMEOUT);
537 
538  // Set object updated
539  obj->updated();
540  if (!m_transactionOK) {
541  m_eventLoop.exec();
542  }
543  innerTimeoutTimer.stop();
544  }
545  disconnect(obj, QOverload<UAVObject *, bool>::of(&UAVObject::transactionCompleted),
546  this, QOverload<UAVObject *, bool>::of(
547  &VehicleConfigurationHelper::uavoTransactionCompleted));
548  if (m_transactionOK) {
549  qDebug() << "Object " << obj->getName() << " was successfully updated.";
550  if (save) {
551  m_transactionOK = false;
552  m_currentTransactionObjectID = obj->getObjID();
553  // Try to save until success or timeout
554  while (!m_transactionOK && !m_transactionTimeout) {
555  // Allow the transaction to take some time
556  innerTimeoutTimer.start(INNER_TIMEOUT);
557 
558  // Persist object in controller
559  utilMngr->saveObjectToFlash(obj);
560  if (!m_transactionOK) {
561  m_eventLoop.exec();
562  }
563  innerTimeoutTimer.stop();
564  }
565  m_currentTransactionObjectID = -1;
566  }
567  }
568 
569  if (!m_transactionOK) {
570  qDebug() << "Transaction timed out when trying to save: " << obj->getName();
571  } else {
572  qDebug() << "Object " << obj->getName() << " was successfully saved.";
573  }
574  } else {
575  qDebug()
576  << "Trying to save a UAVDataObject that is read only or is not a settings object.";
577  }
578  if (m_transactionTimeout) {
579  qDebug() << "Transaction timed out when trying to save " << m_modifiedObjects.count()
580  << " objects.";
581  break;
582  }
583  }
584 
585  outerTimeoutTimer.stop();
586  disconnect(&outerTimeoutTimer, &QTimer::timeout, this,
587  &VehicleConfigurationHelper::saveChangesTimeout);
588  disconnect(&innerTimeoutTimer, &QTimer::timeout, &m_eventLoop, &QEventLoop::quit);
589  disconnect(utilMngr, &UAVObjectUtilManager::saveCompleted, this,
590  QOverload<int, bool>::of(&VehicleConfigurationHelper::uavoTransactionCompleted));
591 
592  qDebug() << "Finished saving modified objects to controller. Success = " << m_transactionOK;
593 
594  return m_transactionOK;
595 }
596 
597 void VehicleConfigurationHelper::uavoTransactionCompleted(int oid, bool success)
598 {
599  if (oid == m_currentTransactionObjectID) {
600  m_transactionOK = success;
601  m_eventLoop.quit();
602  }
603 }
604 
605 void VehicleConfigurationHelper::uavoTransactionCompleted(UAVObject *object, bool success)
606 {
607  if (object) {
608  uavoTransactionCompleted(object->getObjID(), success);
609  }
610 }
611 
612 void VehicleConfigurationHelper::saveChangesTimeout()
613 {
614  m_transactionOK = false;
615  m_transactionTimeout = true;
616  m_eventLoop.quit();
617 }
618 
619 void VehicleConfigurationHelper::resetVehicleConfig()
620 {
621  // Reset all vehicle data
622  MixerSettings *mSettings = MixerSettings::GetInstance(m_uavoManager);
623 
624  // Reset throttle curves
625  {
626  UAVObjectField *field = mSettings->getField("ThrottleCurve2");
627  Q_ASSERT(field);
628  for (auto i = 0; i < field->getNumElements(); i++)
629  field->setValue(i * (0.9f / (field->getNumElements() - 1)), i);
630  }
631 
632  // Reset Mixer types and values
633  QString mixerTypePattern = "Mixer%1Type";
634  QString mixerVectorPattern = "Mixer%1Vector";
635  for (int i = 1; i <= 10; i++) {
636  UAVObjectField *field = mSettings->getField(mixerTypePattern.arg(i));
637  Q_ASSERT(field);
638  field->setValue(field->getOptions().at(0));
639 
640  field = mSettings->getField(mixerVectorPattern.arg(i));
641  Q_ASSERT(field);
642  for (auto i = 0; i < field->getNumElements(); i++)
643  field->setValue(0, i);
644  }
645 
646  // Apply updates
647  // mSettings->setData(mSettings->getData());
648  addModifiedObject(mSettings, tr("Preparing mixer settings"));
649 }
650 
651 void VehicleConfigurationHelper::resetGUIData()
652 {
653  SystemSettings *sSettings = SystemSettings::GetInstance(m_uavoManager);
654 
655  Q_ASSERT(sSettings);
656  SystemSettings::DataFields data = sSettings->getData();
657  data.AirframeType = SystemSettings::AIRFRAMETYPE_CUSTOM;
658  for (quint32 i = 0; i < SystemSettings::AIRFRAMECATEGORYSPECIFICCONFIGURATION_NUMELEM; i++) {
659  data.AirframeCategorySpecificConfiguration[i] = 0;
660  }
661  sSettings->setData(data);
662  addModifiedObject(sSettings, tr("Preparing vehicle settings"));
663 }
664 
665 void VehicleConfigurationHelper::setupTriCopter()
666 {
667  // Typical vehicle setup
668  // 1. Setup mixer data
669  // 2. Setup GUI data
670  // 3. Apply changes
671 
672  mixerChannelSettings channels[10];
673  GUIConfigDataUnion guiSettings = getGUIConfigData();
674 
675  channels[0].type = MIXER_TYPE_MOTOR;
676  channels[0].throttle1 = 100;
677  channels[0].throttle2 = 0;
678  channels[0].roll = 100;
679  channels[0].pitch = 50;
680  channels[0].yaw = 0;
681 
682  channels[1].type = MIXER_TYPE_MOTOR;
683  channels[1].throttle1 = 100;
684  channels[1].throttle2 = 0;
685  channels[1].roll = -100;
686  channels[1].pitch = 50;
687  channels[1].yaw = 0;
688 
689  channels[2].type = MIXER_TYPE_MOTOR;
690  channels[2].throttle1 = 100;
691  channels[2].throttle2 = 0;
692  channels[2].roll = 0;
693  channels[2].pitch = -100;
694  channels[2].yaw = 0;
695 
696  channels[3].type = MIXER_TYPE_SERVO;
697  channels[3].throttle1 = 0;
698  channels[3].throttle2 = 0;
699  channels[3].roll = 0;
700  channels[3].pitch = 0;
701  channels[3].yaw = 100;
702 
703  guiSettings.multi.VTOLMotorNW = 1;
704  guiSettings.multi.VTOLMotorNE = 2;
705  guiSettings.multi.VTOLMotorS = 3;
706  guiSettings.multi.TRIYaw = 4;
707 
708  applyMixerConfiguration(channels);
709  applyMultiGUISettings(SystemSettings::AIRFRAMETYPE_TRI, guiSettings);
710 }
711 
712 GUIConfigDataUnion VehicleConfigurationHelper::getGUIConfigData()
713 {
714  GUIConfigDataUnion configData;
715 
716  for (int i = 0; i < (int)(SystemSettings::AIRFRAMECATEGORYSPECIFICCONFIGURATION_NUMELEM); i++) {
717  configData.UAVObject[i] = 0; // systemSettingsData.GUIConfigData[i];
718  }
719 
720  return configData;
721 }
722 
723 void VehicleConfigurationHelper::setupQuadCopter()
724 {
725  mixerChannelSettings channels[10];
726  GUIConfigDataUnion guiSettings = getGUIConfigData();
727  SystemSettings::AirframeTypeOptions frame = SystemSettings::AIRFRAMETYPE_QUADP;
728 
729  switch (m_configSource->getVehicleSubType()) {
731  frame = SystemSettings::AIRFRAMETYPE_QUADP;
732  channels[0].type = MIXER_TYPE_MOTOR;
733  channels[0].throttle1 = 100;
734  channels[0].throttle2 = 0;
735  channels[0].roll = 0;
736  channels[0].pitch = 100;
737  channels[0].yaw = -50;
738 
739  channels[1].type = MIXER_TYPE_MOTOR;
740  channels[1].throttle1 = 100;
741  channels[1].throttle2 = 0;
742  channels[1].roll = -100;
743  channels[1].pitch = 0;
744  channels[1].yaw = 50;
745 
746  channels[2].type = MIXER_TYPE_MOTOR;
747  channels[2].throttle1 = 100;
748  channels[2].throttle2 = 0;
749  channels[2].roll = 0;
750  channels[2].pitch = -100;
751  channels[2].yaw = -50;
752 
753  channels[3].type = MIXER_TYPE_MOTOR;
754  channels[3].throttle1 = 100;
755  channels[3].throttle2 = 0;
756  channels[3].roll = 100;
757  channels[3].pitch = 0;
758  channels[3].yaw = 50;
759 
760  guiSettings.multi.VTOLMotorN = 1;
761  guiSettings.multi.VTOLMotorE = 2;
762  guiSettings.multi.VTOLMotorS = 3;
763  guiSettings.multi.VTOLMotorW = 4;
764 
765  break;
766  }
768  frame = SystemSettings::AIRFRAMETYPE_QUADX;
769  channels[0].type = MIXER_TYPE_MOTOR;
770  channels[0].throttle1 = 100;
771  channels[0].throttle2 = 0;
772  channels[0].roll = 50;
773  channels[0].pitch = 50;
774  channels[0].yaw = -50;
775 
776  channels[1].type = MIXER_TYPE_MOTOR;
777  channels[1].throttle1 = 100;
778  channels[1].throttle2 = 0;
779  channels[1].roll = -50;
780  channels[1].pitch = 50;
781  channels[1].yaw = 50;
782 
783  channels[2].type = MIXER_TYPE_MOTOR;
784  channels[2].throttle1 = 100;
785  channels[2].throttle2 = 0;
786  channels[2].roll = -50;
787  channels[2].pitch = -50;
788  channels[2].yaw = -50;
789 
790  channels[3].type = MIXER_TYPE_MOTOR;
791  channels[3].throttle1 = 100;
792  channels[3].throttle2 = 0;
793  channels[3].roll = 50;
794  channels[3].pitch = -50;
795  channels[3].yaw = 50;
796 
797  guiSettings.multi.VTOLMotorNW = 1;
798  guiSettings.multi.VTOLMotorNE = 2;
799  guiSettings.multi.VTOLMotorSE = 3;
800  guiSettings.multi.VTOLMotorSW = 4;
801 
802  break;
803  }
804  default:
805  break;
806  }
807  applyMixerConfiguration(channels);
808  applyMultiGUISettings(frame, guiSettings);
809 }
810 
811 void VehicleConfigurationHelper::setupHexaCopter()
812 {
813  mixerChannelSettings channels[10];
814  GUIConfigDataUnion guiSettings = getGUIConfigData();
815  SystemSettings::AirframeTypeOptions frame = SystemSettings::AIRFRAMETYPE_HEXA;
816 
817  switch (m_configSource->getVehicleSubType()) {
819  frame = SystemSettings::AIRFRAMETYPE_HEXA;
820 
821  channels[0].type = MIXER_TYPE_MOTOR;
822  channels[0].throttle1 = 100;
823  channels[0].throttle2 = 0;
824  channels[0].roll = 0;
825  channels[0].pitch = 33;
826  channels[0].yaw = -33;
827 
828  channels[1].type = MIXER_TYPE_MOTOR;
829  channels[1].throttle1 = 100;
830  channels[1].throttle2 = 0;
831  channels[1].roll = -50;
832  channels[1].pitch = 33;
833  channels[1].yaw = 33;
834 
835  channels[2].type = MIXER_TYPE_MOTOR;
836  channels[2].throttle1 = 100;
837  channels[2].throttle2 = 0;
838  channels[2].roll = -50;
839  channels[2].pitch = -33;
840  channels[2].yaw = -33;
841 
842  channels[3].type = MIXER_TYPE_MOTOR;
843  channels[3].throttle1 = 100;
844  channels[3].throttle2 = 0;
845  channels[3].roll = 0;
846  channels[3].pitch = -33;
847  channels[3].yaw = 33;
848 
849  channels[4].type = MIXER_TYPE_MOTOR;
850  channels[4].throttle1 = 100;
851  channels[4].throttle2 = 0;
852  channels[4].roll = 50;
853  channels[4].pitch = -33;
854  channels[4].yaw = -33;
855 
856  channels[5].type = MIXER_TYPE_MOTOR;
857  channels[5].throttle1 = 100;
858  channels[5].throttle2 = 0;
859  channels[5].roll = 50;
860  channels[5].pitch = 33;
861  channels[5].yaw = 33;
862 
863  guiSettings.multi.VTOLMotorN = 1;
864  guiSettings.multi.VTOLMotorNE = 2;
865  guiSettings.multi.VTOLMotorSE = 3;
866  guiSettings.multi.VTOLMotorS = 4;
867  guiSettings.multi.VTOLMotorSW = 5;
868  guiSettings.multi.VTOLMotorNW = 6;
869 
870  break;
871  }
873  frame = SystemSettings::AIRFRAMETYPE_HEXACOAX;
874 
875  channels[0].type = MIXER_TYPE_MOTOR;
876  channels[0].throttle1 = 100;
877  channels[0].throttle2 = 0;
878  channels[0].roll = 100;
879  channels[0].pitch = 25;
880  channels[0].yaw = -66;
881 
882  channels[1].type = MIXER_TYPE_MOTOR;
883  channels[1].throttle1 = 100;
884  channels[1].throttle2 = 0;
885  channels[1].roll = 100;
886  channels[1].pitch = 25;
887  channels[1].yaw = 66;
888 
889  channels[2].type = MIXER_TYPE_MOTOR;
890  channels[2].throttle1 = 100;
891  channels[2].throttle2 = 0;
892  channels[2].roll = -100;
893  channels[2].pitch = 25;
894  channels[2].yaw = -66;
895 
896  channels[3].type = MIXER_TYPE_MOTOR;
897  channels[3].throttle1 = 100;
898  channels[3].throttle2 = 0;
899  channels[3].roll = -100;
900  channels[3].pitch = 25;
901  channels[3].yaw = 66;
902 
903  channels[4].type = MIXER_TYPE_MOTOR;
904  channels[4].throttle1 = 100;
905  channels[4].throttle2 = 0;
906  channels[4].roll = 0;
907  channels[4].pitch = -50;
908  channels[4].yaw = -66;
909 
910  channels[5].type = MIXER_TYPE_MOTOR;
911  channels[5].throttle1 = 100;
912  channels[5].throttle2 = 0;
913  channels[5].roll = 0;
914  channels[5].pitch = -50;
915  channels[5].yaw = 66;
916 
917  guiSettings.multi.VTOLMotorNW = 1;
918  guiSettings.multi.VTOLMotorW = 2;
919  guiSettings.multi.VTOLMotorNE = 3;
920  guiSettings.multi.VTOLMotorE = 4;
921  guiSettings.multi.VTOLMotorS = 5;
922  guiSettings.multi.VTOLMotorSE = 6;
923 
924  break;
925  }
927  frame = SystemSettings::AIRFRAMETYPE_HEXAX;
928 
929  channels[0].type = MIXER_TYPE_MOTOR;
930  channels[0].throttle1 = 100;
931  channels[0].throttle2 = 0;
932  channels[0].roll = -33;
933  channels[0].pitch = 50;
934  channels[0].yaw = -33;
935 
936  channels[1].type = MIXER_TYPE_MOTOR;
937  channels[1].throttle1 = 100;
938  channels[1].throttle2 = 0;
939  channels[1].roll = -33;
940  channels[1].pitch = 0;
941  channels[1].yaw = 33;
942 
943  channels[2].type = MIXER_TYPE_MOTOR;
944  channels[2].throttle1 = 100;
945  channels[2].throttle2 = 0;
946  channels[2].roll = -33;
947  channels[2].pitch = -50;
948  channels[2].yaw = -33;
949 
950  channels[3].type = MIXER_TYPE_MOTOR;
951  channels[3].throttle1 = 100;
952  channels[3].throttle2 = 0;
953  channels[3].roll = -33;
954  channels[3].pitch = -50;
955  channels[3].yaw = 33;
956 
957  channels[4].type = MIXER_TYPE_MOTOR;
958  channels[4].throttle1 = 100;
959  channels[4].throttle2 = 0;
960  channels[4].roll = 33;
961  channels[4].pitch = 0;
962  channels[4].yaw = -33;
963 
964  channels[5].type = MIXER_TYPE_MOTOR;
965  channels[5].throttle1 = 100;
966  channels[5].throttle2 = 0;
967  channels[5].roll = 33;
968  channels[5].pitch = 50;
969  channels[5].yaw = -33;
970 
971  guiSettings.multi.VTOLMotorNE = 1;
972  guiSettings.multi.VTOLMotorE = 2;
973  guiSettings.multi.VTOLMotorSE = 3;
974  guiSettings.multi.VTOLMotorSW = 4;
975  guiSettings.multi.VTOLMotorW = 5;
976  guiSettings.multi.VTOLMotorNW = 6;
977 
978  break;
979  }
980  default:
981  break;
982  }
983  applyMixerConfiguration(channels);
984  applyMultiGUISettings(frame, guiSettings);
985 }
986 
987 void VehicleConfigurationHelper::setupOctoCopter()
988 {
989  mixerChannelSettings channels[10];
990  GUIConfigDataUnion guiSettings = getGUIConfigData();
991  SystemSettings::AirframeTypeOptions frame = SystemSettings::AIRFRAMETYPE_OCTO;
992 
993  switch (m_configSource->getVehicleSubType()) {
995  frame = SystemSettings::AIRFRAMETYPE_OCTO;
996 
997  channels[0].type = MIXER_TYPE_MOTOR;
998  channels[0].throttle1 = 100;
999  channels[0].throttle2 = 0;
1000  channels[0].roll = 0;
1001  channels[0].pitch = 33;
1002  channels[0].yaw = -25;
1003 
1004  channels[1].type = MIXER_TYPE_MOTOR;
1005  channels[1].throttle1 = 100;
1006  channels[1].throttle2 = 0;
1007  channels[1].roll = -33;
1008  channels[1].pitch = 33;
1009  channels[1].yaw = 25;
1010 
1011  channels[2].type = MIXER_TYPE_MOTOR;
1012  channels[2].throttle1 = 100;
1013  channels[2].throttle2 = 0;
1014  channels[2].roll = -33;
1015  channels[2].pitch = 0;
1016  channels[2].yaw = -25;
1017 
1018  channels[3].type = MIXER_TYPE_MOTOR;
1019  channels[3].throttle1 = 100;
1020  channels[3].throttle2 = 0;
1021  channels[3].roll = -33;
1022  channels[3].pitch = -33;
1023  channels[3].yaw = 25;
1024 
1025  channels[4].type = MIXER_TYPE_MOTOR;
1026  channels[4].throttle1 = 100;
1027  channels[4].throttle2 = 0;
1028  channels[4].roll = 0;
1029  channels[4].pitch = -33;
1030  channels[4].yaw = -25;
1031 
1032  channels[5].type = MIXER_TYPE_MOTOR;
1033  channels[5].throttle1 = 100;
1034  channels[5].throttle2 = 0;
1035  channels[5].roll = 33;
1036  channels[5].pitch = -33;
1037  channels[5].yaw = 25;
1038 
1039  channels[6].type = MIXER_TYPE_MOTOR;
1040  channels[6].throttle1 = 100;
1041  channels[6].throttle2 = 0;
1042  channels[6].roll = 33;
1043  channels[6].pitch = 0;
1044  channels[6].yaw = -25;
1045 
1046  channels[7].type = MIXER_TYPE_MOTOR;
1047  channels[7].throttle1 = 100;
1048  channels[7].throttle2 = 0;
1049  channels[7].roll = 33;
1050  channels[7].pitch = 33;
1051  channels[7].yaw = 25;
1052 
1053  guiSettings.multi.VTOLMotorN = 1;
1054  guiSettings.multi.VTOLMotorNE = 2;
1055  guiSettings.multi.VTOLMotorE = 3;
1056  guiSettings.multi.VTOLMotorSE = 4;
1057  guiSettings.multi.VTOLMotorS = 5;
1058  guiSettings.multi.VTOLMotorSW = 6;
1059  guiSettings.multi.VTOLMotorW = 7;
1060  guiSettings.multi.VTOLMotorNW = 8;
1061 
1062  break;
1063  }
1065  frame = SystemSettings::AIRFRAMETYPE_OCTOCOAXX;
1066 
1067  channels[0].type = MIXER_TYPE_MOTOR;
1068  channels[0].throttle1 = 100;
1069  channels[0].throttle2 = 0;
1070  channels[0].roll = 50;
1071  channels[0].pitch = 50;
1072  channels[0].yaw = -50;
1073 
1074  channels[1].type = MIXER_TYPE_MOTOR;
1075  channels[1].throttle1 = 100;
1076  channels[1].throttle2 = 0;
1077  channels[1].roll = 50;
1078  channels[1].pitch = 50;
1079  channels[1].yaw = 50;
1080 
1081  channels[2].type = MIXER_TYPE_MOTOR;
1082  channels[2].throttle1 = 100;
1083  channels[2].throttle2 = 0;
1084  channels[2].roll = -50;
1085  channels[2].pitch = 50;
1086  channels[2].yaw = -50;
1087 
1088  channels[3].type = MIXER_TYPE_MOTOR;
1089  channels[3].throttle1 = 100;
1090  channels[3].throttle2 = 0;
1091  channels[3].roll = -50;
1092  channels[3].pitch = 50;
1093  channels[3].yaw = 50;
1094 
1095  channels[4].type = MIXER_TYPE_MOTOR;
1096  channels[4].throttle1 = 100;
1097  channels[4].throttle2 = 0;
1098  channels[4].roll = -50;
1099  channels[4].pitch = -50;
1100  channels[4].yaw = -50;
1101 
1102  channels[5].type = MIXER_TYPE_MOTOR;
1103  channels[5].throttle1 = 100;
1104  channels[5].throttle2 = 0;
1105  channels[5].roll = -50;
1106  channels[5].pitch = -50;
1107  channels[5].yaw = 50;
1108 
1109  channels[6].type = MIXER_TYPE_MOTOR;
1110  channels[6].throttle1 = 100;
1111  channels[6].throttle2 = 0;
1112  channels[6].roll = 50;
1113  channels[6].pitch = -50;
1114  channels[6].yaw = -50;
1115 
1116  channels[7].type = MIXER_TYPE_MOTOR;
1117  channels[7].throttle1 = 100;
1118  channels[7].throttle2 = 0;
1119  channels[7].roll = 50;
1120  channels[7].pitch = -50;
1121  channels[7].yaw = 50;
1122 
1123  guiSettings.multi.VTOLMotorNW = 1;
1124  guiSettings.multi.VTOLMotorN = 2;
1125  guiSettings.multi.VTOLMotorNE = 3;
1126  guiSettings.multi.VTOLMotorE = 4;
1127  guiSettings.multi.VTOLMotorSE = 5;
1128  guiSettings.multi.VTOLMotorS = 6;
1129  guiSettings.multi.VTOLMotorSW = 7;
1130  guiSettings.multi.VTOLMotorW = 8;
1131 
1132  break;
1133  }
1135  frame = SystemSettings::AIRFRAMETYPE_OCTOCOAXP;
1136 
1137  channels[0].type = MIXER_TYPE_MOTOR;
1138  channels[0].throttle1 = 100;
1139  channels[0].throttle2 = 0;
1140  channels[0].roll = 0;
1141  channels[0].pitch = 100;
1142  channels[0].yaw = -50;
1143 
1144  channels[1].type = MIXER_TYPE_MOTOR;
1145  channels[1].throttle1 = 100;
1146  channels[1].throttle2 = 0;
1147  channels[1].roll = 0;
1148  channels[1].pitch = 100;
1149  channels[1].yaw = 50;
1150 
1151  channels[2].type = MIXER_TYPE_MOTOR;
1152  channels[2].throttle1 = 100;
1153  channels[2].throttle2 = 0;
1154  channels[2].roll = -100;
1155  channels[2].pitch = 0;
1156  channels[2].yaw = -50;
1157 
1158  channels[3].type = MIXER_TYPE_MOTOR;
1159  channels[3].throttle1 = 100;
1160  channels[3].throttle2 = 0;
1161  channels[3].roll = -100;
1162  channels[3].pitch = 0;
1163  channels[3].yaw = 50;
1164 
1165  channels[4].type = MIXER_TYPE_MOTOR;
1166  channels[4].throttle1 = 100;
1167  channels[4].throttle2 = 0;
1168  channels[4].roll = 0;
1169  channels[4].pitch = -100;
1170  channels[4].yaw = -50;
1171 
1172  channels[5].type = MIXER_TYPE_MOTOR;
1173  channels[5].throttle1 = 100;
1174  channels[5].throttle2 = 0;
1175  channels[5].roll = 0;
1176  channels[5].pitch = -100;
1177  channels[5].yaw = 50;
1178 
1179  channels[6].type = MIXER_TYPE_MOTOR;
1180  channels[6].throttle1 = 100;
1181  channels[6].throttle2 = 0;
1182  channels[6].roll = 100;
1183  channels[6].pitch = 0;
1184  channels[6].yaw = -50;
1185 
1186  channels[7].type = MIXER_TYPE_MOTOR;
1187  channels[7].throttle1 = 100;
1188  channels[7].throttle2 = 0;
1189  channels[7].roll = 100;
1190  channels[7].pitch = 0;
1191  channels[7].yaw = 50;
1192 
1193  guiSettings.multi.VTOLMotorN = 1;
1194  guiSettings.multi.VTOLMotorNE = 2;
1195  guiSettings.multi.VTOLMotorE = 3;
1196  guiSettings.multi.VTOLMotorSE = 4;
1197  guiSettings.multi.VTOLMotorS = 5;
1198  guiSettings.multi.VTOLMotorSW = 6;
1199  guiSettings.multi.VTOLMotorW = 7;
1200  guiSettings.multi.VTOLMotorNW = 8;
1201 
1202  break;
1203  }
1205  frame = SystemSettings::AIRFRAMETYPE_OCTOV;
1206  channels[0].type = MIXER_TYPE_MOTOR;
1207  channels[0].throttle1 = 100;
1208  channels[0].throttle2 = 0;
1209  channels[0].roll = -25;
1210  channels[0].pitch = 8;
1211  channels[0].yaw = -25;
1212 
1213  channels[1].type = MIXER_TYPE_MOTOR;
1214  channels[1].throttle1 = 100;
1215  channels[1].throttle2 = 0;
1216  channels[1].roll = -25;
1217  channels[1].pitch = 25;
1218  channels[1].yaw = 25;
1219 
1220  channels[2].type = MIXER_TYPE_MOTOR;
1221  channels[2].throttle1 = 100;
1222  channels[2].throttle2 = 0;
1223  channels[2].roll = -25;
1224  channels[2].pitch = -25;
1225  channels[2].yaw = -25;
1226 
1227  channels[3].type = MIXER_TYPE_MOTOR;
1228  channels[3].throttle1 = 100;
1229  channels[3].throttle2 = 0;
1230  channels[3].roll = -25;
1231  channels[3].pitch = -8;
1232  channels[3].yaw = 25;
1233 
1234  channels[4].type = MIXER_TYPE_MOTOR;
1235  channels[4].throttle1 = 100;
1236  channels[4].throttle2 = 0;
1237  channels[4].roll = 25;
1238  channels[4].pitch = -8;
1239  channels[4].yaw = -25;
1240 
1241  channels[5].type = MIXER_TYPE_MOTOR;
1242  channels[5].throttle1 = 100;
1243  channels[5].throttle2 = 0;
1244  channels[5].roll = 25;
1245  channels[5].pitch = -25;
1246  channels[5].yaw = 25;
1247 
1248  channels[6].type = MIXER_TYPE_MOTOR;
1249  channels[6].throttle1 = 100;
1250  channels[6].throttle2 = 0;
1251  channels[6].roll = 25;
1252  channels[6].pitch = 25;
1253  channels[6].yaw = -25;
1254 
1255  channels[7].type = MIXER_TYPE_MOTOR;
1256  channels[7].throttle1 = 100;
1257  channels[7].throttle2 = 0;
1258  channels[7].roll = 25;
1259  channels[7].pitch = 8;
1260  channels[7].yaw = 25;
1261 
1262  guiSettings.multi.VTOLMotorN = 1;
1263  guiSettings.multi.VTOLMotorNE = 2;
1264  guiSettings.multi.VTOLMotorE = 3;
1265  guiSettings.multi.VTOLMotorSE = 4;
1266  guiSettings.multi.VTOLMotorS = 5;
1267  guiSettings.multi.VTOLMotorSW = 6;
1268  guiSettings.multi.VTOLMotorW = 7;
1269  guiSettings.multi.VTOLMotorNW = 8;
1270 
1271  break;
1272  }
1273  default:
1274  break;
1275  }
1276 
1277  applyMixerConfiguration(channels);
1278  applyMultiGUISettings(frame, guiSettings);
1279 }
virtual Core::IBoardType::InputType getInputType() const =0
VehicleConfigurationHelper(VehicleConfigurationSource *configSource)
virtual QList< actuatorChannelSettings > getActuatorSettings() const =0
InputType
Types of input to configure for the default port.
Definition: iboardtype.h:158
Core plugin system that manages the plugins, their life cycle and their registered objects...
Definition: pluginmanager.h:53
int getBankFromOutputChannel(int channel)
Definition: iboardtype.cpp:90
virtual VehicleConfigurationSource::VEHICLE_TYPE getVehicleType() const =0
int getNumElements() const
for i
Definition: OPPlots.m:140
DataFields data
QStringList getOptions() const
void saveObjectToFlash(UAVObject *obj)
UAVObjectUtilManager::saveObjectToSD Add a new object to save in the queue.
void setValue(const QVariant &data, int index=0)
void transactionCompleted(UAVObject *obj, bool success)
transactionCompleted. Triggered by a call to emitTransactionCompleted - done in telemetry.cpp whenever a transaction finishes.
void updated()
Definition: uavobject.cpp:179
virtual QString getHwUAVO()=0
virtual VehicleConfigurationSource::VEHICLE_SUB_TYPE getVehicleSubType() const =0
quint32 getObjID()
Definition: uavobject.cpp:107
virtual VehicleConfigurationSource::ESC_TYPE getESCType() const =0
multiGUISettingsStruct multi
virtual bool setInputType(InputType)
Configure the board to use an receiver input type on a port number.
Definition: iboardtype.h:197
QString getName()
Definition: uavobject.cpp:131
Metadata getMetadata()
void saveProgress(int total, int current, QString description)
void saveCompleted(int objectID, bool status)
virtual Core::IBoardType * getControllerType() const =0
UAVObject * getObject(const QString &name, quint32 instId=0)
save(matfile $(SAVEOBJECTSCODE))
static AccessMode GetGcsAccess(const Metadata &meta)
Definition: uavobject.cpp:397