From a00dd67cbd82f8ff87df4d55908335733494cac0 Mon Sep 17 00:00:00 2001 From: hm Date: Sat, 22 Jan 2022 17:17:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9E=E6=8E=A5=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E5=88=A0=E9=99=A4=E9=81=A5=E6=8E=A7=EF=BC=8C?= =?UTF-8?q?rtk=EF=BC=8C=E7=B4=A7=E6=80=A5=E6=8C=89=E9=92=AE=E9=80=89?= =?UTF-8?q?=E5=9E=8B=EF=BC=8C=E5=8F=AA=E4=BF=9D=E7=95=99=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=93=BE=EF=BC=8C=E5=B9=B6=E4=B8=94=E9=BB=98=E8=AE=A4=E4=B8=BA?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=93=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/MenuBarUI/MenuBarUI.cpp | 9 +++++---- App/Setting/Index0/LinkUI/LinkUI.cpp | 21 ++++++++++++++++++++- App/mainwindow.cpp | 2 +- opmap/core/urlfactory.cpp | 2 +- opmap/internals/core.cpp | 5 ++++- 5 files changed, 31 insertions(+), 8 deletions(-) diff --git a/App/MenuBarUI/MenuBarUI.cpp b/App/MenuBarUI/MenuBarUI.cpp index 1d0d9c9..c0437cb 100644 --- a/App/MenuBarUI/MenuBarUI.cpp +++ b/App/MenuBarUI/MenuBarUI.cpp @@ -42,16 +42,17 @@ MenuBarUI::MenuBarUI(QWidget *parent) : setPushButtonState(state::unSelected, state::unSelected, state::unSelected, - state::Selected, state::unSelected, - state::unSelected); + state::unSelected, + state::Selected); - CurrentIndex = 3; + CurrentIndex = 5; ui->label_Status->hide(); - + ui->pushButton_SelfTest->hide(); + ui->pushButton_Flight->hide(); //setArm(true); } diff --git a/App/Setting/Index0/LinkUI/LinkUI.cpp b/App/Setting/Index0/LinkUI/LinkUI.cpp index 40c0d66..cc033e1 100644 --- a/App/Setting/Index0/LinkUI/LinkUI.cpp +++ b/App/Setting/Index0/LinkUI/LinkUI.cpp @@ -22,6 +22,7 @@ LinkUI::LinkUI(QWidget *parent) : InterfaceList.append(tr("Unicast")); //读取设备列表 + DeviceList.append(tr("DataLink")); DeviceList.append(tr("RTK")); DeviceList.append(tr("Emergecy")); @@ -75,15 +76,22 @@ void LinkUI::recover(void) - +//直接在这里发送,只有数据链,没有其他的按键 void LinkUI::on_commandClicked() { //找到消息的发送者 + /* QPushButton *btn = qobject_cast(sender()); if(btn) { DeviceString = btn->text(); } + */ + + + //设置设备,目前只有数据链 + + DeviceString = tr("DataLink"); //打开设置界面 ConnectDialog *connectdialog = new ConnectDialog(); @@ -153,6 +161,8 @@ void LinkUI::on_pushButton_SerialPort_clicked() } //根据现存的设备生成一个列表 + + /* for(QString info: DeviceList) { QPushButton *btn = new QPushButton(ui->frame_DeviceType); btn->setText(info); @@ -161,6 +171,9 @@ void LinkUI::on_pushButton_SerialPort_clicked() connect(btn,SIGNAL(clicked(bool)), this,SLOT(on_commandClicked())); } + */ + on_commandClicked(); + } else { @@ -222,6 +235,7 @@ void LinkUI::on_pushButton_UDP_clicked() } //根据现存的设备生成一个列表 + /* for(QString info: DeviceList) { QPushButton *btn = new QPushButton(ui->frame_DeviceType); @@ -235,6 +249,8 @@ void LinkUI::on_pushButton_UDP_clicked() this,SLOT(on_commandClicked())); } + */ + on_commandClicked(); } else { @@ -299,6 +315,7 @@ void LinkUI::on_pushButton_Multicast_clicked() } //根据现存的设备生成一个列表 + /* for(QString info: DeviceList) { QPushButton *btn = new QPushButton(ui->frame_DeviceType); @@ -312,6 +329,8 @@ void LinkUI::on_pushButton_Multicast_clicked() this,SLOT(on_commandClicked())); } + */ + on_commandClicked(); } else { diff --git a/App/mainwindow.cpp b/App/mainwindow.cpp index c4130e1..9cb4779 100644 --- a/App/mainwindow.cpp +++ b/App/mainwindow.cpp @@ -143,7 +143,7 @@ MainWindow::MainWindow(QWidget *parent) this->width(), this->height()); - map->SetZoom(10); + map->SetZoom(1); qDebug() << "map start"; diff --git a/opmap/core/urlfactory.cpp b/opmap/core/urlfactory.cpp index fdff2d3..69b834e 100644 --- a/opmap/core/urlfactory.cpp +++ b/opmap/core/urlfactory.cpp @@ -484,7 +484,7 @@ QString UrlFactory::MakeImageUrl(const MapType::Types &type, const Point &pos, c case MapType::BaiduSatellite: { - QString key = TileXYToQuadKey(pos.X(), pos.Y(), zoom); + QString key = TileXYToQuadKey(pos.X(),pos.Y(), zoom); return QString("https://maponline%1.bdimg.com/starpic/?qt=satepc&u=x=%2;y=%3;z=%4;v=009;type=sate&fm=46&app=webearth2&v=009&udt=20200623").arg(GetServerNum(pos, 4)).arg(pos.X()).arg(pos.Y()).arg(zoom); //https://maponline0.bdimg.com/starpic/?qt=satepc&u=x=5;y=3;z=6;v=009;type=sate&fm=46&app=webearth2&v=009&udt=20200623 diff --git a/opmap/internals/core.cpp b/opmap/internals/core.cpp index b56d84e..c57b933 100644 --- a/opmap/internals/core.cpp +++ b/opmap/internals/core.cpp @@ -112,7 +112,10 @@ void Core::run() QByteArray img; // tile number inversion(BottomLeft -> TopLeft) for pergo maps - if (tl == MapType::PergoTurkeyMap) { + if ((tl == MapType::PergoTurkeyMap) || + (tl == MapType::BaiduMap) || + (tl == MapType::BaiduSatellite)) + { img = OPMaps::Instance()->GetImageFrom(tl, Point(task.Pos.X(), maxOfTiles.Height() - task.Pos.Y()), task.Zoom); } else { // ok #ifdef DEBUG_CORE