stub encryptor seems nicely backwards compatible with old devices and apps

This commit is contained in:
geeksville
2020-05-09 17:51:20 -07:00
parent e6875d559c
commit 1cc24de787
9 changed files with 104 additions and 60 deletions

View File

@@ -81,7 +81,7 @@ static void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state
MeshPacket &mp = devicestate.rx_text_message;
NodeInfo *node = nodeDB.getNode(mp.from);
// DEBUG_MSG("drawing text message from 0x%x: %s\n", mp.from,
// mp.payload.variant.data.payload.bytes);
// mp.decoded.variant.data.decoded.bytes);
// Demo for drawStringMaxWidth:
// with the third parameter you can define the width after which words will
@@ -94,8 +94,8 @@ static void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state
// the max length of this buffer is much longer than we can possibly print
static char tempBuf[96];
assert(mp.payload.has_data);
snprintf(tempBuf, sizeof(tempBuf), " %s", mp.payload.data.payload.bytes);
assert(mp.decoded.has_data);
snprintf(tempBuf, sizeof(tempBuf), " %s", mp.decoded.data.payload.bytes);
display->drawStringMaxWidth(4 + x, 10 + y, 128, tempBuf);
}