Practice your morse code.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
john78727
Date:
Fri Jun 28 10:57:07 2013 +0000
Parent:
4:6840cc0ea570
Commit message:
Revised syntax for multiple assignment. Tony you were correct on the original :-)

Changed in this revision

Morse_Code.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Morse_Code.cpp	Thu Jun 27 19:54:40 2013 +0000
+++ b/Morse_Code.cpp	Fri Jun 28 10:57:07 2013 +0000
@@ -552,15 +552,11 @@
     if ( _colour == 1 ) blue  = on;
     if ( _colour == 2 ) red   = on ;
     if ( _colour == 3 ) green = on;
-    if ( _colour == 4 ) { blue = on; red = on; green = on }
+    if ( _colour == 4 ) blue = red = green = on;
 
     Tone ( _Tone_Frequency, u, 1.0 );
 
-    blue = off;
-    
-    red = off;
-    
-    green = off ;
+    blue = red = green = off ;
   
    }
   
@@ -571,15 +567,11 @@
     if ( _colour == 1 ) blue = on;
     if ( _colour == 2 ) red = on;
     if ( _colour == 3 ) green = on;
-    if ( _colour == 4 ) { blue = on; red = on; green = on; }
+    if ( _colour == 4 ) blue = red = green = on;
 
     Tone ( _Tone_Frequency, u, 3.0 );
 
-    blue = off;
-    
-    red = off;
-    
-    green = off ;
+    blue = red = green = off ;
   
     }