Webform switch between continuous and cycle sending #12
|
@ -43,8 +43,8 @@ const char* PARAM_FLOAT = "inputFloat";
|
|||
String yourInputString;
|
||||
int yourInputSend;
|
||||
int yourInputWPM;
|
||||
int yourInputMsg = 0;
|
||||
int yourInputMsg_old = 0; // to save previous state and check changes
|
||||
int yourInputMsg;
|
||||
int yourInputMsg_old; // to save previous state and check changes
|
||||
float yourInputFloat;
|
||||
|
||||
// HTML web page to handle 3 input fields (inputString, inputSend, inputFloat)
|
||||
|
@ -285,7 +285,7 @@ auto morseMOH =
|
|||
JLed(output26).UserFunc(&morseEffectMOH).DelayAfter(word_space_ms).Forever();
|
||||
auto morseMO5 =
|
||||
JLed(output26).UserFunc(&morseEffectMO5).DelayAfter(word_space_ms).Forever();
|
||||
auto morseToSend = JLed(output26); // set this up to overwrite later in loop()
|
||||
auto morseToSend = morseCQ; // set this up to overwrite later
|
||||
|
||||
//================================================================================
|
||||
// setup(): stuff that only gets done once, after power up (KB1OIQ's description)
|
||||
|
@ -346,6 +346,23 @@ void setup() {
|
|||
yourInputMsg = readFile(SPIFFS, "/inputMsg.txt").toInt();
|
||||
yourInputFloat = readFile(SPIFFS, "/inputFloat.txt").toFloat();
|
||||
|
||||
|
||||
// On restart, keep doing what you were doing before
|
||||
yourInputMsg_old = yourInputMsg;
|
||||
if(yourInputMsg == 0){
|
||||
morseToSend = morseCQ;
|
||||
} else if(yourInputMsg == 1){
|
||||
morseToSend = morseMOE;
|
||||
} else if(yourInputMsg == 2){
|
||||
morseToSend = morseMOI;
|
||||
} else if(yourInputMsg == 3){
|
||||
morseToSend = morseMOS;
|
||||
} else if(yourInputMsg == 4){
|
||||
morseToSend = morseMOH;
|
||||
} else if(yourInputMsg == 5){
|
||||
morseToSend = morseMO5;
|
||||
}
|
||||
|
||||
WiFi.mode(WIFI_STA);
|
||||
WiFi.begin(ssid, password);
|
||||
if (WiFi.waitForConnectResult() != WL_CONNECTED) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user