Skip to content
Browse files

When stopping a message midstream with setMessage(String()), make sur…

…e not to leave a sender on (stop cleanly).
  • Loading branch information...
1 parent c2dc61f commit 58c52f59ddd8aa89e11f34f3f6b33f07490ed419 @markfickett committed Feb 21, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 morse.cpp
View
5 morse.cpp
@@ -114,6 +114,11 @@ void MorseSender::setMessage(const String newMessage)
// Force startSending() before continueSending().
messageIndex = message.length();
+
+ // If a different message was in progress, make sure it stops cleanly.
+ if (timingIndex % 2 == 0) {
+ setOff();
+ }
}
void MorseSender::sendBlocking()

0 comments on commit 58c52f5

Please sign in to comment.
Something went wrong with that request. Please try again.