diff --git a/radio/src/bitmaps/480x272/mask_topmenu_gps_18.png b/radio/src/bitmaps/480x272/mask_topmenu_gps_18.png new file mode 100644 index 000000000..8e3ee9cfb Binary files /dev/null and b/radio/src/bitmaps/480x272/mask_topmenu_gps_18.png differ diff --git a/radio/src/gui/colorlcd/bitmaps.cpp b/radio/src/gui/colorlcd/bitmaps.cpp index a66602f93..c079a4225 100644 --- a/radio/src/gui/colorlcd/bitmaps.cpp +++ b/radio/src/gui/colorlcd/bitmaps.cpp @@ -32,6 +32,10 @@ const uint8_t LBM_DOT[] = { * Main view bitmaps */ +const uint8_t LBM_TOPMENU_GPS[] = { +#include "mask_topmenu_gps_18.lbm" +}; + const uint8_t LBM_TOPMENU_USB[] = { #include "mask_topmenu_usb.lbm" }; diff --git a/radio/src/gui/colorlcd/bitmaps.h b/radio/src/gui/colorlcd/bitmaps.h index 7c163867c..3c6512153 100644 --- a/radio/src/gui/colorlcd/bitmaps.h +++ b/radio/src/gui/colorlcd/bitmaps.h @@ -25,6 +25,7 @@ extern const uint8_t LBM_DOT[]; // Main view icons +extern const uint8_t LBM_TOPMENU_GPS[]; extern const uint8_t LBM_TOPMENU_USB[]; extern const uint8_t LBM_TOPMENU_ANTENNA[]; extern const uint8_t LBM_TOPMENU_VOLUME_0[]; diff --git a/radio/src/gui/colorlcd/layouts/topbar_impl.cpp b/radio/src/gui/colorlcd/layouts/topbar_impl.cpp index 70cbd56dc..4e12fe4ba 100644 --- a/radio/src/gui/colorlcd/layouts/topbar_impl.cpp +++ b/radio/src/gui/colorlcd/layouts/topbar_impl.cpp @@ -32,6 +32,9 @@ TopbarImpl::TopbarImpl(Window * parent) : unsigned int TopbarImpl::getZonesCount() const { +#if defined(TELEMETRY_MAVLINK) && defined(INTERNAL_GPS) + return MAX_TOPBAR_ZONES-1; +#endif return MAX_TOPBAR_ZONES; } @@ -88,6 +91,15 @@ void TopbarImpl::paint(BitmapBuffer * dc) getTimerString(str, getValue(MIXSRC_TX_TIME)); dc->drawText(DATETIME_MIDDLE, DATETIME_LINE2, str, FONT(XS) | CENTERED | MENU_COLOR); +#if defined(TELEMETRY_MAVLINK) && defined(INTERNAL_GPS) + if (gpsData.fix) { + char s[10]; + sprintf(s, "%d", gpsData.numSat); + dc->drawText(LCD_W-148, 4, s, FONT(XS) | CENTERED | MENU_COLOR); + } + dc->drawBitmapPattern(LCD_W-158, 22, LBM_TOPMENU_GPS, (gpsData.fix) ? MENU_COLOR : MENU_TITLE_DISABLE_COLOR); +#endif + // USB icon if (usbPlugged()) { dc->drawBitmapPattern(LCD_W - 98, 8, LBM_TOPMENU_USB, MENU_COLOR);