show real radio signal strength

This commit is contained in:
geeksville 2020-02-11 11:03:03 -08:00
parent 6dc17bdfde
commit 124c3e2edd
2 changed files with 6 additions and 2 deletions

View File

@ -5,6 +5,7 @@
# Medium priority # Medium priority
* show radio and gps signal strength as an image
* apply radio settings from android land * apply radio settings from android land
* only BLE advertise for a short time after the screen is on and button pressed - to save power and prevent people for sniffing for our BT app. * only BLE advertise for a short time after the screen is on and button pressed - to save power and prevent people for sniffing for our BT app.
* use https://platformio.org/lib/show/1260/OneButton * use https://platformio.org/lib/show/1260/OneButton

View File

@ -136,7 +136,7 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
String sender = "KH:"; String sender = "KH:";
display->drawString(0 + x, 0 + y, sender); display->drawString(0 + x, 0 + y, sender);
display->setFont(ArialMT_Plain_10); display->setFont(ArialMT_Plain_10);
display->drawStringMaxWidth(4 + x, 10 + y, 128, " Lorem ipsum\n dolor sit amet, consetetur sadipscing elitr, sed diam"); display->drawStringMaxWidth(4 + x, 10 + y, 128, " Hey - I found the trail, but I've fallen and I can't get up. ;-)");
// ui.disableIndicator(); // ui.disableIndicator();
} }
@ -257,10 +257,13 @@ void drawNodeInfo(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, in
const char *username = node->has_user ? node->user.long_name : "Unknown Name"; const char *username = node->has_user ? node->user.long_name : "Unknown Name";
static char signalStr[20];
snprintf(signalStr, sizeof(signalStr), "Signal: %d", node->snr);
const char *fields[] = { const char *fields[] = {
username, username,
"2.1 mi", "2.1 mi",
"Signal: good", signalStr,
"12 minutes ago", "12 minutes ago",
NULL}; NULL};
drawColumns(display, x, y, fields); drawColumns(display, x, y, fields);