Skip to content

Commit 1563033

Browse files
f5sohfilnet
authored andcommitted
Merged in f5soh/librepilot/LP-572_OPMap_WP_setup (pull request #487)
LP-572 Waypoint setup more usable Approved-by: Lalanne Laurent <f5soh@free.fr>
2 parents ed36165 + 8e014c3 commit 1563033

53 files changed

Lines changed: 3702 additions & 416 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ground/gcs/src/libs/opmapcontrol/src/core/providerstrings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ ProviderStrings::ProviderStrings()
4141
{
4242
// Google version strings
4343
VersionGoogleMap = "m@301";
44-
QString version = "713";
44+
QString version = "794";
4545
QString envVersion = qgetenv("GCS_GOOGLE_SAT_VERSION").constData();
4646
VersionGoogleSatellite = (envVersion.toInt() > version.toInt()) ? envVersion : version;
4747
VersionGoogleLabels = "h@301";

ground/gcs/src/libs/opmapcontrol/src/core/urlfactory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ QString UrlFactory::MakeImageUrl(const MapType::Types &type, const Point &pos, c
214214
break;
215215
case MapType::GoogleSatellite:
216216
{
217-
QString server = "khm";
217+
QString server = "khms";
218218
QString request = "kh";
219219
QString sec1 = ""; // after &x=...
220220
QString sec2 = ""; // after &zoom=...

ground/gcs/src/libs/opmapcontrol/src/mapwidget/homeitem.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ QRectF HomeItem::boundingRect() const
7373
if (pic.width() > localsafearea * 2 && !toggleRefresh) {
7474
return QRectF(-pic.width() / 2, -pic.height() / 2, pic.width(), pic.height());
7575
} else {
76-
return QRectF(-localsafearea, -localsafearea, localsafearea * 2, localsafearea * 2);
76+
// FIXME: LP-573 For some reason when boundingRect is defined normally,
77+
// return QRectF(-localsafearea, -localsafearea, localsafearea * 2, localsafearea * 2);
78+
// the previous safearea circle and Home (both at previous/smaller size) still drawed
79+
// into the corner of boudingRect area when zoom in.
80+
// Current workaround is done expanding x100 the boundingRect returned.
81+
return QRectF(-localsafearea * 100, -localsafearea * 100, localsafearea * 200, localsafearea * 200);
7782
}
7883
}
7984

@@ -98,6 +103,12 @@ void HomeItem::RefreshPos()
98103
toggleRefresh = false;
99104
}
100105

106+
void HomeItem::SetHomePic(QString HomePic)
107+
{
108+
pic.load(":/markers/images/" + HomePic);
109+
pic = pic.scaled(30, 30, Qt::IgnoreAspectRatio);
110+
}
111+
101112
void HomeItem::setOpacitySlot(qreal opacity)
102113
{
103114
setOpacity(opacity);

ground/gcs/src/libs/opmapcontrol/src/mapwidget/homeitem.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ class HomeItem : public QObject, public QGraphicsItem {
102102
QPainterPath shape() const;
103103
public slots:
104104
void RefreshPos();
105+
void SetHomePic(QString HomePic);
105106
void setOpacitySlot(qreal opacity);
106107
signals:
107108
void homePositionChanged(internals::PointLatLng coord, float);
-19 Bytes
Loading
-9.73 KB
Loading
Lines changed: 80 additions & 0 deletions
Loading
Lines changed: 93 additions & 0 deletions
Loading
-858 Bytes
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)