mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-08 06:02:05 +00:00
parent
3741b78a32
commit
6aff2179d1
@ -281,6 +281,4 @@ static const uint8_t icon_node[] PROGMEM = {
|
||||
0xFE // ####### ← device base
|
||||
};
|
||||
|
||||
|
||||
#include "img/icon.xbm"
|
||||
static_assert(sizeof(icon_bits) >= 0, "Silence unused variable warning");
|
||||
|
@ -596,7 +596,7 @@ bool CannedMessageModule::handleFreeTextInput(const InputEvent* event) {
|
||||
if (dest == 0) dest = NODENUM_BROADCAST;
|
||||
|
||||
// Defensive: If channel isn't valid, pick the first available channel
|
||||
if (channel >= channels.getNumChannels()) channel = 0;
|
||||
if (channel < 0 || channel >= channels.getNumChannels()) channel = 0;
|
||||
|
||||
payload = CANNED_MESSAGE_RUN_STATE_FREETEXT;
|
||||
currentMessageIndex = -1;
|
||||
@ -1028,7 +1028,7 @@ int32_t CannedMessageModule::runOnce()
|
||||
switch (this->payload) { // code below all trigger the freetext window (where you type to send a message) or reset the
|
||||
// display back to the default window
|
||||
case 0x08: // backspace
|
||||
if (this->freetext.length() > 0 && this->key_highlight == 0x00) {
|
||||
if (this->freetext.length() > 0 && this->highlight == 0x00) {
|
||||
if (this->cursor == this->freetext.length()) {
|
||||
this->freetext = this->freetext.substring(0, this->freetext.length() - 1);
|
||||
} else {
|
||||
@ -1062,7 +1062,7 @@ int32_t CannedMessageModule::runOnce()
|
||||
// already handled above
|
||||
break;
|
||||
default:
|
||||
if (this->key_highlight != 0x00) {
|
||||
if (this->highlight != 0x00) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -150,13 +150,6 @@ private:
|
||||
String freetext;
|
||||
String temporaryMessage;
|
||||
|
||||
#if defined(USE_VIRTUAL_KEYBOARD)
|
||||
bool shift = false; // True if Shift (caps/alt) is active
|
||||
int charSet = 0; // 0 = alpha keyboard, 1 = numeric/symbol keyboard
|
||||
int highlight = -1; // Highlighted key for UI feedback
|
||||
#endif
|
||||
char key_highlight = 0x00;
|
||||
|
||||
// === Message Storage ===
|
||||
char messageStore[CANNED_MESSAGE_MODULE_MESSAGES_SIZE + 1];
|
||||
char *messages[CANNED_MESSAGE_MODULE_MESSAGE_MAX_COUNT];
|
||||
@ -183,6 +176,7 @@ private:
|
||||
// === State Tracking ===
|
||||
cannedMessageModuleRunState runState = CANNED_MESSAGE_RUN_STATE_INACTIVE;
|
||||
cannedMessageDestinationType destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NONE;
|
||||
char highlight = 0x00;
|
||||
char payload = 0x00;
|
||||
unsigned int cursor = 0;
|
||||
unsigned long lastTouchMillis = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user