Kojo / DigitalClock

Dependents:   IF-SmartClock

Revision:
2:c374349d4902
Parent:
1:3c9a2c4733fa
Child:
3:ad3301aff314
--- a/DigitalClock.h	Fri Jun 26 08:00:03 2015 +0000
+++ b/DigitalClock.h	Wed Jul 01 22:04:21 2015 +0000
@@ -3,7 +3,7 @@
 
 #include "FourDigitLED.h"
 
-class DigitalClock : FourDigitLED {
+class DigitalClock : public FourDigitLED {
 public:
     DigitalClock 
        (PinName seg0, PinName seg1, PinName seg2, PinName seg3, PinName seg4, PinName seg5, PinName seg6, 
@@ -14,9 +14,10 @@
     void flashLED(void) ;
     bool setLED(int h, int min) ;
     void setBlink(bool) ;
-    int setNum(int d, int n) ;
-    int setDot(int d, bool n) ;
-    
+    void setOptVal(const int index, const unsigned int v[], int times)  ;
+    bool optionActive ;
+    int  optionCount ;   
+
 private:
 //    void secTick(void) ;
     int hour ;
@@ -24,8 +25,12 @@
     int sec  ;
     int maxHour ;
     bool blink ;
-    bool basePulse ;
-    
+    int basePulse ;
+
+    #define AC_OPTION_NUM (16*4)
+    unsigned int optVal[AC_OPTION_NUM][4] ;
+    int optTimes[AC_OPTION_NUM] ;
+    int optNum ;
     SegmentValue now ;
     Ticker Second ;
     FourDigitLED *led ;