kopia lustrzana https://github.com/dl9rdz/rdz_ttgo_sonde
Compatible with newer version of APX library (consistent with platformio, make sure to upgrade your ArduinoIDE), and font enhancements for new ILI9225 libraray
rodzic
3e094f0478
commit
c41808ec18
|
@ -20,9 +20,9 @@ before_install:
|
|||
- rm master.zip
|
||||
- sudo mv AsyncTCP-master /usr/local/share/arduino/libraries/AsyncTCP
|
||||
- wget https://github.com/me-no-dev/arduino-esp32fs-plugin/releases/download/1.0/ESP32FS-1.0.zip
|
||||
- wget https://github.com/lewisxhe/AXP202X_Library/archive/v1.0.zip
|
||||
- unzip v1.0.zip
|
||||
- sudo mv AXP202X_Library-1.0 /usr/local/share/arduino/libraries/
|
||||
- wget https://github.com/lewisxhe/AXP202X_Library/archive/refs/tags/V1.1.3.zip
|
||||
- unzip V1.1.3.zip
|
||||
- sudo mv AXP202X_Library-1.1.3 /usr/local/share/arduino/libraries/
|
||||
|
||||
- wget https://github.com/dx168b/async-mqtt-client/archive/master.zip
|
||||
- unzip master.zip
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const char *version_name = "rdzTTGOsonde";
|
||||
const char *version_id = "devel20210524";
|
||||
const char *version_id = "devel20210524a";
|
||||
const int SPIFFS_MAJOR=2;
|
||||
const int SPIFFS_MINOR=11;
|
||||
|
|
|
@ -9,7 +9,7 @@ my $fontname = "Terminal11x16";
|
|||
## so we have to set yadvance = (baseline * 3 / 2).
|
||||
## baseofs is baseline offset from bottom, i.e. baseline = height - baseofs
|
||||
## so lets try... (for Terminal11x16, baseline is 14 pixel from top, height is 16)
|
||||
my $baseofs = 2;
|
||||
my $baseofs = 4;
|
||||
|
||||
my @data;
|
||||
# read font bitmap
|
||||
|
@ -112,4 +112,4 @@ print("};\n");
|
|||
printf("const GFXfont %sFont = {\n", $fontname);
|
||||
printf(" (uint8_t *)%sBitmap,\n", $fontname);
|
||||
printf(" (GFXglyph *)%sGlyphs,\n", $fontname);
|
||||
printf(" 0x%02X, 0x%02X, %d };\n", $first, $first+$count-1, ($height-$baseofs)*3/2+1);
|
||||
printf(" 0x%02X, 0x%02X, %d };\n", $first, $first+$count-1, ($height-$baseofs)*3/2);
|
||||
|
|
|
@ -361,6 +361,7 @@ void ILI9225Display::begin() {
|
|||
Serial.println("ILI9225 init (alt driver): done");
|
||||
tft->begin();
|
||||
tft->setRotation(sonde.config.tft_orient);
|
||||
tft->setTextWrap(false);
|
||||
#else
|
||||
tft = new MY_ILI9225(sonde.config.oled_rst, sonde.config.tft_rs, sonde.config.tft_cs,
|
||||
sonde.config.oled_sda, sonde.config.oled_scl, TFT_LED, TFT_BRIGHTNESS);
|
||||
|
@ -1608,7 +1609,7 @@ void Display::drawBatt(DispEntry *de) {
|
|||
snprintf(buf, 30, "%.2f%s", val, de->extra+1);
|
||||
break;
|
||||
case 'T':
|
||||
val = axp.getTemp()-144.7; // WTF... library returns temperatur in K above -144.7°C!??
|
||||
val = axp.getTemp(); // fixed in newer versions of libraray: -144.7 no longer needed here!
|
||||
snprintf(buf, 30, "%.2f%s", val, de->extra+1);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -118,104 +118,104 @@ const uint8_t Terminal11x16Bitmap[] = {
|
|||
};
|
||||
|
||||
const GFXglyph Terminal11x16Glyphs[] = {
|
||||
{ 0, 6, 0, 7, 0, 2 }, // 0x20 ' '
|
||||
{ 0, 7, 14, 8, 0, -14 }, // 0x21 '!'
|
||||
{ 13, 8, 4, 9, 0, -12 }, // 0x22 '"'
|
||||
{ 17, 11, 12, 12, 0, -13 }, // 0x23 '#'
|
||||
{ 34, 9, 14, 10, 0, -14 }, // 0x24 '$'
|
||||
{ 50, 11, 12, 12, 0, -12 }, // 0x25 '%'
|
||||
{ 67, 10, 13, 11, 0, -13 }, // 0x26 '&'
|
||||
{ 84, 6, 6, 7, 0, -14 }, // 0x27 '''
|
||||
{ 89, 8, 14, 9, 0, -14 }, // 0x28 '('
|
||||
{ 103, 8, 14, 9, 0, -14 }, // 0x29 ')'
|
||||
{ 117, 9, 9, 10, 0, -11 }, // 0x2a '*'
|
||||
{ 128, 9, 8, 10, 0, -10 }, // 0x2b '+'
|
||||
{ 137, 6, 5, 7, 0, -3 }, // 0x2c ','
|
||||
{ 141, 9, 2, 10, 0, -7 }, // 0x2d '-'
|
||||
{ 144, 6, 3, 7, 0, -3 }, // 0x2e '.'
|
||||
{ 147, 11, 12, 12, 0, -13 }, // 0x2f '/'
|
||||
{ 164, 11, 14, 12, 0, -14 }, // 0x30 '0'
|
||||
{ 184, 10, 14, 11, 0, -14 }, // 0x31 '1'
|
||||
{ 202, 11, 14, 12, 0, -14 }, // 0x32 '2'
|
||||
{ 222, 11, 14, 12, 0, -14 }, // 0x33 '3'
|
||||
{ 242, 11, 14, 12, 0, -14 }, // 0x34 '4'
|
||||
{ 262, 11, 14, 12, 0, -14 }, // 0x35 '5'
|
||||
{ 282, 11, 14, 12, 0, -14 }, // 0x36 '6'
|
||||
{ 302, 11, 14, 12, 0, -14 }, // 0x37 '7'
|
||||
{ 322, 11, 14, 12, 0, -14 }, // 0x38 '8'
|
||||
{ 342, 11, 14, 12, 0, -14 }, // 0x39 '9'
|
||||
{ 362, 6, 9, 7, 0, -10 }, // 0x3a ':'
|
||||
{ 369, 6, 12, 7, 0, -10 }, // 0x3b ';'
|
||||
{ 378, 9, 14, 10, 0, -14 }, // 0x3c '<'
|
||||
{ 394, 10, 6, 11, 0, -9 }, // 0x3d '='
|
||||
{ 402, 9, 14, 10, 0, -14 }, // 0x3e '>'
|
||||
{ 418, 10, 14, 11, 0, -14 }, // 0x3f '?'
|
||||
{ 436, 11, 14, 12, 0, -14 }, // 0x40 '@'
|
||||
{ 456, 10, 14, 11, 0, -14 }, // 0x41 'A'
|
||||
{ 474, 10, 14, 11, 0, -14 }, // 0x42 'B'
|
||||
{ 492, 10, 14, 11, 0, -14 }, // 0x43 'C'
|
||||
{ 510, 10, 14, 11, 0, -14 }, // 0x44 'D'
|
||||
{ 528, 10, 14, 11, 0, -14 }, // 0x45 'E'
|
||||
{ 546, 10, 14, 11, 0, -14 }, // 0x46 'F'
|
||||
{ 564, 10, 14, 11, 0, -14 }, // 0x47 'G'
|
||||
{ 582, 10, 14, 11, 0, -14 }, // 0x48 'H'
|
||||
{ 600, 8, 14, 9, 0, -14 }, // 0x49 'I'
|
||||
{ 614, 10, 14, 11, 0, -14 }, // 0x4a 'J'
|
||||
{ 632, 10, 14, 11, 0, -14 }, // 0x4b 'K'
|
||||
{ 650, 10, 14, 11, 0, -14 }, // 0x4c 'L'
|
||||
{ 668, 10, 14, 11, 0, -14 }, // 0x4d 'M'
|
||||
{ 686, 10, 14, 11, 0, -14 }, // 0x4e 'N'
|
||||
{ 704, 10, 14, 11, 0, -14 }, // 0x4f 'O'
|
||||
{ 722, 10, 14, 11, 0, -14 }, // 0x50 'P'
|
||||
{ 740, 10, 14, 11, 0, -14 }, // 0x51 'Q'
|
||||
{ 758, 10, 14, 11, 0, -14 }, // 0x52 'R'
|
||||
{ 776, 10, 14, 11, 0, -14 }, // 0x53 'S'
|
||||
{ 794, 9, 14, 10, 0, -14 }, // 0x54 'T'
|
||||
{ 810, 10, 14, 11, 0, -14 }, // 0x55 'U'
|
||||
{ 828, 10, 14, 11, 0, -14 }, // 0x56 'V'
|
||||
{ 846, 10, 14, 11, 0, -14 }, // 0x57 'W'
|
||||
{ 864, 10, 14, 11, 0, -14 }, // 0x58 'X'
|
||||
{ 882, 10, 14, 11, 0, -14 }, // 0x59 'Y'
|
||||
{ 900, 10, 14, 11, 0, -14 }, // 0x5a 'Z'
|
||||
{ 918, 8, 14, 9, 0, -14 }, // 0x5b '['
|
||||
{ 932, 11, 12, 12, 0, -13 }, // 0x5c '\'
|
||||
{ 949, 8, 14, 9, 0, -14 }, // 0x5d ']'
|
||||
{ 963, 11, 7, 12, 0, -14 }, // 0x5e '^'
|
||||
{ 973, 11, 2, 12, 0, 0 }, // 0x5f '_'
|
||||
{ 976, 7, 6, 8, 0, -13 }, // 0x60 '`'
|
||||
{ 982, 10, 9, 11, 0, -9 }, // 0x61 'a'
|
||||
{ 994, 10, 14, 11, 0, -14 }, // 0x62 'b'
|
||||
{ 1012, 10, 9, 11, 0, -9 }, // 0x63 'c'
|
||||
{ 1024, 10, 14, 11, 0, -14 }, // 0x64 'd'
|
||||
{ 1042, 10, 9, 11, 0, -9 }, // 0x65 'e'
|
||||
{ 1054, 8, 14, 9, 0, -14 }, // 0x66 'f'
|
||||
{ 1068, 10, 11, 11, 0, -9 }, // 0x67 'g'
|
||||
{ 1082, 9, 14, 10, 0, -14 }, // 0x68 'h'
|
||||
{ 1098, 8, 12, 9, 0, -12 }, // 0x69 'i'
|
||||
{ 1110, 8, 14, 9, 0, -12 }, // 0x6a 'j'
|
||||
{ 1124, 9, 14, 10, 0, -14 }, // 0x6b 'k'
|
||||
{ 1140, 8, 14, 9, 0, -14 }, // 0x6c 'l'
|
||||
{ 1154, 10, 9, 11, 0, -9 }, // 0x6d 'm'
|
||||
{ 1166, 10, 9, 11, 0, -9 }, // 0x6e 'n'
|
||||
{ 1178, 10, 9, 11, 0, -9 }, // 0x6f 'o'
|
||||
{ 1190, 10, 11, 11, 0, -9 }, // 0x70 'p'
|
||||
{ 1204, 10, 11, 11, 0, -9 }, // 0x71 'q'
|
||||
{ 1218, 10, 9, 11, 0, -9 }, // 0x72 'r'
|
||||
{ 1230, 8, 9, 9, 0, -9 }, // 0x73 's'
|
||||
{ 1239, 8, 13, 9, 0, -13 }, // 0x74 't'
|
||||
{ 1252, 10, 9, 11, 0, -9 }, // 0x75 'u'
|
||||
{ 1264, 10, 9, 11, 0, -9 }, // 0x76 'v'
|
||||
{ 1276, 10, 9, 11, 0, -9 }, // 0x77 'w'
|
||||
{ 1288, 9, 9, 10, 0, -9 }, // 0x78 'x'
|
||||
{ 1299, 9, 11, 10, 0, -9 }, // 0x79 'y'
|
||||
{ 1312, 9, 9, 10, 0, -9 }, // 0x7a 'z'
|
||||
{ 1323, 9, 15, 10, 0, -14 }, // 0x7b '{'
|
||||
{ 1340, 6, 14, 7, 0, -14 }, // 0x7c '|'
|
||||
{ 1351, 9, 15, 10, 0, -14 }, // 0x7d '}'
|
||||
{ 1368, 10, 3, 11, 0, -12 }, // 0x7e '~'
|
||||
{ 1372, 10, 8, 11, 0, -10 }, // 0x7f ''
|
||||
{ 0, 6, 0, 7, 0, 4 }, // 0x20 ' '
|
||||
{ 0, 7, 14, 8, 0, -12 }, // 0x21 '!'
|
||||
{ 13, 8, 4, 9, 0, -10 }, // 0x22 '"'
|
||||
{ 17, 11, 12, 12, 0, -11 }, // 0x23 '#'
|
||||
{ 34, 9, 14, 10, 0, -12 }, // 0x24 '$'
|
||||
{ 50, 11, 12, 12, 0, -10 }, // 0x25 '%'
|
||||
{ 67, 10, 13, 11, 0, -11 }, // 0x26 '&'
|
||||
{ 84, 6, 6, 7, 0, -12 }, // 0x27 '''
|
||||
{ 89, 8, 14, 9, 0, -12 }, // 0x28 '('
|
||||
{ 103, 8, 14, 9, 0, -12 }, // 0x29 ')'
|
||||
{ 117, 9, 9, 10, 0, -9 }, // 0x2a '*'
|
||||
{ 128, 9, 8, 10, 0, -8 }, // 0x2b '+'
|
||||
{ 137, 6, 5, 7, 0, -1 }, // 0x2c ','
|
||||
{ 141, 9, 2, 10, 0, -5 }, // 0x2d '-'
|
||||
{ 144, 6, 3, 7, 0, -1 }, // 0x2e '.'
|
||||
{ 147, 11, 12, 12, 0, -11 }, // 0x2f '/'
|
||||
{ 164, 11, 14, 12, 0, -12 }, // 0x30 '0'
|
||||
{ 184, 10, 14, 11, 0, -12 }, // 0x31 '1'
|
||||
{ 202, 11, 14, 12, 0, -12 }, // 0x32 '2'
|
||||
{ 222, 11, 14, 12, 0, -12 }, // 0x33 '3'
|
||||
{ 242, 11, 14, 12, 0, -12 }, // 0x34 '4'
|
||||
{ 262, 11, 14, 12, 0, -12 }, // 0x35 '5'
|
||||
{ 282, 11, 14, 12, 0, -12 }, // 0x36 '6'
|
||||
{ 302, 11, 14, 12, 0, -12 }, // 0x37 '7'
|
||||
{ 322, 11, 14, 12, 0, -12 }, // 0x38 '8'
|
||||
{ 342, 11, 14, 12, 0, -12 }, // 0x39 '9'
|
||||
{ 362, 6, 9, 7, 0, -8 }, // 0x3a ':'
|
||||
{ 369, 6, 12, 7, 0, -8 }, // 0x3b ';'
|
||||
{ 378, 9, 14, 10, 0, -12 }, // 0x3c '<'
|
||||
{ 394, 10, 6, 11, 0, -7 }, // 0x3d '='
|
||||
{ 402, 9, 14, 10, 0, -12 }, // 0x3e '>'
|
||||
{ 418, 10, 14, 11, 0, -12 }, // 0x3f '?'
|
||||
{ 436, 11, 14, 12, 0, -12 }, // 0x40 '@'
|
||||
{ 456, 10, 14, 11, 0, -12 }, // 0x41 'A'
|
||||
{ 474, 10, 14, 11, 0, -12 }, // 0x42 'B'
|
||||
{ 492, 10, 14, 11, 0, -12 }, // 0x43 'C'
|
||||
{ 510, 10, 14, 11, 0, -12 }, // 0x44 'D'
|
||||
{ 528, 10, 14, 11, 0, -12 }, // 0x45 'E'
|
||||
{ 546, 10, 14, 11, 0, -12 }, // 0x46 'F'
|
||||
{ 564, 10, 14, 11, 0, -12 }, // 0x47 'G'
|
||||
{ 582, 10, 14, 11, 0, -12 }, // 0x48 'H'
|
||||
{ 600, 8, 14, 9, 0, -12 }, // 0x49 'I'
|
||||
{ 614, 10, 14, 11, 0, -12 }, // 0x4a 'J'
|
||||
{ 632, 10, 14, 11, 0, -12 }, // 0x4b 'K'
|
||||
{ 650, 10, 14, 11, 0, -12 }, // 0x4c 'L'
|
||||
{ 668, 10, 14, 11, 0, -12 }, // 0x4d 'M'
|
||||
{ 686, 10, 14, 11, 0, -12 }, // 0x4e 'N'
|
||||
{ 704, 10, 14, 11, 0, -12 }, // 0x4f 'O'
|
||||
{ 722, 10, 14, 11, 0, -12 }, // 0x50 'P'
|
||||
{ 740, 10, 14, 11, 0, -12 }, // 0x51 'Q'
|
||||
{ 758, 10, 14, 11, 0, -12 }, // 0x52 'R'
|
||||
{ 776, 10, 14, 11, 0, -12 }, // 0x53 'S'
|
||||
{ 794, 9, 14, 10, 0, -12 }, // 0x54 'T'
|
||||
{ 810, 10, 14, 11, 0, -12 }, // 0x55 'U'
|
||||
{ 828, 10, 14, 11, 0, -12 }, // 0x56 'V'
|
||||
{ 846, 10, 14, 11, 0, -12 }, // 0x57 'W'
|
||||
{ 864, 10, 14, 11, 0, -12 }, // 0x58 'X'
|
||||
{ 882, 10, 14, 11, 0, -12 }, // 0x59 'Y'
|
||||
{ 900, 10, 14, 11, 0, -12 }, // 0x5a 'Z'
|
||||
{ 918, 8, 14, 9, 0, -12 }, // 0x5b '['
|
||||
{ 932, 11, 12, 12, 0, -11 }, // 0x5c '\'
|
||||
{ 949, 8, 14, 9, 0, -12 }, // 0x5d ']'
|
||||
{ 963, 11, 7, 12, 0, -12 }, // 0x5e '^'
|
||||
{ 973, 11, 2, 12, 0, 2 }, // 0x5f '_'
|
||||
{ 976, 7, 6, 8, 0, -11 }, // 0x60 '`'
|
||||
{ 982, 10, 9, 11, 0, -7 }, // 0x61 'a'
|
||||
{ 994, 10, 14, 11, 0, -12 }, // 0x62 'b'
|
||||
{ 1012, 10, 9, 11, 0, -7 }, // 0x63 'c'
|
||||
{ 1024, 10, 14, 11, 0, -12 }, // 0x64 'd'
|
||||
{ 1042, 10, 9, 11, 0, -7 }, // 0x65 'e'
|
||||
{ 1054, 8, 14, 9, 0, -12 }, // 0x66 'f'
|
||||
{ 1068, 10, 11, 11, 0, -7 }, // 0x67 'g'
|
||||
{ 1082, 9, 14, 10, 0, -12 }, // 0x68 'h'
|
||||
{ 1098, 8, 12, 9, 0, -10 }, // 0x69 'i'
|
||||
{ 1110, 8, 14, 9, 0, -10 }, // 0x6a 'j'
|
||||
{ 1124, 9, 14, 10, 0, -12 }, // 0x6b 'k'
|
||||
{ 1140, 8, 14, 9, 0, -12 }, // 0x6c 'l'
|
||||
{ 1154, 10, 9, 11, 0, -7 }, // 0x6d 'm'
|
||||
{ 1166, 10, 9, 11, 0, -7 }, // 0x6e 'n'
|
||||
{ 1178, 10, 9, 11, 0, -7 }, // 0x6f 'o'
|
||||
{ 1190, 10, 11, 11, 0, -7 }, // 0x70 'p'
|
||||
{ 1204, 10, 11, 11, 0, -7 }, // 0x71 'q'
|
||||
{ 1218, 10, 9, 11, 0, -7 }, // 0x72 'r'
|
||||
{ 1230, 8, 9, 9, 0, -7 }, // 0x73 's'
|
||||
{ 1239, 8, 13, 9, 0, -11 }, // 0x74 't'
|
||||
{ 1252, 10, 9, 11, 0, -7 }, // 0x75 'u'
|
||||
{ 1264, 10, 9, 11, 0, -7 }, // 0x76 'v'
|
||||
{ 1276, 10, 9, 11, 0, -7 }, // 0x77 'w'
|
||||
{ 1288, 9, 9, 10, 0, -7 }, // 0x78 'x'
|
||||
{ 1299, 9, 11, 10, 0, -7 }, // 0x79 'y'
|
||||
{ 1312, 9, 9, 10, 0, -7 }, // 0x7a 'z'
|
||||
{ 1323, 9, 15, 10, 0, -12 }, // 0x7b '{'
|
||||
{ 1340, 6, 14, 7, 0, -12 }, // 0x7c '|'
|
||||
{ 1351, 9, 15, 10, 0, -12 }, // 0x7d '}'
|
||||
{ 1368, 10, 3, 11, 0, -10 }, // 0x7e '~'
|
||||
{ 1372, 10, 8, 11, 0, -8 }, // 0x7f ''
|
||||
};
|
||||
const GFXfont Terminal11x16Font = {
|
||||
(uint8_t *)Terminal11x16Bitmap,
|
||||
(GFXglyph *)Terminal11x16Glyphs,
|
||||
0x20, 0x7F, 22 };
|
||||
0x20, 0x7F, 18 };
|
||||
|
|
Ładowanie…
Reference in New Issue