max32630

Dependencies:   OLED USBDevice max32630fthr

Fork of FTHR_OLED by Greg Steiert

Files at this revision

API Documentation at this revision

Comitter:
feilang
Date:
Sat Sep 30 06:24:55 2017 +0000
Parent:
14:9cfad5e99b5c
Commit message:
??595????????

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 9cfad5e99b5c -r d346e81089ac main.cpp
--- a/main.cpp	Wed Sep 27 15:51:08 2017 +0000
+++ b/main.cpp	Sat Sep 30 06:24:55 2017 +0000
@@ -97,7 +97,8 @@
         daplink.printf("date for shirtf:%d\n",airDisplayDate);
         ledEnable = 1;
         ledEnable = 0;
-        shirftDate( ~airDisplayDate );
+        shirftDate( (~airDisplayDate)<<4 );
+        Thread::wait(500); 
         //shirftDate( 0x00ffff);
         
         while((pm25 > 100)||(fireAir > 1)||(alcohol > 1)){
@@ -123,13 +124,14 @@
 void shirftDate(unsigned int date){
     unsigned int _date = date;
     //_date &= 0xfffff;
-    for( int i = 24; i > 0; i-- ){
+    for( int i = 24; i >= 0; i-- ){
         if( _date  & (0x01 << i ) ){
             ledbardat = 1;            
         }else{
             ledbardat = 0;
         }
        // daplink.printf("date ledbardat:%d\n",ledbardat);
+        Thread::wait(0.5);
         ledbarClk = 0;
         Thread::wait(0.5);
         ledbarClk = 1;