fixing prints and imputs

This commit is contained in:
ESPboy 2020-10-28 21:01:09 +03:00
parent 94c37872d1
commit 335a130eed

View file

@ -51,7 +51,7 @@ const char *menuMain[] PROGMEM = {
}; };
const char *menuRecord[] PROGMEM = { const char *menuRecord[] PROGMEM = {
"SEND", //send selected record "-SEND", //send selected record
"SHOW", "SHOW",
"SET REPEAT", "SET REPEAT",
"RENAME", "RENAME",
@ -424,7 +424,8 @@ void show_f(uint16_t selectedSignal) {
String toPrint; String toPrint;
selectedSignal--; selectedSignal--;
toggleDisplayModeLocal(1);
toPrint = F("Signal: "); toPrint = F("Signal: ");
toPrint+=recordStoredVector[selectedSignal].recordName; toPrint+=recordStoredVector[selectedSignal].recordName;
printConsoleLocal(toPrint, TFT_GREEN, 1, 0); printConsoleLocal(toPrint, TFT_GREEN, 1, 0);
@ -496,6 +497,7 @@ gotolabel:
if (userInput > DEFAULT_SIGNAL_REPEAT_NUMBER*10) userInput = DEFAULT_SIGNAL_REPEAT_NUMBER; if (userInput > DEFAULT_SIGNAL_REPEAT_NUMBER*10) userInput = DEFAULT_SIGNAL_REPEAT_NUMBER;
recordStoredVector[selectedSignal-1].recordRepeatno = userInput; recordStoredVector[selectedSignal-1].recordRepeatno = userInput;
printInfoMessage(F("DONE")); printInfoMessage(F("DONE"));
userInput=0;
break; break;
case rename_: case rename_:
printConsoleLocal(F("Enter new name"), TFT_MAGENTA, 1, 0); printConsoleLocal(F("Enter new name"), TFT_MAGENTA, 1, 0);
@ -506,6 +508,7 @@ gotolabel:
userInputName = userInputName.substring(0,18); userInputName = userInputName.substring(0,18);
memcpy(&recordStoredVector[selectedSignal-1].recordName, userInputName.c_str(), userInputName.length()+1); memcpy(&recordStoredVector[selectedSignal-1].recordName, userInputName.c_str(), userInputName.length()+1);
printInfoMessage(F("DONE")); printInfoMessage(F("DONE"));
userInputName="";
break; break;
case delete_: case delete_:
recordStoredVector.erase(recordStoredVector.begin()+(selectedSignal-1)); recordStoredVector.erase(recordStoredVector.begin()+(selectedSignal-1));