software opt

Dependencies:   Hexi_KW40Z Hexi_OLED_SSD1351

Fork of Hexi_BLE_Time by Adam S

Files at this revision

API Documentation at this revision

Comitter:
nrithya
Date:
Thu Jun 14 00:46:35 2018 +0000
Parent:
11:6776aca68628
Commit message:
software optimization

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 6776aca68628 -r b92c39b2c92a main.cpp
--- a/main.cpp	Tue Jun 12 18:35:12 2018 +0000
+++ b/main.cpp	Thu Jun 14 00:46:35 2018 +0000
@@ -34,9 +34,9 @@
 SSD1351 oled(PTB22,PTB21,PTC13,PTB20,PTE6, PTD15); /* (MOSI,SCLK,POWER,CS,RST,DC) */
 
 /*Create a Thread to handle sending BLE Sensor Data */ 
-Thread txThread;
-Thread broadcastThread;
-Thread resetBLE_Thread;
+//Thread txThread;
+//Thread broadcastThread;
+//Thread resetBLE_Thread;
 Thread displayTime_Thread;
 Thread update_clock_Thread;
 
@@ -194,7 +194,7 @@
     kw40z_device.attach_alert(&AlertReceived);
     
        
-    pc.printf("hello\n\r");
+    //pc.printf("hello\n\r");
     
     /* Turn on the backlight of the OLED Display */
     oled.DimScreenON();
@@ -225,7 +225,7 @@
 
     // txThread.start(txTask); /*Start transmitting Sensor Tag Data */
     
-    resetBLE_Thread.start(resetBLE);
+    //resetBLE_Thread.start(resetBLE);
     
     // displayTime_Thread.start(displayTime);
     
@@ -286,7 +286,7 @@
             minute_1d=token[3][4]-'0';
             second_2d=token[3][6]-'0';
             second_1d=token[3][7]-'0';
-            
+            sprintf(newtime_text, "%d%d:%d%d:%d%d.%d", hour_2d, hour_1d, minute_2d, minute_1d, second_2d, second_1d, second_dec);
             // pc.printf("%s\r\n", token[3]);
             // sprintf(token1,"%s",token[3]);
             // pc.printf("%s\r\n", token1);
@@ -300,7 +300,7 @@
             
         }
     
-          sprintf(newtime_text, "%d%d:%d%d:%d%d.%d", hour_2d, hour_1d, minute_2d, minute_1d, second_2d, second_1d, second_dec);
+          //sprintf(newtime_text, "%d%d:%d%d:%d%d.%d", hour_2d, hour_1d, minute_2d, minute_1d, second_2d, second_1d, second_dec);
         
             // sprintf(date_text,"%s %s %s",token[1],token[2],token[4]);
             // strcpy(time_text,token[3]);