Compare commits
No commits in common. "08b1bdf3fd51e8b674e760c52266f68f7d7b5c36" and "3474d8ba17273e3cb241a933b4f5905eadcab7d9" have entirely different histories.
08b1bdf3fd
...
3474d8ba17
@ -136,10 +136,7 @@ const char index_html[] PROGMEM = R"rawliteral(
|
|||||||
<option value="3">3 - MOS</option>
|
<option value="3">3 - MOS</option>
|
||||||
<option value="4">4 - MOH</option>
|
<option value="4">4 - MOH</option>
|
||||||
<option value="5">5 - MO5</option>
|
<option value="5">5 - MO5</option>
|
||||||
</select><br>
|
</select></p>
|
||||||
|
|
||||||
Speed: <input type="number" name="inputWPM" value = %inputWPM%> WPM
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2>Cycle Settings</h2>
|
<h2>Cycle Settings</h2>
|
||||||
<p>Only applies when <em>Sending Program</em> is set to "2 - Cycle". You cannot set a cycle start date more than a month in advance.</p>
|
<p>Only applies when <em>Sending Program</em> is set to "2 - Cycle". You cannot set a cycle start date more than a month in advance.</p>
|
||||||
@ -160,6 +157,7 @@ const char index_html[] PROGMEM = R"rawliteral(
|
|||||||
<input type="hidden" name="inputTimeUnix" id="js_time_unix">
|
<input type="hidden" name="inputTimeUnix" id="js_time_unix">
|
||||||
|
|
||||||
<!-- Extra fields just in case I need them -->
|
<!-- Extra fields just in case I need them -->
|
||||||
|
<input type="hidden" name="inputWPM" value = %inputWPM%>
|
||||||
<input type="hidden" name="inputString" value = %inputString%>
|
<input type="hidden" name="inputString" value = %inputString%>
|
||||||
<input type="hidden" name="inputFloat" value = %inputFloat%>
|
<input type="hidden" name="inputFloat" value = %inputFloat%>
|
||||||
|
|
||||||
@ -247,8 +245,15 @@ String processor(const String& var){
|
|||||||
|
|
||||||
|
|
||||||
// Set up arduinomorse pin and default WPM
|
// Set up arduinomorse pin and default WPM
|
||||||
LEDMorseSender sender_blink(blinker, 10.0f); //f makes it a float
|
LEDMorseSender sender_blink(blinker, 10.0f) ; // the 'f' makes sure this is a float
|
||||||
LEDMorseSender sender_key(keyer, 10.0f);
|
LEDMorseSender sender_key(keyer, 10.0f) ; // the 'f' makes sure this is a float
|
||||||
|
|
||||||
|
// Speed is milliseconds per dit, which is 1000 * (60 / (50 * WPM))
|
||||||
|
// 60 is 20 wpm, 120 is 10 wpm, 90 is 15 wpm, etc.
|
||||||
|
// https://morsecode.world/international/timing.html
|
||||||
|
float wpm = 10;
|
||||||
|
float ms_per_dit = 1000 * (60 / (50 * wpm));
|
||||||
|
int word_space_ms = ms_per_dit * 7;
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
// setup(): stuff that only gets done once, after power up (KB1OIQ's description)
|
// setup(): stuff that only gets done once, after power up (KB1OIQ's description)
|
||||||
@ -310,16 +315,13 @@ void setup() {
|
|||||||
// Read in existing data
|
// Read in existing data
|
||||||
yourInputString = readFile(SPIFFS, "/inputString.txt");
|
yourInputString = readFile(SPIFFS, "/inputString.txt");
|
||||||
yourInputSend = readFile(SPIFFS, "/inputSend.txt").toInt();
|
yourInputSend = readFile(SPIFFS, "/inputSend.txt").toInt();
|
||||||
yourInputWPM = readFile(SPIFFS, "/inputWPM.txt").toFloat();
|
yourInputWPM = readFile(SPIFFS, "/inputWPM.txt").toInt();
|
||||||
yourInputMsg = readFile(SPIFFS, "/inputMsg.txt").toInt();
|
yourInputMsg = readFile(SPIFFS, "/inputMsg.txt").toInt();
|
||||||
yourInputFloat = readFile(SPIFFS, "/inputFloat.txt").toFloat();
|
yourInputFloat = readFile(SPIFFS, "/inputFloat.txt").toFloat();
|
||||||
yourInputStartTimeUnix = readFile(SPIFFS, "/inputStartTimeUnix.txt").toInt();
|
yourInputStartTimeUnix = readFile(SPIFFS, "/inputStartTimeUnix.txt").toInt();
|
||||||
yourInputStepLength = readFile(SPIFFS, "/inputStepLength.txt").toInt();
|
yourInputStepLength = readFile(SPIFFS, "/inputStepLength.txt").toInt();
|
||||||
yourInputCycleID = readFile(SPIFFS, "/inputCycleID.txt").toInt();
|
yourInputCycleID = readFile(SPIFFS, "/inputCycleID.txt").toInt();
|
||||||
yourInputNtransmitters = readFile(SPIFFS, "/inputNtransmitters.txt").toInt();
|
yourInputNtransmitters = readFile(SPIFFS, "/inputNtransmitters.txt").toInt();
|
||||||
// Set WPM from saved value
|
|
||||||
sender_blink.setWPM(yourInputWPM);
|
|
||||||
sender_key.setWPM(yourInputWPM);
|
|
||||||
|
|
||||||
// On restart, keep doing what you were doing before
|
// On restart, keep doing what you were doing before
|
||||||
yourInputMsg_old = yourInputMsg;
|
yourInputMsg_old = yourInputMsg;
|
||||||
@ -383,9 +385,7 @@ void setup() {
|
|||||||
if (request->hasParam(PARAM_WPM)) {
|
if (request->hasParam(PARAM_WPM)) {
|
||||||
inputMessage = request->getParam(PARAM_WPM)->value();
|
inputMessage = request->getParam(PARAM_WPM)->value();
|
||||||
writeFile(SPIFFS, "/inputWPM.txt", inputMessage.c_str());
|
writeFile(SPIFFS, "/inputWPM.txt", inputMessage.c_str());
|
||||||
yourInputWPM = inputMessage.toFloat();
|
yourInputWPM = inputMessage.toInt();
|
||||||
sender_blink.setWPM(yourInputWPM);
|
|
||||||
sender_key.setWPM(yourInputWPM);
|
|
||||||
}
|
}
|
||||||
// GET inputMsg value on <ESP_IP>/get?inputMsg=<inputMessage>
|
// GET inputMsg value on <ESP_IP>/get?inputMsg=<inputMessage>
|
||||||
if (request->hasParam(PARAM_MSG)) {
|
if (request->hasParam(PARAM_MSG)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user