add a gps icon if internal gps (and mavtelem)
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 781 B |
@@ -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"
|
||||
};
|
||||
|
||||
@@ -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[];
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user