diff --git a/FontCreation/bdf.tga b/FontCreation/bdf.tga index 4e7e3cf..385e56f 100644 Binary files a/FontCreation/bdf.tga and b/FontCreation/bdf.tga differ diff --git a/FontCreation/leaf_7x10.bdf b/FontCreation/leaf_7x10.bdf index 76b5048..6410d53 100644 --- a/FontCreation/leaf_7x10.bdf +++ b/FontCreation/leaf_7x10.bdf @@ -1,6 +1,6 @@ STARTFONT 2.1 -COMMENT Exported by Fony v1.3.6 -FONT +COMMENT Exported by Fony v1.4.7 +FONT leaf_7x10 SIZE 10 96 96 FONTBOUNDINGBOX 9 9 0 0 STARTPROPERTIES 6 @@ -14,8 +14,8 @@ ENDPROPERTIES CHARS 96 STARTCHAR 032 ENCODING 32 -SWIDTH 504 0 -DWIDTH 7 0 +SWIDTH 576 0 +DWIDTH 8 0 BBX 0 0 0 0 BITMAP ENDCHAR @@ -102,38 +102,61 @@ BITMAP ENDCHAR STARTCHAR 043 ENCODING 43 -SWIDTH 648 0 -DWIDTH 9 0 -BBX 0 0 0 0 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 6 6 0 2 BITMAP +30 +30 +FC +FC +30 +30 ENDCHAR STARTCHAR 044 ENCODING 44 -SWIDTH 648 0 -DWIDTH 9 0 -BBX 0 0 0 0 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 2 3 0 0 BITMAP +C0 +C0 +80 ENDCHAR STARTCHAR 045 ENCODING 45 -SWIDTH 648 0 -DWIDTH 9 0 -BBX 0 0 0 0 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 2 0 4 BITMAP +FE +FE ENDCHAR STARTCHAR 046 ENCODING 46 -SWIDTH 648 0 -DWIDTH 9 0 -BBX 0 0 0 0 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 2 2 0 0 BITMAP +C0 +C0 ENDCHAR STARTCHAR 047 ENCODING 47 -SWIDTH 648 0 -DWIDTH 9 0 -BBX 0 0 0 0 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 6 10 0 0 BITMAP +0C +0C +18 +18 +30 +30 +60 +60 +C0 +C0 ENDCHAR STARTCHAR 048 ENCODING 48 diff --git a/FontCreation/leaf_7x10.c b/FontCreation/leaf_7x10.c index e6a5ecf..316f275 100644 --- a/FontCreation/leaf_7x10.c +++ b/FontCreation/leaf_7x10.c @@ -1,29 +1,25 @@ /* - Fontname: + Fontname: leaf_7x10 Copyright: - Glyphs: 96/96 + Glyphs: 62/96 BBX Build Mode: 0 */ -const uint8_t leaf_7x10[696] U8G2_FONT_SECTION("leaf_7x10") = - "`\0\3\4\3\4\4\4\5\10\12\0\0\12\0\0\0\1'\1\376\2\233 \5\0\304\13!\5\0\304" +const uint8_t leaf_7x10[546] U8G2_FONT_SECTION("leaf_7x10") = + ">\0\3\4\3\4\4\4\5\10\12\0\0\12\0\0\0\1;\0\0\2\5 \5\0D\14!\5\0\304" "\14\42\5\0\304\14#\5\0\304\14$\5\0\304\14%\5\0\304\14&\5\0\304\14'\5\0\304\14(" - "\5\0\304\14)\14<\314\214\60\241\221\23\241\60\0*\13$\364\32\221 \241\20\21\0+\5\0\304\14" - ",\5\0\304\14-\5\0\304\14.\5\0\304\14/\5\0\304\14\60\13\326D\34\22$zB!\1\61" - "\11TE,\221%\371\0\62\14\326D\34\22$A\61\331\306\30\63\15\326D\14F\61\251\242D($" - "\0\64\13\326D,*\262\20\71\312\0\65\14\326D\14G\301\22C\301\26\0\66\16\326D\34\22$\302" - "\22$\42\24\22\0\67\14\326D\14F\61A\61A\71\1\70\20\326D\34\22$\42\21\42\22!\42\24" - "\22\0\71\16\326D\34\22$\42\224B\42\24\22\0:\17WD\314P\301\261\207\22\243Q\341 \0;" - "\14EM\274\60!\27\42\301\20\0<\11\63V\254\20\24\241\0=\5\0D\14>\12\63T\214 \21" - "\224 \0\77\14EL\234@!\22'\261\60\0@\17WD\254`\321!\223\207\262A\321@\0A\5" - "\0\304\14B\5\0\304\14C\5\0\304\14D\5\0\304\14E\15WD\214\207P\321\242\42QQ\7F" - "\5\0\304\14G\5\0\304\14H\5\0\304\14I\5\0\304\14J\5\0\304\14K\5\0\304\14L\5\0" - "\304\14M\5\0\304\14N\16WD\214\241\42\23\23\22K\325\310\4O\5\0\304\14P\5\0\304\14Q" - "\5\0\304\14R\5\0\304\14S\16WD\234\222\64R#S\262\224\22\0T\5\0\304\14U\5\0\304" - "\14V\5\0\304\14W\20WD\14\61\272\204\220\204<\204H\22\21\1X\5\0\304\14Y\5\0\304\14" - "Z\5\0\304\14[\16N\305\314@\261\241\225\242A\321\20\0\134\5\0\304\14]\16N\304\234P\301\241" - "\222\245\61\301@\0^\5\0\304\14_\5\0\304\14`\5\0\304\14a\5\0\304\14b\5\0\304\14c" - "\5\0\304\14d\5\0\304\14e\5\0\304\14f\5\0\304\14g\5\0\304\14h\5\0\304\14i\5\0" - "\304\14j\5\0\304\14k\5\0\304\14l\5\0\304\14m\5\0\304\14n\5\0\304\14o\5\0\304\14" - "p\5\0\304\14q\5\0\304\14r\5\0\304\14s\5\0\304\14t\5\0\304\14u\5\0\304\14v\5" - "\0\304\14w\5\0\304\14x\5\0\304\14y\5\0\304\14z\5\0\304\14{\5\0\304\14|\5\0\304" - "\14}\5\0\304\14~\5\0\304\14\177\5\0\304\13\0\0\0\4\377\377\0"; + "\5\0\304\14)\14<\314\214\60\241\221\23\241\60\0*\13$\364\32\221 \241\20\21\0+\13\66\324+" + "A!&A!\0,\7\32\304\211\22\0-\6\27d\14\7.\6\22\304\11\2/\17V\304Ki\202" + "b\202b\202b\202\202\0\60\13\326D\34\22$zB!\1\61\11TE,\221%\371\0\62\14\326D" + "\34\22$A\61\331\306\30\63\15\326D\14F\61\251\242D($\0\64\13\326D,*\262\20\71\312\0" + "\65\14\326D\14G\301\22C\301\26\0\66\16\326D\34\22$\302\22$\42\24\22\0\67\14\326D\14F" + "\61A\61A\71\1\70\20\326D\34\22$\42\21\42\22!\42\24\22\0\71\16\326D\34\22$\42\224B" + "\42\24\22\0:\17WD\314P\301\261\207\22\243Q\341 \0;\14EM\274\60!\27\42\301\20\0<" + "\11\63V\254\20\24\241\0=\5\0D\14>\12\63T\214 \21\224 \0\77\14EL\234@!\22'" + "\261\60\0@\17WD\254`\321!\223\207\262A\321@\0A\5\0\304\14B\5\0\304\14C\5\0\304" + "\14D\5\0\304\14E\15WD\214\207P\321\242\42QQ\7F\5\0\304\14G\5\0\304\14H\5\0" + "\304\14I\5\0\304\14J\5\0\304\14K\5\0\304\14L\5\0\304\14M\5\0\304\14N\16WD\214" + "\241\42\23\23\22K\325\310\4O\5\0\304\14P\5\0\304\14Q\5\0\304\14R\5\0\304\14S\16W" + "D\234\222\64R#S\262\224\22\0T\5\0\304\14U\5\0\304\14V\5\0\304\14W\20WD\14\61" + "\272\204\220\204<\204H\22\21\1X\5\0\304\14Y\5\0\304\14Z\5\0\304\14[\16N\305\314@\261" + "\241\225\242A\321\20\0\134\5\0\304\14]\16N\304\234P\301\241\222\245\61\301@\0\0\0\0\4\377\377" + "\0"; diff --git a/FontCreation/leaf_7x10_heading.fon b/FontCreation/leaf_7x10_heading.fon index ecce82d..e97b696 100644 Binary files a/FontCreation/leaf_7x10_heading.fon and b/FontCreation/leaf_7x10_heading.fon differ diff --git a/src/vario/displayFields.cpp b/src/vario/displayFields.cpp index 3bc607d..df8f435 100644 --- a/src/vario/displayFields.cpp +++ b/src/vario/displayFields.cpp @@ -181,7 +181,9 @@ void display_distance(uint8_t cursor_x, uint8_t cursor_y, double distance) { void display_heading(uint8_t cursor_x, uint8_t cursor_y, bool degSymbol) { u8g2.setCursor(cursor_x, cursor_y); - if (UNITS_heading) { // Cardinal heading direction + if (!gpsFixInfo.fix) { // blank out heading if no gps fix + u8g2.print("---"); + } else if (UNITS_heading) { // Cardinal heading direction const char* displayHeadingCardinal = gps.cardinal(gps.course.deg()); // gps_getCourseCardinal(); if (strlen(displayHeadingCardinal) == 1) @@ -982,33 +984,39 @@ void display_menuTitle(String title) { void display_headerAndFooter(bool timerSelected, bool showTurnArrows) { // Header-------------------------------- // clock time - u8g2.setFont(leaf_6x10); - display_clockTime(0, 10, false); + u8g2.setFont(leaf_6x10); + display_clockTime(0, 10, false); + // Track/Heading top center - uint8_t heading_y = 10; - uint8_t heading_x = 37; - u8g2.setFont(leaf_7x10); - if (showTurnArrows) { - display_headingTurn(heading_x, heading_y); - } else { - display_heading(heading_x + 8, heading_y, true); - } + uint8_t heading_y = 10; + uint8_t heading_x = 37; + u8g2.setFont(leaf_7x10); + if (showTurnArrows) { + display_headingTurn(heading_x, heading_y); + } else { + display_heading(heading_x + 8, heading_y, true); + } + // If don't have a fix, show GPS searching icon; otherwise show speed + if (!gpsFixInfo.fix) { + display_GPS_icon(84, 12); + } else { // Speed in upper right corner - u8g2.setFont(leaf_8x14); - display_speed(78, 14); - u8g2.setFont(leaf_5h); - u8g2.setCursor(82, 21); - if (display_getPage() == page_nav) { - u8g2.setDrawColor(0); // draw white on black for nav page - } - if (UNITS_speed) - u8g2.print("MPH"); - else - u8g2.print("KPH"); + u8g2.setFont(leaf_8x14); + display_speed(78, 14); + u8g2.setFont(leaf_5h); + u8g2.setCursor(82, 21); + if (display_getPage() == page_nav) { + u8g2.setDrawColor(0); // draw white on black for nav page + } + if (UNITS_speed) + u8g2.print("MPH"); + else + u8g2.print("KPH"); - u8g2.setDrawColor(1); + u8g2.setDrawColor(1); + } // FOOTER_________________________ // battery @@ -1021,9 +1029,6 @@ void display_headerAndFooter(bool timerSelected, bool showTurnArrows) { u8g2.setFont(leaf_icons); u8g2.print((char)SDicon); - // GPS status icon - display_GPS_icon(23, 192); - // Vario Beep Volume icon u8g2.setCursor(37, 191); u8g2.setFont(leaf_icons); diff --git a/src/vario/fonts.h b/src/vario/fonts.h index 4345bbe..a5e3379 100644 --- a/src/vario/fonts.h +++ b/src/vario/fonts.h @@ -193,29 +193,25 @@ const uint8_t leaf_6x12[1593] U8G2_FONT_SECTION("leaf_6x12") = "c\346\60\22\234\305\206\221\340\34\20\216\3\206\221\340\0\0\0\0\4\377\377\0"; // 7+1 wide, 10px tall, numerals and exclusively for heading field -const uint8_t leaf_7x10[696] U8G2_FONT_SECTION("leaf_7x10") = - "`\0\3\4\3\4\4\4\5\10\12\0\0\12\0\0\0\1'\1\376\2\233 \5\0\304\13!\5\0\304" - "\14\42\5\0\304\14#\5\0\304\14$\5\0\304\14%\5\0\304\14&\5\0\304\14'\5\0\304\14(" - "\5\0\304\14)\14<\314\214\60\241\221\23\241\60\0*\13$\364\32\221 \241\20\21\0+\5\0\304\14" - ",\5\0\304\14-\5\0\304\14.\5\0\304\14/\5\0\304\14\60\13\326D\34\22$zB!\1\61" - "\11TE,\221%\371\0\62\14\326D\34\22$A\61\331\306\30\63\15\326D\14F\61\251\242D($" - "\0\64\13\326D,*\262\20\71\312\0\65\14\326D\14G\301\22C\301\26\0\66\16\326D\34\22$\302" - "\22$\42\24\22\0\67\14\326D\14F\61A\61A\71\1\70\20\326D\34\22$\42\21\42\22!\42\24" - "\22\0\71\16\326D\34\22$\42\224B\42\24\22\0:\17WD\314P\301\261\207\22\243Q\341 \0;" - "\14EM\274\60!\27\42\301\20\0<\11\63V\254\20\24\241\0=\5\0D\14>\12\63T\214 \21" - "\224 \0\77\14EL\234@!\22'\261\60\0@\17WD\254`\321!\223\207\262A\321@\0A\5" - "\0\304\14B\5\0\304\14C\5\0\304\14D\5\0\304\14E\15WD\214\207P\321\242\42QQ\7F" - "\5\0\304\14G\5\0\304\14H\5\0\304\14I\5\0\304\14J\5\0\304\14K\5\0\304\14L\5\0" - "\304\14M\5\0\304\14N\16WD\214\241\42\23\23\22K\325\310\4O\5\0\304\14P\5\0\304\14Q" - "\5\0\304\14R\5\0\304\14S\16WD\234\222\64R#S\262\224\22\0T\5\0\304\14U\5\0\304" - "\14V\5\0\304\14W\20WD\14\61\272\204\220\204<\204H\22\21\1X\5\0\304\14Y\5\0\304\14" - "Z\5\0\304\14[\16N\305\314@\261\241\225\242A\321\20\0\134\5\0\304\14]\16N\304\234P\301\241" - "\222\245\61\301@\0^\5\0\304\14_\5\0\304\14`\5\0\304\14a\5\0\304\14b\5\0\304\14c" - "\5\0\304\14d\5\0\304\14e\5\0\304\14f\5\0\304\14g\5\0\304\14h\5\0\304\14i\5\0" - "\304\14j\5\0\304\14k\5\0\304\14l\5\0\304\14m\5\0\304\14n\5\0\304\14o\5\0\304\14" - "p\5\0\304\14q\5\0\304\14r\5\0\304\14s\5\0\304\14t\5\0\304\14u\5\0\304\14v\5" - "\0\304\14w\5\0\304\14x\5\0\304\14y\5\0\304\14z\5\0\304\14{\5\0\304\14|\5\0\304" - "\14}\5\0\304\14~\5\0\304\14\177\5\0\304\13\0\0\0\4\377\377\0"; +const uint8_t leaf_7x10[546] U8G2_FONT_SECTION("leaf_7x10") = + ">\0\3\4\3\4\4\4\5\10\12\0\0\12\0\0\0\1;\0\0\2\5 \5\0D\14!\5\0\304" + "\14\42\5\0\304\14#\5\0\304\14$\5\0\304\14%\5\0\304\14&\5\0\304\14'\5\0\304\14(" + "\5\0\304\14)\14<\314\214\60\241\221\23\241\60\0*\13$\364\32\221 \241\20\21\0+\13\66\324+" + "A!&A!\0,\7\32\304\211\22\0-\6\27d\14\7.\6\22\304\11\2/\17V\304Ki\202" + "b\202b\202b\202\202\0\60\13\326D\34\22$zB!\1\61\11TE,\221%\371\0\62\14\326D" + "\34\22$A\61\331\306\30\63\15\326D\14F\61\251\242D($\0\64\13\326D,*\262\20\71\312\0" + "\65\14\326D\14G\301\22C\301\26\0\66\16\326D\34\22$\302\22$\42\24\22\0\67\14\326D\14F" + "\61A\61A\71\1\70\20\326D\34\22$\42\21\42\22!\42\24\22\0\71\16\326D\34\22$\42\224B" + "\42\24\22\0:\17WD\314P\301\261\207\22\243Q\341 \0;\14EM\274\60!\27\42\301\20\0<" + "\11\63V\254\20\24\241\0=\5\0D\14>\12\63T\214 \21\224 \0\77\14EL\234@!\22'" + "\261\60\0@\17WD\254`\321!\223\207\262A\321@\0A\5\0\304\14B\5\0\304\14C\5\0\304" + "\14D\5\0\304\14E\15WD\214\207P\321\242\42QQ\7F\5\0\304\14G\5\0\304\14H\5\0" + "\304\14I\5\0\304\14J\5\0\304\14K\5\0\304\14L\5\0\304\14M\5\0\304\14N\16WD\214" + "\241\42\23\23\22K\325\310\4O\5\0\304\14P\5\0\304\14Q\5\0\304\14R\5\0\304\14S\16W" + "D\234\222\64R#S\262\224\22\0T\5\0\304\14U\5\0\304\14V\5\0\304\14W\20WD\14\61" + "\272\204\220\204<\204H\22\21\1X\5\0\304\14Y\5\0\304\14Z\5\0\304\14[\16N\305\314@\261" + "\241\225\242A\321\20\0\134\5\0\304\14]\16N\304\234P\301\241\222\245\61\301@\0\0\0\0\4\377\377" + "\0"; const uint8_t leaf_6x10[661] U8G2_FONT_SECTION("leaf_6x10") = "`\0\3\3\3\4\2\3\5\7\12\0\0\12\0\0\0\1\3\1\306\2x \5\0y\1!\5\0\231"