Clarify some things.

This commit is contained in:
mattbk 2023-09-01 14:15:54 -05:00
parent 20e075d29d
commit bfc43443b4

View File

@ -61,24 +61,24 @@ const char index_html[] PROGMEM = R"rawliteral(
<form action="/get" target="hidden-form"> <form action="/get" target="hidden-form">
inputString (current value %inputString%): <input type="text" name="inputString" value=%inputString%><br> inputString (current value %inputString%): <input type="text" name="inputString" value=%inputString%><br>
Sending program (cycle doesn't work yet) (current %inputSend%): Sending program (cycle doesn't work yet) (current value: <b>%inputSend%</b>):
<select name="inputSend" id="send-program"> <select name="inputSend" id="send-program">
<option value="0">Off</option> <option value="0">0 -Off</option>
<option value="1">Continuous</option> <option value="1">1 - Continuous</option>
<option value="2">Cycle</option> <option value="2">2 - Cycle</option>
</select><br> </select><br>
Message (current %inputMsg%): Message (current value <b>%inputMsg%</b>):
<select name="inputMsg" id="message"> <select name="inputMsg" id="message">
<option value="0">CQ CQ CQ DE W1CDN</option> <option value="0">0 - CQ CQ CQ DE W1CDN</option>
<option value="1">MOE</option> <option value="1">1 - MOE</option>
<option value="2">MOI</option> <option value="2">2 - MOI</option>
<option value="3">MOS</option> <option value="3">3 - MOS</option>
<option value="4">MOH</option> <option value="4">4 - MOH</option>
<option value="5">MO5</option> <option value="5">5 - MO5</option>
</select><br> </select><br>
<!-- WPM (current value %inputWPM%): <input type="number " name="inputWPM" value = %inputWPM%> (doesn't work yet)<br> --> WPM (current value %inputWPM%): <input type="number " name="inputWPM" value = %inputWPM%> (doesn't work yet)<br>
inputFloat (current value %inputFloat%): <input type="number " name="inputFloat" value = %inputFloat%><br> inputFloat (current value %inputFloat%): <input type="number " name="inputFloat" value = %inputFloat%><br>
<input type="submit" value="Submit" onclick="submitMessage()"> <input type="submit" value="Submit" onclick="submitMessage()">
@ -262,8 +262,8 @@ class MorseEffect : public jled::BrightnessEvaluator {
// Speed is milliseconds per dit, which is 1000 * (60 / (50 * WPM)) // Speed is milliseconds per dit, which is 1000 * (60 / (50 * WPM))
// 60 is 20 wpm, 120 is 10 wpm, 90 is 15 wpm, etc. // 60 is 20 wpm, 120 is 10 wpm, 90 is 15 wpm, etc.
// https://morsecode.world/international/timing.html // https://morsecode.world/international/timing.html
int wpm = 10; float wpm = 10;
int ms_per_dit = 120; //1000 * (60 / (50 * wpm)); float ms_per_dit = 1000 * (60 / (50 * wpm));
int word_space_ms = ms_per_dit * 7; int word_space_ms = ms_per_dit * 7;
// Hardcoding these for now, will come back and make it more flexible. // Hardcoding these for now, will come back and make it more flexible.
MorseEffect morseEffectCQ("CQ CQ CQ DE W1CDN", ms_per_dit); MorseEffect morseEffectCQ("CQ CQ CQ DE W1CDN", ms_per_dit);
@ -446,7 +446,7 @@ void loop() {
// See which message we are sending // See which message we are sending
// Only do this when the message has been updated. // Only do this when the message has been updated.
if(yourInputMsg != yourInputMsg_old){ if(yourInputMsg != yourInputMsg_old){
morseToSend.Stop(JLed::eStopMode::FULL_OFF).Update(); //morseToSend.Stop(JLed::eStopMode::FULL_OFF).Update();
if(yourInputMsg == 0){ if(yourInputMsg == 0){
morseToSend = morseCQ; morseToSend = morseCQ;
} else if(yourInputMsg == 1){ } else if(yourInputMsg == 1){