mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-23 11:10:52 +00:00
Continue unifying display, also show message status on the "isMine" lines
This commit is contained in:
@@ -466,7 +466,16 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
|
|||||||
// Final header line
|
// Final header line
|
||||||
char headerStr[96];
|
char headerStr[96];
|
||||||
if (mine) {
|
if (mine) {
|
||||||
snprintf(headerStr, sizeof(headerStr), "me %s %s", timeBuf, chanType);
|
if (m.ackStatus == AckStatus::ACKED) {
|
||||||
|
// Destination ACK
|
||||||
|
snprintf(headerStr, sizeof(headerStr), "Sent %s %s", timeBuf, chanType);
|
||||||
|
} else if (m.ackStatus == AckStatus::NACKED || m.ackStatus == AckStatus::TIMEOUT) {
|
||||||
|
// Failure or timeout
|
||||||
|
snprintf(headerStr, sizeof(headerStr), "Failed %s %s", timeBuf, chanType);
|
||||||
|
} else if (m.ackStatus == AckStatus::RELAYED) {
|
||||||
|
// Relay ACK
|
||||||
|
snprintf(headerStr, sizeof(headerStr), "Relayed %s %s", timeBuf, chanType);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
snprintf(headerStr, sizeof(headerStr), "%s @%s %s", timeBuf, sender, chanType);
|
snprintf(headerStr, sizeof(headerStr), "%s @%s %s", timeBuf, sender, chanType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,13 +202,13 @@ void CannedMessageModule::drawHeader(OLEDDisplay *display, int16_t x, int16_t y,
|
|||||||
if (this->dest == NODENUM_BROADCAST) {
|
if (this->dest == NODENUM_BROADCAST) {
|
||||||
display->drawStringf(x, y, buffer, "To: #%s", channels.getName(this->channel));
|
display->drawStringf(x, y, buffer, "To: #%s", channels.getName(this->channel));
|
||||||
} else {
|
} else {
|
||||||
display->drawStringf(x, y, buffer, "To: %s", getNodeName(this->dest));
|
display->drawStringf(x, y, buffer, "To: @%s", getNodeName(this->dest));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this->dest == NODENUM_BROADCAST) {
|
if (this->dest == NODENUM_BROADCAST) {
|
||||||
display->drawStringf(x, y, buffer, "To: #%.20s", channels.getName(this->channel));
|
display->drawStringf(x, y, buffer, "To: #%.20s", channels.getName(this->channel));
|
||||||
} else {
|
} else {
|
||||||
display->drawStringf(x, y, buffer, "To: %s", getNodeName(this->dest));
|
display->drawStringf(x, y, buffer, "To: @%s", getNodeName(this->dest));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -649,7 +649,7 @@ bool CannedMessageModule::handleMessageSelectorInput(const InputEvent *event, bo
|
|||||||
if (this->dest == NODENUM_BROADCAST) {
|
if (this->dest == NODENUM_BROADCAST) {
|
||||||
snprintf(headerBuffer, sizeof(headerBuffer), "To: #%s", channels.getName(this->channel));
|
snprintf(headerBuffer, sizeof(headerBuffer), "To: #%s", channels.getName(this->channel));
|
||||||
} else {
|
} else {
|
||||||
snprintf(headerBuffer, sizeof(headerBuffer), "To: %s", getNodeName(this->dest));
|
snprintf(headerBuffer, sizeof(headerBuffer), "To: @%s", getNodeName(this->dest));
|
||||||
}
|
}
|
||||||
screen->showTextInput(headerBuffer, "", 300000, [this](const std::string &text) {
|
screen->showTextInput(headerBuffer, "", 300000, [this](const std::string &text) {
|
||||||
if (!text.empty()) {
|
if (!text.empty()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user