mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
OP-907 step 3: more vehicle config code cleanups
This commit is contained in:
parent
782913590b
commit
81da5303f2
@ -51,7 +51,7 @@ QStringList ConfigCcpmWidget::getChannelDescriptions()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get the gui config data
|
// get the gui config data
|
||||||
GUIConfigDataUnion configData = GetConfigData();
|
GUIConfigDataUnion configData = getConfigData();
|
||||||
heliGUISettingsStruct heli = configData.heli;
|
heliGUISettingsStruct heli = configData.heli;
|
||||||
|
|
||||||
if (heli.Throttle > 0) {
|
if (heli.Throttle > 0) {
|
||||||
@ -293,7 +293,7 @@ void ConfigCcpmWidget::refreshWidgetsValues(QString frameType)
|
|||||||
|
|
||||||
setupUI(frameType);
|
setupUI(frameType);
|
||||||
|
|
||||||
GUIConfigDataUnion config = GetConfigData();
|
GUIConfigDataUnion config = getConfigData();
|
||||||
|
|
||||||
// swashplate config
|
// swashplate config
|
||||||
setComboCurrentIndex( m_aircraft->ccpmType, m_aircraft->ccpmType->count() - (config.heli.SwashplateType +1));
|
setComboCurrentIndex( m_aircraft->ccpmType, m_aircraft->ccpmType->count() - (config.heli.SwashplateType +1));
|
||||||
@ -626,7 +626,7 @@ void ConfigCcpmWidget::UpdateMixer()
|
|||||||
if (throwConfigError(QString("HeliCP")))
|
if (throwConfigError(QString("HeliCP")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GUIConfigDataUnion config = GetConfigData();
|
GUIConfigDataUnion config = getConfigData();
|
||||||
|
|
||||||
useCCPM = !(config.heli.ccpmCollectivePassthroughState || !config.heli.ccpmLinkCyclicState);
|
useCCPM = !(config.heli.ccpmCollectivePassthroughState || !config.heli.ccpmLinkCyclicState);
|
||||||
useCyclic = config.heli.ccpmLinkRollState;
|
useCyclic = config.heli.ccpmLinkRollState;
|
||||||
@ -767,7 +767,7 @@ QString ConfigCcpmWidget::updateConfigObjects()
|
|||||||
updatingFromHardware = TRUE;
|
updatingFromHardware = TRUE;
|
||||||
|
|
||||||
//get the user options
|
//get the user options
|
||||||
GUIConfigDataUnion config = GetConfigData();
|
GUIConfigDataUnion config = getConfigData();
|
||||||
|
|
||||||
//swashplate config
|
//swashplate config
|
||||||
config.heli.SwashplateType = m_aircraft->ccpmType->count() - m_aircraft->ccpmType->currentIndex() - 1;
|
config.heli.SwashplateType = m_aircraft->ccpmType->count() - m_aircraft->ccpmType->currentIndex() - 1;
|
||||||
@ -807,7 +807,7 @@ QString ConfigCcpmWidget::updateConfigObjects()
|
|||||||
//tail
|
//tail
|
||||||
config.heli.Tail = m_aircraft->ccpmTailChannel->currentIndex();
|
config.heli.Tail = m_aircraft->ccpmTailChannel->currentIndex();
|
||||||
|
|
||||||
SetConfigData(config);
|
setConfigData(config);
|
||||||
|
|
||||||
updatingFromHardware = FALSE;
|
updatingFromHardware = FALSE;
|
||||||
return airframeType;
|
return airframeType;
|
||||||
@ -849,28 +849,25 @@ void ConfigCcpmWidget::getMixer()
|
|||||||
if (SwashLvlConfigurationInProgress)return;
|
if (SwashLvlConfigurationInProgress)return;
|
||||||
if (updatingToHardware)return;
|
if (updatingToHardware)return;
|
||||||
|
|
||||||
updatingFromHardware=TRUE;
|
updatingFromHardware = TRUE;
|
||||||
|
|
||||||
UAVDataObject* mixer = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
UAVDataObject* mixer = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
||||||
Q_ASSERT(mixer);
|
Q_ASSERT(mixer);
|
||||||
|
|
||||||
QPointer<VehicleConfig> vconfig = new VehicleConfig();
|
|
||||||
|
|
||||||
QList<double> curveValues;
|
QList<double> curveValues;
|
||||||
vconfig->getThrottleCurve(mixer, VehicleConfig::MIXER_THROTTLECURVE1, &curveValues);
|
getThrottleCurve(mixer, VehicleConfig::MIXER_THROTTLECURVE1, &curveValues);
|
||||||
|
|
||||||
// is at least one of the curve values != 0?
|
// is at least one of the curve values != 0?
|
||||||
if (vconfig->isValidThrottleCurve(&curveValues)) {
|
if (isValidThrottleCurve(&curveValues)) {
|
||||||
m_aircraft->ThrottleCurve->setCurve(&curveValues);
|
m_aircraft->ThrottleCurve->setCurve(&curveValues);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_aircraft->ThrottleCurve->ResetCurve();
|
m_aircraft->ThrottleCurve->ResetCurve();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getThrottleCurve(mixer, VehicleConfig::MIXER_THROTTLECURVE2, &curveValues);
|
||||||
vconfig->getThrottleCurve(mixer, VehicleConfig::MIXER_THROTTLECURVE2, &curveValues);
|
|
||||||
// is at least one of the curve values != 0?
|
// is at least one of the curve values != 0?
|
||||||
if (vconfig->isValidThrottleCurve(&curveValues)) {
|
if (isValidThrottleCurve(&curveValues)) {
|
||||||
m_aircraft->PitchCurve->setCurve(&curveValues);
|
m_aircraft->PitchCurve->setCurve(&curveValues);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -49,7 +49,7 @@ QStringList ConfigFixedWingWidget::getChannelDescriptions()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get the gui config data
|
// get the gui config data
|
||||||
GUIConfigDataUnion configData = GetConfigData();
|
GUIConfigDataUnion configData = getConfigData();
|
||||||
|
|
||||||
if (configData.fixedwing.FixedWingPitch1 > 0) {
|
if (configData.fixedwing.FixedWingPitch1 > 0) {
|
||||||
channelDesc[configData.fixedwing.FixedWingPitch1 - 1] = QString("FixedWingPitch1");
|
channelDesc[configData.fixedwing.FixedWingPitch1 - 1] = QString("FixedWingPitch1");
|
||||||
@ -80,6 +80,8 @@ ConfigFixedWingWidget::ConfigFixedWingWidget(QWidget *parent) :
|
|||||||
{
|
{
|
||||||
m_aircraft->setupUi(this);
|
m_aircraft->setupUi(this);
|
||||||
|
|
||||||
|
populateChannelComboBoxes();
|
||||||
|
|
||||||
QStringList fixedWingTypes;
|
QStringList fixedWingTypes;
|
||||||
fixedWingTypes << "Elevator aileron rudder" << "Elevon" << "Vtail";
|
fixedWingTypes << "Elevator aileron rudder" << "Elevon" << "Vtail";
|
||||||
m_aircraft->fixedWingType->addItems(fixedWingTypes);
|
m_aircraft->fixedWingType->addItems(fixedWingTypes);
|
||||||
@ -199,7 +201,7 @@ void ConfigFixedWingWidget::refreshWidgetsValues(QString frameType)
|
|||||||
m_aircraft->fixedWingThrottle->initLinearCurve(curveValues.count(), 1.0);
|
m_aircraft->fixedWingThrottle->initLinearCurve(curveValues.count(), 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
GUIConfigDataUnion config = GetConfigData();
|
GUIConfigDataUnion config = getConfigData();
|
||||||
fixedGUISettingsStruct fixed = config.fixedwing;
|
fixedGUISettingsStruct fixed = config.fixedwing;
|
||||||
|
|
||||||
// Then retrieve how channels are setup
|
// Then retrieve how channels are setup
|
||||||
@ -283,7 +285,7 @@ bool ConfigFixedWingWidget::setupFrameFixedWing(QString airframeType)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Now setup the channels:
|
// Now setup the channels:
|
||||||
GUIConfigDataUnion config = GetConfigData();
|
GUIConfigDataUnion config = getConfigData();
|
||||||
resetActuators(&config);
|
resetActuators(&config);
|
||||||
|
|
||||||
config.fixedwing.FixedWingPitch1 = m_aircraft->fwElevator1ChannelBox->currentIndex();
|
config.fixedwing.FixedWingPitch1 = m_aircraft->fwElevator1ChannelBox->currentIndex();
|
||||||
@ -293,7 +295,7 @@ bool ConfigFixedWingWidget::setupFrameFixedWing(QString airframeType)
|
|||||||
config.fixedwing.FixedWingYaw1 = m_aircraft->fwRudder1ChannelBox->currentIndex();
|
config.fixedwing.FixedWingYaw1 = m_aircraft->fwRudder1ChannelBox->currentIndex();
|
||||||
config.fixedwing.FixedWingThrottle = m_aircraft->fwEngineChannelBox->currentIndex();
|
config.fixedwing.FixedWingThrottle = m_aircraft->fwEngineChannelBox->currentIndex();
|
||||||
|
|
||||||
SetConfigData(config);
|
setConfigData(config);
|
||||||
|
|
||||||
UAVDataObject* mixer = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
UAVDataObject* mixer = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
||||||
Q_ASSERT(mixer);
|
Q_ASSERT(mixer);
|
||||||
@ -353,7 +355,7 @@ bool ConfigFixedWingWidget::setupFrameElevon(QString airframeType)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
GUIConfigDataUnion config = GetConfigData();
|
GUIConfigDataUnion config = getConfigData();
|
||||||
resetActuators(&config);
|
resetActuators(&config);
|
||||||
|
|
||||||
config.fixedwing.FixedWingRoll1 = m_aircraft->fwAileron1ChannelBox->currentIndex();
|
config.fixedwing.FixedWingRoll1 = m_aircraft->fwAileron1ChannelBox->currentIndex();
|
||||||
@ -362,7 +364,7 @@ bool ConfigFixedWingWidget::setupFrameElevon(QString airframeType)
|
|||||||
config.fixedwing.FixedWingYaw2 = m_aircraft->fwRudder2ChannelBox->currentIndex();
|
config.fixedwing.FixedWingYaw2 = m_aircraft->fwRudder2ChannelBox->currentIndex();
|
||||||
config.fixedwing.FixedWingThrottle = m_aircraft->fwEngineChannelBox->currentIndex();
|
config.fixedwing.FixedWingThrottle = m_aircraft->fwEngineChannelBox->currentIndex();
|
||||||
|
|
||||||
SetConfigData(config);
|
setConfigData(config);
|
||||||
|
|
||||||
UAVDataObject* mixer = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
UAVDataObject* mixer = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
||||||
Q_ASSERT(mixer);
|
Q_ASSERT(mixer);
|
||||||
@ -423,7 +425,7 @@ bool ConfigFixedWingWidget::setupFrameVtail(QString airframeType)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
GUIConfigDataUnion config = GetConfigData();
|
GUIConfigDataUnion config = getConfigData();
|
||||||
resetActuators(&config);
|
resetActuators(&config);
|
||||||
|
|
||||||
config.fixedwing.FixedWingPitch1 = m_aircraft->fwElevator1ChannelBox->currentIndex();
|
config.fixedwing.FixedWingPitch1 = m_aircraft->fwElevator1ChannelBox->currentIndex();
|
||||||
@ -432,7 +434,7 @@ bool ConfigFixedWingWidget::setupFrameVtail(QString airframeType)
|
|||||||
config.fixedwing.FixedWingRoll2 = m_aircraft->fwAileron2ChannelBox->currentIndex();
|
config.fixedwing.FixedWingRoll2 = m_aircraft->fwAileron2ChannelBox->currentIndex();
|
||||||
config.fixedwing.FixedWingThrottle = m_aircraft->fwEngineChannelBox->currentIndex();
|
config.fixedwing.FixedWingThrottle = m_aircraft->fwEngineChannelBox->currentIndex();
|
||||||
|
|
||||||
SetConfigData(config);
|
setConfigData(config);
|
||||||
|
|
||||||
UAVDataObject* mixer = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
UAVDataObject* mixer = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
||||||
Q_ASSERT(mixer);
|
Q_ASSERT(mixer);
|
||||||
|
@ -50,7 +50,7 @@ QStringList ConfigGroundVehicleWidget::getChannelDescriptions()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get the gui config data
|
// get the gui config data
|
||||||
GUIConfigDataUnion configData = GetConfigData();
|
GUIConfigDataUnion configData = getConfigData();
|
||||||
|
|
||||||
if (configData.ground.GroundVehicleSteering1 > 0) {
|
if (configData.ground.GroundVehicleSteering1 > 0) {
|
||||||
channelDesc[configData.ground.GroundVehicleSteering1 - 1] = QString("GroundSteering1");
|
channelDesc[configData.ground.GroundVehicleSteering1 - 1] = QString("GroundSteering1");
|
||||||
@ -72,6 +72,8 @@ ConfigGroundVehicleWidget::ConfigGroundVehicleWidget(QWidget *parent) :
|
|||||||
{
|
{
|
||||||
m_aircraft->setupUi(this);
|
m_aircraft->setupUi(this);
|
||||||
|
|
||||||
|
populateChannelComboBoxes();
|
||||||
|
|
||||||
QStringList groundVehicleTypes;
|
QStringList groundVehicleTypes;
|
||||||
groundVehicleTypes << "Turnable (car)" << "Differential (tank)" << "Motorcycle";
|
groundVehicleTypes << "Turnable (car)" << "Differential (tank)" << "Motorcycle";
|
||||||
m_aircraft->groundVehicleType->addItems(groundVehicleTypes);
|
m_aircraft->groundVehicleType->addItems(groundVehicleTypes);
|
||||||
@ -224,7 +226,7 @@ void ConfigGroundVehicleWidget::refreshWidgetsValues(QString frameType)
|
|||||||
} else {
|
} else {
|
||||||
m_aircraft->groundVehicleThrottle2->initLinearCurve(curveValues.count(), 1.0);
|
m_aircraft->groundVehicleThrottle2->initLinearCurve(curveValues.count(), 1.0);
|
||||||
}
|
}
|
||||||
GUIConfigDataUnion config = GetConfigData();
|
GUIConfigDataUnion config = getConfigData();
|
||||||
|
|
||||||
// THIS SECTION STILL NEEDS WORK. FOR THE MOMENT, USE THE FIXED-WING ONBOARD SETTING IN ORDER TO MINIMIZE CHANCES OF BOLLOXING REAL CODE
|
// THIS SECTION STILL NEEDS WORK. FOR THE MOMENT, USE THE FIXED-WING ONBOARD SETTING IN ORDER TO MINIMIZE CHANCES OF BOLLOXING REAL CODE
|
||||||
// Retrieve channel setup values
|
// Retrieve channel setup values
|
||||||
@ -310,13 +312,13 @@ bool ConfigGroundVehicleWidget::setupGroundVehicleMotorcycle(QString airframeTyp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Now setup the channels:
|
// Now setup the channels:
|
||||||
GUIConfigDataUnion config = GetConfigData();
|
GUIConfigDataUnion config = getConfigData();
|
||||||
resetActuators(&config);
|
resetActuators(&config);
|
||||||
|
|
||||||
config.ground.GroundVehicleThrottle1 = m_aircraft->gvMotor1ChannelBox->currentIndex();
|
config.ground.GroundVehicleThrottle1 = m_aircraft->gvMotor1ChannelBox->currentIndex();
|
||||||
config.ground.GroundVehicleThrottle2 = m_aircraft->gvMotor2ChannelBox->currentIndex();
|
config.ground.GroundVehicleThrottle2 = m_aircraft->gvMotor2ChannelBox->currentIndex();
|
||||||
|
|
||||||
SetConfigData(config);
|
setConfigData(config);
|
||||||
|
|
||||||
UAVDataObject* mixer = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
UAVDataObject* mixer = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
||||||
Q_ASSERT(mixer);
|
Q_ASSERT(mixer);
|
||||||
@ -360,13 +362,13 @@ bool ConfigGroundVehicleWidget::setupGroundVehicleDifferential(QString airframeT
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Now setup the channels:
|
// Now setup the channels:
|
||||||
GUIConfigDataUnion config = GetConfigData();
|
GUIConfigDataUnion config = getConfigData();
|
||||||
resetActuators(&config);
|
resetActuators(&config);
|
||||||
|
|
||||||
config.ground.GroundVehicleThrottle1 = m_aircraft->gvMotor1ChannelBox->currentIndex();
|
config.ground.GroundVehicleThrottle1 = m_aircraft->gvMotor1ChannelBox->currentIndex();
|
||||||
config.ground.GroundVehicleThrottle2 = m_aircraft->gvMotor2ChannelBox->currentIndex();
|
config.ground.GroundVehicleThrottle2 = m_aircraft->gvMotor2ChannelBox->currentIndex();
|
||||||
|
|
||||||
SetConfigData((config));
|
setConfigData(config);
|
||||||
|
|
||||||
UAVDataObject *mixer = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
UAVDataObject *mixer = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
||||||
Q_ASSERT(mixer);
|
Q_ASSERT(mixer);
|
||||||
@ -404,7 +406,7 @@ bool ConfigGroundVehicleWidget::setupGroundVehicleCar(QString airframeType)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Now setup the channels:
|
// Now setup the channels:
|
||||||
GUIConfigDataUnion config = GetConfigData();
|
GUIConfigDataUnion config = getConfigData();
|
||||||
resetActuators(&config);
|
resetActuators(&config);
|
||||||
|
|
||||||
config.ground.GroundVehicleThrottle1 = m_aircraft->gvMotor1ChannelBox->currentIndex();
|
config.ground.GroundVehicleThrottle1 = m_aircraft->gvMotor1ChannelBox->currentIndex();
|
||||||
@ -412,7 +414,7 @@ bool ConfigGroundVehicleWidget::setupGroundVehicleCar(QString airframeType)
|
|||||||
config.ground.GroundVehicleSteering1 = m_aircraft->gvSteering1ChannelBox->currentIndex();
|
config.ground.GroundVehicleSteering1 = m_aircraft->gvSteering1ChannelBox->currentIndex();
|
||||||
config.ground.GroundVehicleSteering2 = m_aircraft->gvSteering2ChannelBox->currentIndex();
|
config.ground.GroundVehicleSteering2 = m_aircraft->gvSteering2ChannelBox->currentIndex();
|
||||||
|
|
||||||
SetConfigData(config);
|
setConfigData(config);
|
||||||
|
|
||||||
UAVDataObject* mixer = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
UAVDataObject* mixer = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
||||||
Q_ASSERT(mixer);
|
Q_ASSERT(mixer);
|
||||||
|
@ -52,7 +52,7 @@ QStringList ConfigMultiRotorWidget::getChannelDescriptions()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get the gui config data
|
// get the gui config data
|
||||||
GUIConfigDataUnion configData = GetConfigData();
|
GUIConfigDataUnion configData = getConfigData();
|
||||||
multiGUISettingsStruct multi = configData.multi;
|
multiGUISettingsStruct multi = configData.multi;
|
||||||
|
|
||||||
if (multi.VTOLMotorN > 0 && multi.VTOLMotorN <= ConfigMultiRotorWidget::CHANNEL_NUMELEM) {
|
if (multi.VTOLMotorN > 0 && multi.VTOLMotorN <= ConfigMultiRotorWidget::CHANNEL_NUMELEM) {
|
||||||
@ -90,9 +90,12 @@ ConfigMultiRotorWidget::ConfigMultiRotorWidget(QWidget *parent) :
|
|||||||
{
|
{
|
||||||
m_aircraft->setupUi(this);
|
m_aircraft->setupUi(this);
|
||||||
|
|
||||||
|
populateChannelComboBoxes();
|
||||||
|
|
||||||
// Setup the Multirotor picture in the Quad settings interface
|
// Setup the Multirotor picture in the Quad settings interface
|
||||||
m_aircraft->quadShape->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
m_aircraft->quadShape->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
m_aircraft->quadShape->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
m_aircraft->quadShape->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
|
||||||
QSvgRenderer *renderer = new QSvgRenderer();
|
QSvgRenderer *renderer = new QSvgRenderer();
|
||||||
renderer->load(QString(":/configgadget/images/multirotor-shapes.svg"));
|
renderer->load(QString(":/configgadget/images/multirotor-shapes.svg"));
|
||||||
|
|
||||||
@ -284,7 +287,7 @@ void ConfigMultiRotorWidget::refreshWidgetsValues(QString frameType)
|
|||||||
m_aircraft->multiThrottleCurve->initLinearCurve(curveValues.count(), 0.9);
|
m_aircraft->multiThrottleCurve->initLinearCurve(curveValues.count(), 0.9);
|
||||||
}
|
}
|
||||||
|
|
||||||
GUIConfigDataUnion config = GetConfigData();
|
GUIConfigDataUnion config = getConfigData();
|
||||||
multiGUISettingsStruct multi = config.multi;
|
multiGUISettingsStruct multi = config.multi;
|
||||||
|
|
||||||
if (frameType == "QuadP") {
|
if (frameType == "QuadP") {
|
||||||
@ -670,9 +673,9 @@ QString ConfigMultiRotorWidget::updateConfigObjectsFromWidgets()
|
|||||||
motorList << "VTOLMotorNW" << "VTOLMotorNE" << "VTOLMotorS";
|
motorList << "VTOLMotorNW" << "VTOLMotorNE" << "VTOLMotorS";
|
||||||
setupMotors(motorList);
|
setupMotors(motorList);
|
||||||
|
|
||||||
GUIConfigDataUnion config = GetConfigData();
|
GUIConfigDataUnion config = getConfigData();
|
||||||
config.multi.TRIYaw = m_aircraft->triYawChannelBox->currentIndex();
|
config.multi.TRIYaw = m_aircraft->triYawChannelBox->currentIndex();
|
||||||
SetConfigData(config);
|
setConfigData(config);
|
||||||
|
|
||||||
// Motor 1 to 6, Y6 Layout:
|
// Motor 1 to 6, Y6 Layout:
|
||||||
// pitch roll yaw
|
// pitch roll yaw
|
||||||
@ -787,11 +790,10 @@ void ConfigMultiRotorWidget::setupMotors(QList<QString> motorList)
|
|||||||
<< m_aircraft->multiMotorChannelBox5 << m_aircraft->multiMotorChannelBox6
|
<< m_aircraft->multiMotorChannelBox5 << m_aircraft->multiMotorChannelBox6
|
||||||
<< m_aircraft->multiMotorChannelBox7 << m_aircraft->multiMotorChannelBox8;
|
<< m_aircraft->multiMotorChannelBox7 << m_aircraft->multiMotorChannelBox8;
|
||||||
|
|
||||||
GUIConfigDataUnion configData = GetConfigData();
|
GUIConfigDataUnion configData = getConfigData();
|
||||||
resetActuators(&configData);
|
resetActuators(&configData);
|
||||||
|
|
||||||
foreach (QString motor, motorList)
|
foreach (QString motor, motorList) {
|
||||||
{
|
|
||||||
int index = mmList.takeFirst()->currentIndex();
|
int index = mmList.takeFirst()->currentIndex();
|
||||||
if (motor == QString("VTOLMotorN")) {
|
if (motor == QString("VTOLMotorN")) {
|
||||||
configData.multi.VTOLMotorN = index;
|
configData.multi.VTOLMotorN = index;
|
||||||
@ -811,7 +813,7 @@ void ConfigMultiRotorWidget::setupMotors(QList<QString> motorList)
|
|||||||
configData.multi.VTOLMotorNW = index;
|
configData.multi.VTOLMotorNW = index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SetConfigData(configData);
|
setConfigData(configData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,14 +38,13 @@ VehicleConfig::VehicleConfig(QWidget *parent) : ConfigTaskWidget(parent)
|
|||||||
// Generate lists of mixerTypeNames, mixerVectorNames, channelNames
|
// Generate lists of mixerTypeNames, mixerVectorNames, channelNames
|
||||||
channelNames << "None";
|
channelNames << "None";
|
||||||
for (int i = 0; i < (int) VehicleConfig::CHANNEL_NUMELEM; i++) {
|
for (int i = 0; i < (int) VehicleConfig::CHANNEL_NUMELEM; i++) {
|
||||||
mixerTypes << QString("Mixer%1Type").arg(i+1);
|
mixerTypes << QString("Mixer%1Type").arg(i + 1);
|
||||||
mixerVectors << QString("Mixer%1Vector").arg(i+1);
|
mixerVectors << QString("Mixer%1Vector").arg(i + 1);
|
||||||
channelNames << QString("Channel%1").arg(i+1);
|
channelNames << QString("Channel%1").arg(i + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
mixerTypeDescriptions << "Disabled" << "Motor" << "Servo" << "CameraRoll" << "CameraPitch"
|
mixerTypeDescriptions << "Disabled" << "Motor" << "Servo" << "CameraRoll" << "CameraPitch" << "CameraYaw"
|
||||||
<< "CameraYaw" << "Accessory0" << "Accessory1" << "Accessory2"
|
<< "Accessory0" << "Accessory1" << "Accessory2" << "Accessory3" << "Accessory4" << "Accessory5";
|
||||||
<< "Accessory3" << "Accessory4" << "Accessory5";
|
|
||||||
|
|
||||||
// This is needed because new style tries to compact things as much as possible in grid
|
// This is needed because new style tries to compact things as much as possible in grid
|
||||||
// and on OSX the widget sizes of PushButtons is reported incorrectly:
|
// and on OSX the widget sizes of PushButtons is reported incorrectly:
|
||||||
@ -60,45 +59,43 @@ VehicleConfig::~VehicleConfig()
|
|||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
GUIConfigDataUnion VehicleConfig::GetConfigData()
|
GUIConfigDataUnion VehicleConfig::getConfigData()
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
GUIConfigDataUnion configData;
|
|
||||||
|
|
||||||
// get an instance of systemsettings
|
// get an instance of systemsettings
|
||||||
SystemSettings * systemSettings = SystemSettings::GetInstance(getUAVObjectManager());
|
SystemSettings *systemSettings = SystemSettings::GetInstance(getUAVObjectManager());
|
||||||
Q_ASSERT(systemSettings);
|
Q_ASSERT(systemSettings);
|
||||||
SystemSettings::DataFields systemSettingsData = systemSettings->getData();
|
SystemSettings::DataFields systemSettingsData = systemSettings->getData();
|
||||||
|
|
||||||
// copy systemsettings -> local configData
|
// copy systemsettings -> local configData
|
||||||
for(i = 0; i < (int)(SystemSettings::GUICONFIGDATA_NUMELEM); i++)
|
GUIConfigDataUnion configData;
|
||||||
configData.UAVObject[i]=systemSettingsData.GUIConfigData[i];
|
for (int i = 0; i < (int) SystemSettings::GUICONFIGDATA_NUMELEM; i++) {
|
||||||
|
configData.UAVObject[i] = systemSettingsData.GUIConfigData[i];
|
||||||
|
}
|
||||||
|
|
||||||
// sanity check
|
// sanity check
|
||||||
Q_ASSERT(SystemSettings::GUICONFIGDATA_NUMELEM ==
|
Q_ASSERT(SystemSettings::GUICONFIGDATA_NUMELEM == (sizeof(configData.UAVObject) / sizeof(configData.UAVObject[0])));
|
||||||
(sizeof(configData.UAVObject) / sizeof(configData.UAVObject[0])));
|
|
||||||
|
|
||||||
return configData;
|
return configData;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VehicleConfig::SetConfigData(GUIConfigDataUnion configData)
|
void VehicleConfig::setConfigData(GUIConfigDataUnion configData)
|
||||||
{
|
{
|
||||||
// sanity check
|
// sanity check
|
||||||
Q_ASSERT(SystemSettings::GUICONFIGDATA_NUMELEM == (sizeof(configData.UAVObject) / sizeof(configData.UAVObject[0])));
|
Q_ASSERT(SystemSettings::GUICONFIGDATA_NUMELEM == (sizeof(configData.UAVObject) / sizeof(configData.UAVObject[0])));
|
||||||
|
|
||||||
// get an instance of systemsettings
|
// get an instance of systemsettings
|
||||||
SystemSettings * systemSettings = SystemSettings::GetInstance(getUAVObjectManager());
|
SystemSettings *systemSettings = SystemSettings::GetInstance(getUAVObjectManager());
|
||||||
Q_ASSERT(systemSettings);
|
Q_ASSERT(systemSettings);
|
||||||
SystemSettings::DataFields systemSettingsData = systemSettings->getData();
|
SystemSettings::DataFields systemSettingsData = systemSettings->getData();
|
||||||
|
|
||||||
UAVObjectField* guiConfig = systemSettings->getField("GUIConfigData");
|
UAVObjectField *guiConfig = systemSettings->getField("GUIConfigData");
|
||||||
Q_ASSERT(guiConfig);
|
Q_ASSERT(guiConfig);
|
||||||
if (!guiConfig) {
|
if (!guiConfig) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy parameter configData -> systemsettings
|
// copy parameter configData -> systemsettings
|
||||||
for (int i = 0; i < (int) (SystemSettings::GUICONFIGDATA_NUMELEM); i++) {
|
for (int i = 0; i < (int) SystemSettings::GUICONFIGDATA_NUMELEM; i++) {
|
||||||
guiConfig->setValue(configData.UAVObject[i], i);
|
guiConfig->setValue(configData.UAVObject[i], i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -120,6 +117,17 @@ void VehicleConfig::resetActuators(GUIConfigDataUnion *configData)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NEW STYLE: Loop through the widgets looking for all widgets that have "ChannelBox" in their name
|
||||||
|
// The upshot of this is that ALL new ComboBox widgets for selecting the output channel must have "ChannelBox" in their name
|
||||||
|
// FOR WHATEVER REASON, THIS DOES NOT WORK WITH ChannelBox. ChannelBo is sufficiently accurate
|
||||||
|
void VehicleConfig::populateChannelComboBoxes()
|
||||||
|
{
|
||||||
|
QList<QComboBox *> l = findChildren<QComboBox*>(QRegExp("\\S+ChannelBo\\S+"));
|
||||||
|
foreach(QComboBox *combobox, l) {
|
||||||
|
combobox->addItems(channelNames);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Helper function:
|
Helper function:
|
||||||
Sets the current index on supplied combobox to index
|
Sets the current index on supplied combobox to index
|
||||||
|
@ -24,8 +24,8 @@
|
|||||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#ifndef GUIVEHICLECONFIG_H
|
#ifndef VEHICLECONFIG_H
|
||||||
#define GUIVEHICLECONFIG_H
|
#define VEHICLECONFIG_H
|
||||||
|
|
||||||
#include "../uavobjectwidgetutils/configtaskwidget.h"
|
#include "../uavobjectwidgetutils/configtaskwidget.h"
|
||||||
#include "extensionsystem/pluginmanager.h"
|
#include "extensionsystem/pluginmanager.h"
|
||||||
@ -95,10 +95,10 @@ typedef struct {
|
|||||||
|
|
||||||
typedef union
|
typedef union
|
||||||
{
|
{
|
||||||
uint UAVObject[4]; // 32 bits * 4
|
uint UAVObject[4]; // 32 bits * 4
|
||||||
heliGUISettingsStruct heli; // 128 bits
|
heliGUISettingsStruct heli; // 128 bits
|
||||||
fixedGUISettingsStruct fixedwing;
|
fixedGUISettingsStruct fixedwing;
|
||||||
multiGUISettingsStruct multi;
|
multiGUISettingsStruct multi;
|
||||||
groundGUISettingsStruct ground;
|
groundGUISettingsStruct ground;
|
||||||
} GUIConfigDataUnion;
|
} GUIConfigDataUnion;
|
||||||
|
|
||||||
@ -140,9 +140,8 @@ public:
|
|||||||
|
|
||||||
static const quint32 CHANNEL_NUMELEM = ActuatorCommand::CHANNEL_NUMELEM;;
|
static const quint32 CHANNEL_NUMELEM = ActuatorCommand::CHANNEL_NUMELEM;;
|
||||||
|
|
||||||
// TODO remove 1st capital
|
static GUIConfigDataUnion getConfigData();
|
||||||
static GUIConfigDataUnion GetConfigData();
|
static void setConfigData(GUIConfigDataUnion configData);
|
||||||
static void SetConfigData(GUIConfigDataUnion configData);
|
|
||||||
|
|
||||||
static void resetField(UAVObjectField *field);
|
static void resetField(UAVObjectField *field);
|
||||||
|
|
||||||
@ -153,23 +152,11 @@ public:
|
|||||||
VehicleConfig(QWidget *parent = 0);
|
VehicleConfig(QWidget *parent = 0);
|
||||||
~VehicleConfig();
|
~VehicleConfig();
|
||||||
|
|
||||||
virtual QString updateConfigObjectsFromWidgets();
|
|
||||||
virtual void refreshWidgetsValues(QString frameType);
|
virtual void refreshWidgetsValues(QString frameType);
|
||||||
|
virtual QString updateConfigObjectsFromWidgets();
|
||||||
|
|
||||||
// TODO move to separate class
|
double getMixerValue(UAVDataObject *mixer, QString elementName);
|
||||||
double getMixerVectorValue(UAVDataObject *mixer, int channel, MixerVectorElem elementName);
|
void setMixerValue(UAVDataObject *mixer, QString elementName, double value);
|
||||||
void setMixerVectorValue(UAVDataObject *mixer, int channel, MixerVectorElem elementName, double value);
|
|
||||||
void resetMixerVector(UAVDataObject *mixer, int channel);
|
|
||||||
void resetMotorAndServoMixers(UAVDataObject *mixer);
|
|
||||||
QString getMixerType(UAVDataObject *mixer, int channel);
|
|
||||||
void setMixerType(UAVDataObject *mixer, int channel, MixerTypeElem mixerType);
|
|
||||||
double getMixerValue(UAVDataObject *mixer, QString elementName);
|
|
||||||
void setMixerValue(UAVDataObject *mixer, QString elementName, double value);
|
|
||||||
void setThrottleCurve(UAVDataObject *mixer, MixerThrottleCurveElem curveType, QList<double> curve);
|
|
||||||
void getThrottleCurve(UAVDataObject *mixer, MixerThrottleCurveElem curveType, QList<double>* curve);
|
|
||||||
bool isValidThrottleCurve(QList<double> *curve);
|
|
||||||
double getCurveMin(QList<double> *curve);
|
|
||||||
double getCurveMax(QList<double> *curve);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QStringList channelNames;
|
QStringList channelNames;
|
||||||
@ -177,6 +164,20 @@ protected:
|
|||||||
QStringList mixerVectors;
|
QStringList mixerVectors;
|
||||||
QStringList mixerTypeDescriptions;
|
QStringList mixerTypeDescriptions;
|
||||||
|
|
||||||
|
void populateChannelComboBoxes();
|
||||||
|
|
||||||
|
double getMixerVectorValue(UAVDataObject *mixer, int channel, MixerVectorElem elementName);
|
||||||
|
void setMixerVectorValue(UAVDataObject *mixer, int channel, MixerVectorElem elementName, double value);
|
||||||
|
void resetMixerVector(UAVDataObject *mixer, int channel);
|
||||||
|
void resetMotorAndServoMixers(UAVDataObject *mixer);
|
||||||
|
QString getMixerType(UAVDataObject *mixer, int channel);
|
||||||
|
void setMixerType(UAVDataObject *mixer, int channel, MixerTypeElem mixerType);
|
||||||
|
void setThrottleCurve(UAVDataObject *mixer, MixerThrottleCurveElem curveType, QList<double> curve);
|
||||||
|
void getThrottleCurve(UAVDataObject *mixer, MixerThrottleCurveElem curveType, QList<double>* curve);
|
||||||
|
bool isValidThrottleCurve(QList<double> *curve);
|
||||||
|
double getCurveMin(QList<double> *curve);
|
||||||
|
double getCurveMax(QList<double> *curve);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static UAVObjectManager *getUAVObjectManager();
|
static UAVObjectManager *getUAVObjectManager();
|
||||||
|
|
||||||
@ -187,4 +188,4 @@ private slots:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // GUIVEHICLECONFIG_H
|
#endif // VEHICLECONFIG_H
|
||||||
|
@ -154,24 +154,8 @@ ConfigVehicleTypeWidget::ConfigVehicleTypeWidget(QWidget *parent) : ConfigTaskWi
|
|||||||
// Force the tab index to match
|
// Force the tab index to match
|
||||||
m_aircraft->airframesWidget->setCurrentIndex(1);
|
m_aircraft->airframesWidget->setCurrentIndex(1);
|
||||||
|
|
||||||
// Generate lists of mixerTypeNames, mixerVectorNames, channelNames
|
|
||||||
channelNames << "None";
|
|
||||||
for (int i = 0; i < (int) ActuatorSettings::CHANNELADDR_NUMELEM; i++) {
|
|
||||||
mixerTypes << QString("Mixer%1Type").arg(i + 1);
|
|
||||||
mixerVectors << QString("Mixer%1Vector").arg(i + 1);
|
|
||||||
channelNames << QString("Channel%1").arg(i + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// NEW STYLE: Loop through the widgets looking for all widgets that have "ChannelBox" in their name
|
|
||||||
// The upshot of this is that ALL new ComboBox widgets for selecting the output channel must have "ChannelBox" in their name
|
|
||||||
// FOR WHATEVER REASON, THIS DOES NOT WORK WITH ChannelBox. ChannelBo is sufficiently accurate
|
|
||||||
QList<QComboBox *> l = findChildren<QComboBox*>(QRegExp("\\S+ChannelBo\\S+"));
|
|
||||||
foreach(QComboBox *combobox, l) {
|
|
||||||
combobox->addItems(channelNames);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Connect aircraft type selection dropbox to callback function
|
// Connect aircraft type selection dropbox to callback function
|
||||||
connect(m_aircraft->aircraftType, SIGNAL(currentIndexChanged(int)), m_aircraft->airframesWidget, SLOT(setCurrentIndex(int)));
|
connect(m_aircraft->aircraftType, SIGNAL(currentIndexChanged(int)), this, SLOT(switchAirframeType(int)));
|
||||||
|
|
||||||
// Connect the three feed forward test checkboxes
|
// Connect the three feed forward test checkboxes
|
||||||
connect(m_aircraft->ffTestBox1, SIGNAL(clicked(bool)), this, SLOT(enableFFTest()));
|
connect(m_aircraft->ffTestBox1, SIGNAL(clicked(bool)), this, SLOT(enableFFTest()));
|
||||||
@ -196,15 +180,10 @@ ConfigVehicleTypeWidget::~ConfigVehicleTypeWidget()
|
|||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
void ConfigVehicleTypeWidget::switchAirframeType(int index)
|
||||||
Slot for switching the airframe type. We do it explicitely
|
{
|
||||||
rather than a signal in the UI, because we want to force a fitInView of the quad shapes.
|
m_aircraft->airframesWidget->setCurrentIndex(index);
|
||||||
This is because this method (fitinview) only works when the widget is shown.
|
}
|
||||||
*/
|
|
||||||
//void ConfigVehicleTypeWidget::switchAirframeType(int index)
|
|
||||||
//{
|
|
||||||
// m_aircraft->airframesWidget->setCurrentIndex(index);
|
|
||||||
//}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Refreshes the current value of the SystemSettings which holds the aircraft type
|
Refreshes the current value of the SystemSettings which holds the aircraft type
|
||||||
@ -233,9 +212,8 @@ void ConfigVehicleTypeWidget::refreshWidgetsValues(UAVObject *o)
|
|||||||
// is not ideal, but there you go.
|
// is not ideal, but there you go.
|
||||||
QString frameType = field->getValue().toString();
|
QString frameType = field->getValue().toString();
|
||||||
qDebug() << "ConfigVehicleTypeWidget::refreshWidgetsValues - frame type:" << frameType;
|
qDebug() << "ConfigVehicleTypeWidget::refreshWidgetsValues - frame type:" << frameType;
|
||||||
//setupAirframeUI(frameType);
|
|
||||||
|
|
||||||
QString category = "FixedWing";//frameCategory(frameType);
|
QString category = frameCategory(frameType);
|
||||||
if (category == "FixedWing") {
|
if (category == "FixedWing") {
|
||||||
// Retrieve fixed wing settings
|
// Retrieve fixed wing settings
|
||||||
setComboCurrentIndex(m_aircraft->aircraftType, m_aircraft->aircraftType->findText("Fixed Wing"));
|
setComboCurrentIndex(m_aircraft->aircraftType, m_aircraft->aircraftType->findText("Fixed Wing"));
|
||||||
@ -378,13 +356,12 @@ void ConfigVehicleTypeWidget::enableFFTest()
|
|||||||
// - Check if all three checkboxes are checked
|
// - Check if all three checkboxes are checked
|
||||||
// - Every other timer event: toggle engine from 45% to 55%
|
// - Every other timer event: toggle engine from 45% to 55%
|
||||||
// - Every other time event: send FF settings to flight FW
|
// - Every other time event: send FF settings to flight FW
|
||||||
if (m_aircraft->ffTestBox1->isChecked() &&
|
if (m_aircraft->ffTestBox1->isChecked() && m_aircraft->ffTestBox2->isChecked()
|
||||||
m_aircraft->ffTestBox2->isChecked() &&
|
&& m_aircraft->ffTestBox3->isChecked()) {
|
||||||
m_aircraft->ffTestBox3->isChecked()) {
|
if (!ffTuningInProgress) {
|
||||||
if (!ffTuningInProgress)
|
|
||||||
{
|
|
||||||
// Initiate tuning:
|
// Initiate tuning:
|
||||||
UAVDataObject* obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("ManualControlCommand")));
|
UAVDataObject* obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(
|
||||||
|
QString("ManualControlCommand")));
|
||||||
UAVObject::Metadata mdata = obj->getMetadata();
|
UAVObject::Metadata mdata = obj->getMetadata();
|
||||||
accInitialData = mdata;
|
accInitialData = mdata;
|
||||||
UAVObject::SetFlightAccess(mdata, UAVObject::ACCESS_READONLY);
|
UAVObject::SetFlightAccess(mdata, UAVObject::ACCESS_READONLY);
|
||||||
@ -404,9 +381,10 @@ void ConfigVehicleTypeWidget::enableFFTest()
|
|||||||
vconfig->setMixerValue(mixer, "DecelTime", m_aircraft->decelTime->value());
|
vconfig->setMixerValue(mixer, "DecelTime", m_aircraft->decelTime->value());
|
||||||
vconfig->setMixerValue(mixer, "MaxAccel", m_aircraft->maxAccelSlider->value());
|
vconfig->setMixerValue(mixer, "MaxAccel", m_aircraft->maxAccelSlider->value());
|
||||||
mixer->updated();
|
mixer->updated();
|
||||||
} else {
|
} else {
|
||||||
// Toggle motor state
|
// Toggle motor state
|
||||||
UAVDataObject* obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("ManualControlCommand")));
|
UAVDataObject* obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(
|
||||||
|
QString("ManualControlCommand")));
|
||||||
double value = obj->getField("Throttle")->getDouble();
|
double value = obj->getField("Throttle")->getDouble();
|
||||||
double target = (value < 0.5) ? 0.55 : 0.45;
|
double target = (value < 0.5) ? 0.55 : 0.45;
|
||||||
obj->getField("Throttle")->setValue(target);
|
obj->getField("Throttle")->setValue(target);
|
||||||
@ -420,7 +398,8 @@ void ConfigVehicleTypeWidget::enableFFTest()
|
|||||||
// Disarm!
|
// Disarm!
|
||||||
if (ffTuningInProgress) {
|
if (ffTuningInProgress) {
|
||||||
ffTuningInProgress = false;
|
ffTuningInProgress = false;
|
||||||
UAVDataObject* obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("ManualControlCommand")));
|
UAVDataObject* obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(
|
||||||
|
QString("ManualControlCommand")));
|
||||||
UAVObject::Metadata mdata = obj->getMetadata();
|
UAVObject::Metadata mdata = obj->getMetadata();
|
||||||
mdata = accInitialData; // Restore metadata
|
mdata = accInitialData; // Restore metadata
|
||||||
obj->setMetadata(mdata);
|
obj->setMetadata(mdata);
|
||||||
@ -435,7 +414,7 @@ void ConfigVehicleTypeWidget::enableFFTest()
|
|||||||
*/
|
*/
|
||||||
void ConfigVehicleTypeWidget::updateFeedForwardUI()
|
void ConfigVehicleTypeWidget::updateFeedForwardUI()
|
||||||
{
|
{
|
||||||
UAVDataObject* mixer = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
UAVDataObject *mixer = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
||||||
Q_ASSERT(mixer);
|
Q_ASSERT(mixer);
|
||||||
|
|
||||||
QPointer<VehicleConfig> vconfig = new VehicleConfig();
|
QPointer<VehicleConfig> vconfig = new VehicleConfig();
|
||||||
|
@ -65,15 +65,12 @@ private:
|
|||||||
|
|
||||||
QString frameCategory(QString frameType);
|
QString frameCategory(QString frameType);
|
||||||
|
|
||||||
QStringList channelNames;
|
|
||||||
QStringList mixerTypes;
|
|
||||||
QStringList mixerVectors;
|
|
||||||
|
|
||||||
bool ffTuningInProgress;
|
bool ffTuningInProgress;
|
||||||
bool ffTuningPhase;
|
bool ffTuningPhase;
|
||||||
UAVObject::Metadata accInitialData;
|
UAVObject::Metadata accInitialData;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
void switchAirframeType(int index);
|
||||||
void enableFFTest();
|
void enableFFTest();
|
||||||
void openHelp();
|
void openHelp();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user