Canned Messages tweak

This commit is contained in:
Jonathan Bennett 2025-06-26 00:32:29 -05:00
parent 7265b5e6c6
commit fc2fd5ebff
2 changed files with 9 additions and 6 deletions

View File

@ -334,8 +334,13 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
}
// Printable char (ASCII) opens free text compose
if (event->kbchar >= 32 && event->kbchar <= 126) {
LaunchFreetextWithDestination(NODENUM_BROADCAST);
return 1;
runState = CANNED_MESSAGE_RUN_STATE_FREETEXT;
requestFocus();
UIFrameEvent e;
e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;
notifyObservers(&e);
// Immediately process the input in the new state (freetext)
return handleFreeTextInput(event);
}
break;
@ -385,10 +390,10 @@ bool CannedMessageModule::handleTabSwitch(const InputEvent *event)
// RESTORE THIS!
if (runState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION)
updateDestinationSelectionList();
requestFocus();
UIFrameEvent e;
e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;
requestFocus();
notifyObservers(&e);
screen->forceDisplay();
return true;
@ -985,6 +990,7 @@ int32_t CannedMessageModule::runOnce()
default:
// Only insert ASCII printable characters (32126)
if (this->payload >= 32 && this->payload <= 126) {
requestFocus();
if (this->cursor == this->freetext.length()) {
this->freetext += (char)this->payload;
} else {

View File

@ -22,7 +22,6 @@ lib_deps =
${native_base.lib_deps}
${device-ui_base.lib_deps}
build_flags = ${native_base.build_flags} -Os -lX11 -linput -lxkbcommon -ffunction-sections -fdata-sections -Wl,--gc-sections
-D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1
-D RAM_SIZE=16384
-D USE_X11=1
-D HAS_TFT=1
@ -51,7 +50,6 @@ lib_deps =
${device-ui_base.lib_deps}
board_level = extra
build_flags = ${native_base.build_flags} -Os -ffunction-sections -fdata-sections -Wl,--gc-sections
-D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1
-D RAM_SIZE=8192
-D USE_FRAMEBUFFER=1
-D LV_COLOR_DEPTH=32
@ -81,7 +79,6 @@ lib_deps =
${device-ui_base.lib_deps}
board_level = extra
build_flags = ${native_base.build_flags} -O0 -fsanitize=address -lX11 -linput -lxkbcommon
-D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1
-D DEBUG_HEAP
-D RAM_SIZE=16384
-D USE_X11=1