A Ton (Timer On) is used to provide an \'on delay\' system so as to avoid using wait()

Dependents:   NEWlcd_menu_v2 Garage_Control

Files at this revision

API Documentation at this revision

Comitter:
AjK
Date:
Fri Mar 04 14:15:47 2011 +0000
Parent:
2:aa908ad1559a
Commit message:
1.3 See ChangeLog.h

Changed in this revision

ChangeLog.h Show annotated file Show diff for this revision Revisions of this file
Ton.h Show annotated file Show diff for this revision Revisions of this file
diff -r aa908ad1559a -r 123a1b30970a ChangeLog.h
--- a/ChangeLog.h	Fri Mar 04 13:43:51 2011 +0000
+++ b/ChangeLog.h	Fri Mar 04 14:15:47 2011 +0000
@@ -1,5 +1,8 @@
 /* $Id:$
 
+1.3     04/Mar/2011
+        Coded out a compiler warning.
+        
 1.2     04/Mar/2011
         Added the isRunning() method.
         
diff -r aa908ad1559a -r 123a1b30970a Ton.h
--- a/Ton.h	Fri Mar 04 13:43:51 2011 +0000
+++ b/Ton.h	Fri Mar 04 14:15:47 2011 +0000
@@ -93,13 +93,15 @@
      * @return true if active, false otherwise.
      */
     bool isRunning(void) {
+        bool b = false;
         switch (_mode) {
         case InputResets:
-            return _lastInput;
+            b = _lastInput;
             break;
         case InputPauses:
-            return _counter > 0;
+            b = _counter > 0;
         }
+        return b;
     }
     
     /** setTime