Merge pull request #50 from olliw42/owpr-gpstopbaricon
Internal GPS: display GPS icon and sat number in top bar
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
|
* Main view bitmaps
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
const uint8_t LBM_TOPMENU_GPS[] = {
|
||||||
|
#include "mask_topmenu_gps_18.lbm"
|
||||||
|
};
|
||||||
|
|
||||||
const uint8_t LBM_TOPMENU_USB[] = {
|
const uint8_t LBM_TOPMENU_USB[] = {
|
||||||
#include "mask_topmenu_usb.lbm"
|
#include "mask_topmenu_usb.lbm"
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
extern const uint8_t LBM_DOT[];
|
extern const uint8_t LBM_DOT[];
|
||||||
|
|
||||||
// Main view icons
|
// Main view icons
|
||||||
|
extern const uint8_t LBM_TOPMENU_GPS[];
|
||||||
extern const uint8_t LBM_TOPMENU_USB[];
|
extern const uint8_t LBM_TOPMENU_USB[];
|
||||||
extern const uint8_t LBM_TOPMENU_ANTENNA[];
|
extern const uint8_t LBM_TOPMENU_ANTENNA[];
|
||||||
extern const uint8_t LBM_TOPMENU_VOLUME_0[];
|
extern const uint8_t LBM_TOPMENU_VOLUME_0[];
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ TopbarImpl::TopbarImpl(Window * parent) :
|
|||||||
|
|
||||||
unsigned int TopbarImpl::getZonesCount() const
|
unsigned int TopbarImpl::getZonesCount() const
|
||||||
{
|
{
|
||||||
|
#if defined(INTERNAL_GPS)
|
||||||
|
return MAX_TOPBAR_ZONES-1;
|
||||||
|
#endif
|
||||||
return MAX_TOPBAR_ZONES;
|
return MAX_TOPBAR_ZONES;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,6 +91,15 @@ void TopbarImpl::paint(BitmapBuffer * dc)
|
|||||||
getTimerString(str, getValue(MIXSRC_TX_TIME));
|
getTimerString(str, getValue(MIXSRC_TX_TIME));
|
||||||
dc->drawText(DATETIME_MIDDLE, DATETIME_LINE2, str, FONT(XS) | CENTERED | MENU_COLOR);
|
dc->drawText(DATETIME_MIDDLE, DATETIME_LINE2, str, FONT(XS) | CENTERED | MENU_COLOR);
|
||||||
|
|
||||||
|
#if 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
|
// USB icon
|
||||||
if (usbPlugged()) {
|
if (usbPlugged()) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user