diff --git a/src/graphics/images.h b/src/graphics/images.h index a49646c06..9e421dba9 100644 --- a/src/graphics/images.h +++ b/src/graphics/images.h @@ -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"); diff --git a/src/modules/CannedMessageModule.cpp b/src/modules/CannedMessageModule.cpp index bbc1d13c9..78ca741f5 100644 --- a/src/modules/CannedMessageModule.cpp +++ b/src/modules/CannedMessageModule.cpp @@ -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; } diff --git a/src/modules/CannedMessageModule.h b/src/modules/CannedMessageModule.h index c8728fd8b..7ba537a10 100644 --- a/src/modules/CannedMessageModule.h +++ b/src/modules/CannedMessageModule.h @@ -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;