Skip to content

Commit 7ea6a98

Browse files
committed
dont show cli data replies on display
1 parent 5489042 commit 7ea6a98

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

examples/companion_radio/MyMesh.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,17 +315,24 @@ void MyMesh::queueMessage(const ContactInfo &from, uint8_t txt_type, mesh::Packe
315315
i += tlen;
316316
addToOfflineQueue(out_frame, i);
317317

318+
// we only want to show text messages on display, not cli data
319+
bool should_display = txt_type == TXT_TYPE_PLAIN || txt_type == TXT_TYPE_SIGNED_PLAIN;
320+
318321
if (_serial->isConnected()) {
319322
uint8_t frame[1];
320323
frame[0] = PUSH_CODE_MSG_WAITING; // send push 'tickle'
321324
_serial->writeFrame(frame, 1);
322325
} else {
323326
#ifdef DISPLAY_CLASS
324-
ui_task.soundBuzzer(UIEventType::contactMessage);
327+
if(should_display){
328+
ui_task.soundBuzzer(UIEventType::contactMessage);
329+
}
325330
#endif
326331
}
327332
#ifdef DISPLAY_CLASS
328-
ui_task.newMsg(path_len, from.name, text, offline_queue_len);
333+
if(should_display){
334+
ui_task.newMsg(path_len, from.name, text, offline_queue_len);
335+
}
329336
#endif
330337
}
331338

0 commit comments

Comments
 (0)