mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
dont show cli data replies on display
This commit is contained in:
parent
54890421bb
commit
7ea6a98513
1 changed files with 9 additions and 2 deletions
|
|
@ -315,17 +315,24 @@ void MyMesh::queueMessage(const ContactInfo &from, uint8_t txt_type, mesh::Packe
|
||||||
i += tlen;
|
i += tlen;
|
||||||
addToOfflineQueue(out_frame, i);
|
addToOfflineQueue(out_frame, i);
|
||||||
|
|
||||||
|
// we only want to show text messages on display, not cli data
|
||||||
|
bool should_display = txt_type == TXT_TYPE_PLAIN || txt_type == TXT_TYPE_SIGNED_PLAIN;
|
||||||
|
|
||||||
if (_serial->isConnected()) {
|
if (_serial->isConnected()) {
|
||||||
uint8_t frame[1];
|
uint8_t frame[1];
|
||||||
frame[0] = PUSH_CODE_MSG_WAITING; // send push 'tickle'
|
frame[0] = PUSH_CODE_MSG_WAITING; // send push 'tickle'
|
||||||
_serial->writeFrame(frame, 1);
|
_serial->writeFrame(frame, 1);
|
||||||
} else {
|
} else {
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
ui_task.soundBuzzer(UIEventType::contactMessage);
|
if(should_display){
|
||||||
|
ui_task.soundBuzzer(UIEventType::contactMessage);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
ui_task.newMsg(path_len, from.name, text, offline_queue_len);
|
if(should_display){
|
||||||
|
ui_task.newMsg(path_len, from.name, text, offline_queue_len);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue