Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit06f7790

Browse files
committed
clean up timing
1 parent660059c commit06f7790

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

‎examples/FirebaseMorse_ESP8266/FirebaseMorse_ESP8266.ino

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ void loop() {
7171
}
7272
int upTime =millis() - upStarted;
7373
if (upTime > shortMillis*3) {
74-
// A letter break is 3 * the length of a short (.). We give a lot of
75-
// lee way for poor morse-coders.
74+
// A letter break is 3 * the length of a short (.).
7675
if (currentLetter > morseToCharSize || morseToChar[currentLetter] =='\0') {
7776
Serial.println("Invalid morse char, ignoring");
7877
}else {
@@ -81,9 +80,7 @@ void loop() {
8180
Serial.println("Listening for new letter.");
8281
currentLetter = B1;
8382

84-
if (upTime > shortMillis *5) {
85-
// A word break is 7 * the length of a short(.). We are being generous and
86-
// accepting anything over 5.
83+
if (upTime > shortMillis *7) {
8784
currentMessage +="";
8885
}
8986
}// else the upTime < shortMillis we attribute to button bounce.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp