Use a dropdown for program setting.
This commit is contained in:
parent
17d8883f39
commit
13ddf853ed
@ -55,17 +55,13 @@ const char index_html[] PROGMEM = R"rawliteral(
|
||||
</script></head><body>
|
||||
<form action="/get" target="hidden-form">
|
||||
inputString (current value %inputString%): <input type="text" name="inputString" value=%inputString%><br>
|
||||
<!--
|
||||
<input type="submit" value="Submit" onclick="submitMessage()">
|
||||
</form><br>
|
||||
<form action="/get" target="hidden-form">
|
||||
-->
|
||||
Seconds between flash (current value %inputInt%): <input type="number " name="inputInt" value = %inputInt%><br>
|
||||
<!--
|
||||
<input type="submit" value="Submit" onclick="submitMessage()">
|
||||
</form><br>
|
||||
<form action="/get" target="hidden-form">
|
||||
-->
|
||||
|
||||
Sending program:
|
||||
<select name="inputInt" id="send-program">
|
||||
<option value="1">Continuous</option>
|
||||
<option value="0">Cycle</option>
|
||||
</select><br>
|
||||
|
||||
inputFloat (current value %inputFloat%): <input type="number " name="inputFloat" value = %inputFloat%><br>
|
||||
<input type="submit" value="Submit" onclick="submitMessage()">
|
||||
</form>
|
||||
@ -144,7 +140,7 @@ void writeFile(fs::FS &fs, const char * path, const char * message){
|
||||
file.close();
|
||||
}
|
||||
|
||||
// Replaces placeholder with stored values
|
||||
// Replaces placeholder in web UI with stored values
|
||||
String processor(const String& var){
|
||||
//Serial.println(var);
|
||||
if(var == "inputString"){
|
||||
@ -365,14 +361,14 @@ void loop() {
|
||||
// float yourInputFloat = readFile(SPIFFS, "/inputFloat.txt").toFloat();
|
||||
|
||||
// if you want to send code, and it's not sending, then start it up
|
||||
if((yourInputInt != 0) & (morseLed.IsRunning() == false)){
|
||||
if((yourInputInt == 1) & (morseLed.IsRunning() == false)){
|
||||
//jled
|
||||
morseLed.Reset().Update();
|
||||
//morse.send("CQ CQ CQ DE W1CDN K"); //etherkit morse
|
||||
//telegraph26.send("CQ CQ CQ DE W1CDN K"); //telegraph
|
||||
|
||||
// if you want to send code, and it is sending, keep sending
|
||||
} else if((yourInputInt != 0) & (morseLed.IsRunning() == true)){
|
||||
} else if((yourInputInt == 1) & (morseLed.IsRunning() == true)){
|
||||
morseLed.Update();
|
||||
// if you don't want to send code
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user