mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-30 14:40:40 +00:00
rak10701 (rak wismeshtap) optimization (#5280)
* Improve the processing speed of virtual keyboards * Remove the disable GPS feature, as it would interfere with the normal use of TFT * Changed the default screen sleep time to 30s * Rename platform rak10701 -> rak wismeshtap * Fixed rak wismeshtap turned off gps caused the screen not to display * Reduce the size of the flash, otherwise uf2 will not work Co-authored-by: Daniel Cao <daniel.cao@rakwireless.com> Co-authored-by: Ben Meadors <benmmeadors@gmail.com> Co-authored-by: Tom Fifield <tom@tomfifield.net>
This commit is contained in:
@@ -325,7 +325,9 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
||||
|
||||
this->shift = !this->shift;
|
||||
} else if (keyTapped == "⌫") {
|
||||
#ifndef RAK14014
|
||||
this->highlight = keyTapped[0];
|
||||
#endif
|
||||
|
||||
this->payload = 0x08;
|
||||
|
||||
@@ -341,7 +343,9 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
||||
|
||||
validEvent = true;
|
||||
} else if (keyTapped == " ") {
|
||||
#ifndef RAK14014
|
||||
this->highlight = keyTapped[0];
|
||||
#endif
|
||||
|
||||
this->payload = keyTapped[0];
|
||||
|
||||
@@ -361,7 +365,9 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
||||
|
||||
this->shift = false;
|
||||
} else if (keyTapped != "") {
|
||||
#ifndef RAK14014
|
||||
this->highlight = keyTapped[0];
|
||||
#endif
|
||||
|
||||
this->payload = this->shift ? keyTapped[0] : std::tolower(keyTapped[0]);
|
||||
|
||||
@@ -830,6 +836,11 @@ void CannedMessageModule::drawKeyboard(OLEDDisplay *display, OLEDDisplayUiState
|
||||
|
||||
Letter updatedLetter = {letter.character, letter.width, xOffset, yOffset, cellWidth, cellHeight};
|
||||
|
||||
#ifdef RAK14014 // Optimize the touch range of the virtual keyboard in the bottom row
|
||||
if (outerIndex == outerSize - 1) {
|
||||
updatedLetter.rectHeight = 240 - yOffset;
|
||||
}
|
||||
#endif
|
||||
this->keyboard[this->charSet][outerIndex][innerIndex] = updatedLetter;
|
||||
|
||||
float characterOffset = ((cellWidth / 2) - (letter.width / 2));
|
||||
|
||||
@@ -68,6 +68,10 @@ class CannedMessageModule : public SinglePortModule, public Observable<const UIF
|
||||
|
||||
String drawWithCursor(String text, int cursor);
|
||||
|
||||
#ifdef RAK14014
|
||||
cannedMessageModuleRunState getRunState() const { return runState; }
|
||||
#endif
|
||||
|
||||
/*
|
||||
-Override the wantPacket method. We need the Routing Messages to look for ACKs.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user