mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-17 02:52:12 +01:00
Bugfixes: get both confighardware and firmware widgets to show CC3D image if detected.
This commit is contained in:
parent
7d7cbb5fce
commit
9c716abb11
@ -41,8 +41,30 @@ ConfigCCHWWidget::ConfigCCHWWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
m_telemetry = new Ui_CC_HW_Widget();
|
||||
m_telemetry->setupUi(this);
|
||||
|
||||
m_telemetry->label_2->setPixmap(QPixmap(":/configgadget/images/coptercontrol.svg"));
|
||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||
UAVObjectUtilManager* utilMngr = pm->getObject<UAVObjectUtilManager>();
|
||||
int id = utilMngr->getBoardModel();
|
||||
|
||||
switch (id) {
|
||||
case 0x0101:
|
||||
m_telemetry->label_2->setPixmap(QPixmap(":/uploader/images/deviceID-0101.svg"));
|
||||
break;
|
||||
case 0x0301:
|
||||
m_telemetry->label_2->setPixmap(QPixmap(":/uploader/images/deviceID-0301.svg"));
|
||||
break;
|
||||
case 0x0401:
|
||||
m_telemetry->label_2->setPixmap(QPixmap(":/uploader/images/deviceID-0401.svg"));
|
||||
break;
|
||||
case 0x0402:
|
||||
m_telemetry->label_2->setPixmap(QPixmap(":/uploader/images/deviceID-0402.svg"));
|
||||
break;
|
||||
case 0x0201:
|
||||
m_telemetry->label_2->setPixmap(QPixmap(":/uploader/images/deviceID-0201.svg"));
|
||||
break;
|
||||
default:
|
||||
m_telemetry->label_2->setPixmap(QPixmap(":/configgadget/images/coptercontrol.svg"));
|
||||
break;
|
||||
}
|
||||
addApplySaveButtons(m_telemetry->saveTelemetryToRAM,m_telemetry->saveTelemetryToSD);
|
||||
addUAVObjectToWidgetRelation("HwSettings","CC_FlexiPort",m_telemetry->cbFlexi);
|
||||
addUAVObjectToWidgetRelation("HwSettings","CC_MainPort",m_telemetry->cbTele);
|
||||
|
@ -94,6 +94,9 @@ void runningDeviceWidget::populate()
|
||||
case 0x0401:
|
||||
devicePic->renderer()->load(QString(":/uploader/images/deviceID-0401.svg"));
|
||||
break;
|
||||
case 0x0402:
|
||||
devicePic->renderer()->load(QString(":/uploader/images/deviceID-0402.svg"));
|
||||
break;
|
||||
case 0x0201:
|
||||
devicePic->renderer()->load(QString(":/uploader/images/deviceID-0201.svg"));
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user