Detach fix

Fork of SoftSerial by Erik -

Files at this revision

API Documentation at this revision

Comitter:
rsquires
Date:
Tue May 09 18:36:31 2017 +0000
Parent:
11:a0029614de72
Commit message:
Fixed detach

Changed in this revision

SoftSerial.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r a0029614de72 -r 55d78fef0327 SoftSerial.cpp
--- a/SoftSerial.cpp	Tue Apr 12 16:58:22 2016 +0000
+++ b/SoftSerial.cpp	Tue May 09 18:36:31 2017 +0000
@@ -23,10 +23,14 @@
 }
 
 SoftSerial::~SoftSerial() {
-    if (tx_en)
+    if (tx_en) {
+        txticker.detach();
         delete(tx);
-    if (rx_en)
+    }
+    if (rx_en) {
+        rxticker.detach();
         delete(rx);
+    }
 }
 
 void SoftSerial::baud(int baudrate) {