Compare commits
No commits in common. "e5eee37b595d4c81469bf68b7b88a9e64cf9eed2" and "be946440d3399bb42f5d1295d9802648ff740370" have entirely different histories.
e5eee37b59
...
be946440d3
|
@ -80,11 +80,12 @@ public:
|
|||
|
||||
// sky view
|
||||
Point c = {130, 148};
|
||||
uint16_t r = 120;
|
||||
uint16_t r = 125;
|
||||
uint16_t r1 = r / 2;
|
||||
|
||||
getdisplay().fillCircle(c.x, c.y, r + 2, commonData->fgcolor);
|
||||
getdisplay().fillCircle(c.x, c.y, r - 1, commonData->bgcolor);
|
||||
getdisplay().fillCircle(c.x, c.y, r, commonData->bgcolor);
|
||||
getdisplay().drawCircle(c.x, c.y, r + 1, commonData->fgcolor);
|
||||
getdisplay().drawCircle(c.x, c.y, r + 2, commonData->fgcolor);
|
||||
getdisplay().drawCircle(c.x, c.y, r1, commonData->fgcolor);
|
||||
|
||||
// separation lines
|
||||
|
@ -106,36 +107,36 @@ public:
|
|||
getdisplay().setFont(&Ubuntu_Bold12pt8b);
|
||||
|
||||
getdisplay().getTextBounds("N", 0, 150, &x1, &y1, &w, &h);
|
||||
getdisplay().setCursor(c.x - w / 2, c.y - r + h + 3);
|
||||
getdisplay().setCursor(c.x - w / 2, c.y - r + h + 2);
|
||||
getdisplay().print("N");
|
||||
|
||||
getdisplay().getTextBounds("S", 0, 150, &x1, &y1, &w, &h);
|
||||
getdisplay().setCursor(c.x - w / 2, c.y + r - 3);
|
||||
getdisplay().setCursor(c.x - w / 2, c.y + r - 2);
|
||||
getdisplay().print("S");
|
||||
|
||||
getdisplay().getTextBounds("E", 0, 150, &x1, &y1, &w, &h);
|
||||
getdisplay().setCursor(c.x + r - w - 3, c.y + h / 2);
|
||||
getdisplay().setCursor(c.x + r - w - 2, c.y + h / 2);
|
||||
getdisplay().print("E");
|
||||
|
||||
getdisplay().getTextBounds("W", 0, 150, &x1, &y1, &w, &h);
|
||||
getdisplay().setCursor(c.x - r + 3 , c.y + h / 2);
|
||||
getdisplay().setCursor(c.x - r + 2 , c.y + h / 2);
|
||||
getdisplay().print("W");
|
||||
|
||||
getdisplay().setFont(&Ubuntu_Bold8pt8b);
|
||||
|
||||
// show satellites in "map"
|
||||
for (int i = 0; i < nSat; i++) {
|
||||
float arad = (sats[i].Azimut * M_PI / 180.0) + M_PI;
|
||||
float arad = sats[i].Azimut * M_PI / 180.0;
|
||||
float erad = sats[i].Elevation * M_PI / 180.0;
|
||||
uint16_t x = c.x + sin(arad) * erad * r1;
|
||||
uint16_t y = c.y + cos(arad) * erad * r1;
|
||||
getdisplay().fillRect(x-4, y-4, 8, 8, commonData->fgcolor);
|
||||
uint16_t x = c.x + sin(arad) * erad * r;
|
||||
uint16_t y = c.y + cos(arad) * erad * r;
|
||||
getdisplay().drawRect(x-4, y-4, 8, 8, commonData->fgcolor);
|
||||
}
|
||||
|
||||
// Signal / Noise bars
|
||||
getdisplay().setCursor(325, 34);
|
||||
getdisplay().print("SNR");
|
||||
// getdisplay().drawRect(270, 20, 125, 257, commonData->fgcolor);
|
||||
getdisplay().drawRect(270, 20, 125, 257, commonData->fgcolor);
|
||||
int maxsat = std::min(nSat, 12);
|
||||
for (int i = 0; i < maxsat; i++) {
|
||||
uint16_t y = 29 + (i + 1) * 20;
|
||||
|
@ -154,26 +155,6 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
// Show SatInfo and HDOP
|
||||
getdisplay().setFont(&Ubuntu_Bold8pt8b);
|
||||
|
||||
getdisplay().setCursor(220, 34);
|
||||
getdisplay().print("Sat:");
|
||||
|
||||
GwApi::BoatValue *bv_satinfo = pageData.values[0]; // SatInfo
|
||||
String sval_satinfo = formatValue(bv_satinfo, *commonData).svalue;
|
||||
getdisplay().setCursor(220, 49);
|
||||
getdisplay().print(sval_satinfo);
|
||||
|
||||
getdisplay().setCursor(220, 254);
|
||||
getdisplay().print("HDOP:");
|
||||
|
||||
GwApi::BoatValue *bv_hdop = pageData.values[1]; // HDOP
|
||||
String sval_hdop = formatValue(bv_hdop, *commonData).svalue;
|
||||
sval_hdop = sval_hdop + "m";
|
||||
getdisplay().setCursor(220, 269);
|
||||
getdisplay().print(sval_hdop);
|
||||
|
||||
return PAGE_UPDATE;
|
||||
};
|
||||
};
|
||||
|
@ -193,7 +174,6 @@ PageDescription registerPageSkyView(
|
|||
"SkyView", // Page name
|
||||
createPage, // Action
|
||||
0, // Number of bus values depends on selection in Web configuration
|
||||
{"SatInfo", "HDOP"}, // Bus values we need in the page
|
||||
true // Show display header on/off
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue