kopia lustrzana https://github.com/dl9rdz/rdz_ttgo_sonde
nits
rodzic
5664ce3e6d
commit
44e3737645
|
@ -387,7 +387,8 @@ void addSondeStatus(char *ptr, int i)
|
|||
s->burstKT, s->launchKT, s->countKT, ((uint16_t)s->frame - s->crefKT));
|
||||
}
|
||||
sprintf(ptr + strlen(ptr), "<tr><td><a target=\"_empty\" href=\"geo:%.6f,%.6f\">GEO-App</a> - ", s->lat, s->lon);
|
||||
sprintf(ptr + strlen(ptr), "<a target=\"_empty\" href=\"https://wx.dl2mf.de/?%s\">WX.DL2MF.de</a> - ", s->id);
|
||||
sprintf(ptr + strlen(ptr), "<a target=\"_empty\" href=\"https://wetterson.de/karte/?%s\">wetterson.de</a> - ", s->id);
|
||||
sprintf(ptr + strlen(ptr), "<a target=\"_empty\" href=\"https://radiosondy.info/sonde_archive.php?sondenumber=%s\">radiosondy.info</a> - ", s->id);
|
||||
sprintf(ptr + strlen(ptr), "<a target=\"_empty\" href=\"https://www.openstreetmap.org/?mlat=%.6f&mlon=%.6f&zoom=14\">OSM</a></td></tr>", s->lat, s->lon);
|
||||
strcat(ptr, "</table><p/>\n");
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<button class="tablinks" onclick="selTab(event,'QRG')" id="defaultTab">QRG</button>
|
||||
<button class="tablinks" onclick="selTab(event,'WiFi')">WiFi</button>
|
||||
<button class="tablinks" onclick="selTab(event,'Data')">Data</button>
|
||||
<button class="tablinks" onclick="selTab(event,'SondeMap')">SondeMap</button>
|
||||
<!-- <button class="tablinks" onclick="selTab(event,'SondeMap')">SondeMap</button> -->
|
||||
<button class="tablinks" onclick="selTab(event,'Config')">Config</button>
|
||||
<button class="tablinks" onclick="selTab(event,'Control')">Control</button>
|
||||
<button class="tablinks" onclick="selTab(event,'About')">About</button>
|
||||
|
@ -39,9 +39,11 @@
|
|||
<iframe src="status.html" style="border:none;" width="100%%" height="100%%"></iframe>
|
||||
</div>
|
||||
|
||||
<div id="SondeMap" class="tabcontent" data-src="https://wx.dl2mf.de/#?">
|
||||
<!--
|
||||
<div id="SondeMap" class="tabcontent" data-src="https://wetterson.de/karte/">
|
||||
<iframe src="" style="border:none;" width="98%%" height="98%%"></iframe>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div id="Config" class="tabcontent">
|
||||
<h3>Configuration</h3>
|
||||
|
@ -57,8 +59,12 @@
|
|||
<h3>About</h3>
|
||||
%VERSION_NAME%<br>
|
||||
Copyright © 2019 by Hansi Reiser, DL9RDZ<br>
|
||||
(version %VERSION_ID%)<br>
|
||||
with mods by <a href="https://www.dl2mf.de/" target="_blank">Meinhard Guenther, DL2MF</a><br>
|
||||
(version %VERSION_ID%)<br><br>
|
||||
with contributions by <a href="https://www.dl2mf.de/" target="_blank">Meinhard Guenther, DL2MF</a>,
|
||||
<a href="https://github.com/bazjo">Johannes</a>, <a href="http://www.p1337.synology.me/dokuwiki/doku.php?id=public:wettersonden">Robert Stefanowicz</a>,
|
||||
<a href="https://github.com/puspis">Josema</a>, and probably some more people I forgot to mention here.
|
||||
|
||||
<br>
|
||||
<br>
|
||||
Autodetect info: %AUTODETECT_INFO%<br>
|
||||
<br>
|
||||
|
|
|
@ -349,20 +349,20 @@ color=00FF00
|
|||
3,0=xMEMORY
|
||||
3,9=xLAUNCH SITE
|
||||
color=639AFF
|
||||
4,0=S/
|
||||
4,0,9=S/
|
||||
4,9=S
|
||||
#Row 3
|
||||
color=00FF00
|
||||
6,0=xTYPE
|
||||
6,9=xFREQUENCY
|
||||
color=639AFF
|
||||
7,0=T
|
||||
7,0,9=T
|
||||
7,9=F MHz
|
||||
#Row 4
|
||||
fonts=0,5
|
||||
color=285454
|
||||
11.5,0=xIP ADDRESS:
|
||||
10.9,8.8=N
|
||||
10.9,22,-15=N
|
||||
#Footer
|
||||
color=FF0000
|
||||
12.7,18=bVV
|
||||
|
|
|
@ -388,25 +388,39 @@ void ILI9225Display::getDispSize(uint8_t *height, uint8_t *width, uint8_t *lines
|
|||
void ILI9225Display::drawString(uint8_t x, uint8_t y, const char *s, int16_t width, uint16_t fg, uint16_t bg) {
|
||||
int16_t w,h;
|
||||
boolean alignright=false;
|
||||
if(findex<3) { // standard font
|
||||
DebugPrintf(DEBUG_DISPLAY, "Simple Text %s at %d,%d [%d]\n", s, x, y, width);
|
||||
tft->drawText(x, y, s, fg);
|
||||
return;
|
||||
}
|
||||
// GFX font
|
||||
if(width<0) {
|
||||
width = -width;
|
||||
alignright = true;
|
||||
}
|
||||
// Standard font
|
||||
if(findex<3) {
|
||||
DebugPrintf(DEBUG_DISPLAY, "Simple Text %s at %d,%d [%d]\n", s, x, y, width);
|
||||
tft->setBackgroundColor(bg);
|
||||
int h = tft->getFont().height;
|
||||
if( alignright ) {
|
||||
w = tft->getTextWidth(s);
|
||||
if( width==WIDTH_AUTO ) { width = w; }
|
||||
if( width > w ) {
|
||||
tft->fillRectangle(x - width, y, x - w, y + h - 1, bg);
|
||||
}
|
||||
tft->drawText(x - w, y, s, fg);
|
||||
} else {
|
||||
int curx = tft->drawText(x, y, s, fg);
|
||||
if( width==WIDTH_AUTO ) { return; }
|
||||
if(curx < x + width) {
|
||||
tft->fillRectangle(curx, y, x + width - 1, y + h - 1, bg);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
// GFX font
|
||||
if(width==WIDTH_AUTO || alignright) {
|
||||
tft->getGFXTextExtent(s, x, y + gfxoffsets[findex-3].yofs, &w, &h);
|
||||
if(width==WIDTH_AUTO) {
|
||||
width=w;
|
||||
if(alignright) {
|
||||
x -= w;
|
||||
DebugPrint(DEBUG_DISPLAY, "reducing x by widht, its now ");
|
||||
Serial.println(x);
|
||||
}
|
||||
if(width==WIDTH_AUTO) { width=w; }
|
||||
if(alignright) {
|
||||
if(w > width) width = w;
|
||||
x -= width;
|
||||
DebugPrintf(DEBUG_DISPLAY, "Reducing x by width %d, its now %d\n", width, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -424,14 +438,22 @@ void ILI9225Display::drawString(uint8_t x, uint8_t y, const char *s, int16_t wid
|
|||
// Text by drawing bitmap.... => less "flicker"
|
||||
uint16_t height = gfxoffsets[findex-3].yclear;
|
||||
uint16_t *bitmap = (uint16_t *)malloc(sizeof(uint16_t) * width * height);
|
||||
if(!bitmap) {
|
||||
Serial.println("FATAL: OUT OF MEMORY when allocating bitmap");
|
||||
Serial.printf("w=%d, h=%d, s==%d\n",width, height, 2*width*height);
|
||||
heap_caps_print_heap_info(MALLOC_CAP_DEFAULT);
|
||||
return;
|
||||
}
|
||||
for(int i=0; i<width*height; i++) { bitmap[i] = bg; } // fill with background
|
||||
int x0 = 0;
|
||||
if(alignright) { x0 = width - w; }
|
||||
int y0 = gfxoffsets[findex-3].yofs;
|
||||
DebugPrintf(DEBUG_DISPLAY,"GFX: w=%d h=%d\n", width, height);
|
||||
for (uint8_t k = 0; k < strlen(s); k++) {
|
||||
x0 += tft->drawGFXcharBM(x0, y0, s[k], fg, bitmap, width, height) + 1;
|
||||
DebugPrintf(DEBUG_DISPLAY,"[%c->%d]",s[k],x0);
|
||||
}
|
||||
// TODO: if x+width exceeds display width, garbage is generated....
|
||||
drawBitmap(x, y, bitmap, width, height);
|
||||
free(bitmap);
|
||||
#endif
|
||||
|
@ -704,6 +726,7 @@ void Display::parseDispElement(char *text, DispEntry *de)
|
|||
// Large font can be used arbitrarily
|
||||
if(de->fmt==fontsma) de->fmt=0;
|
||||
de->func = disp.drawIP; break;
|
||||
de->extra = strdup(text+1);
|
||||
case 's':
|
||||
de->func = disp.drawSite;
|
||||
de->extra = strdup(text+1);
|
||||
|
|
|
@ -445,6 +445,9 @@ void Sonde::setup() {
|
|||
float afcbw = sx1278.getAFCBandwidth();
|
||||
float rxbw = sx1278.getRxBandwidth();
|
||||
Serial.printf("AFC BW: %f RX BW: %f\n", afcbw, rxbw);
|
||||
|
||||
// reset rxtimer / norxtimer state
|
||||
sonde.sondeList[sonde.currentSonde].lastState = -1;
|
||||
}
|
||||
|
||||
extern void flashLed(int ms);
|
||||
|
|
Ładowanie…
Reference in New Issue