diff --git a/ground/gcs/src/plugins/setupwizard/pages/controllerpage.cpp b/ground/gcs/src/plugins/setupwizard/pages/controllerpage.cpp index 3597e2cd9..354aa868a 100644 --- a/ground/gcs/src/plugins/setupwizard/pages/controllerpage.cpp +++ b/ground/gcs/src/plugins/setupwizard/pages/controllerpage.cpp @@ -199,6 +199,35 @@ void ControllerPage::connectionStatusChanged() SetupWizard::CONTROLLER_TYPE type = getControllerType(); setControllerType(type); + QPixmap boardPic; + QSize picSize = QSize(250,250); + + switch (type) { + case SetupWizard::CONTROLLER_CC: + boardPic.load(":/configgadget/images/coptercontrol.svg"); + ui->boardImg->setPixmap(boardPic.scaled(picSize, Qt::KeepAspectRatio)); + break; + + case SetupWizard::CONTROLLER_CC3D: + boardPic.load(":/configgadget/images/cc3d_top.png"); + ui->boardImg->setPixmap(boardPic.scaled(picSize, Qt::KeepAspectRatio)); + break; + + case SetupWizard::CONTROLLER_REVO: + case SetupWizard::CONTROLLER_DISCOVERYF4: + boardPic.load(":/configgadget/images/revolution_top.png"); + ui->boardImg->setPixmap(boardPic.scaled(picSize, Qt::KeepAspectRatio)); + break; + + case SetupWizard::CONTROLLER_NANO: + boardPic.load(":/configgadget/images/nano_top.png"); + ui->boardImg->setPixmap(boardPic.scaled(picSize, Qt::KeepAspectRatio)); + break; + + default: + ui->boardImg->setPixmap(QPixmap()); + break; + } qDebug() << "Connection status changed: Connected, controller type: " << getControllerType(); } else { ui->deviceCombo->setEnabled(true); @@ -206,6 +235,7 @@ void ControllerPage::connectionStatusChanged() ui->boardTypeCombo->setEnabled(false); ui->boardTypeCombo->model()->setData(ui->boardTypeCombo->model()->index(0, 0), QVariant(0), Qt::UserRole - 1); setControllerType(SetupWizard::CONTROLLER_UNKNOWN); + ui->boardImg->setPixmap(QPixmap()); qDebug() << "Connection status changed: Disconnected"; } emit completeChanged(); diff --git a/ground/gcs/src/plugins/setupwizard/pages/controllerpage.ui b/ground/gcs/src/plugins/setupwizard/pages/controllerpage.ui index 8567880ee..031cd240e 100644 --- a/ground/gcs/src/plugins/setupwizard/pages/controllerpage.ui +++ b/ground/gcs/src/plugins/setupwizard/pages/controllerpage.ui @@ -60,7 +60,58 @@ p, li { white-space: pre-wrap; } 20 - 40 + 9 + + + + + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 100 + 100 + + + + + 250 + 250 + + + + + + + true + + + + + + + + + Qt::Vertical + + + + 20 + 9 diff --git a/ground/gcs/src/plugins/setupwizard/pages/summarypage.ui b/ground/gcs/src/plugins/setupwizard/pages/summarypage.ui index c53a64c21..4d8806c84 100644 --- a/ground/gcs/src/plugins/setupwizard/pages/summarypage.ui +++ b/ground/gcs/src/plugins/setupwizard/pages/summarypage.ui @@ -44,7 +44,7 @@ p, li { white-space: pre-wrap; } 16777215 - 250 + 220 @@ -80,8 +80,8 @@ p, li { white-space: pre-wrap; } - 120 - 120 + 170 + 170