Selaa lähdekoodia

bug backlight fix

MalekSediqi 9 vuotta sitten
vanhempi
commit
3a35c5caf5
3 muutettua tiedostoa jossa 4 lisäystä ja 9 poistoa
  1. 3 7
      displayHandler.c
  2. 0 1
      gotosleep.c
  3. 1 1
      main.c

+ 3 - 7
displayHandler.c

@@ -32,7 +32,7 @@ viewDisplays getCurrentDisplay(void){
 }
 
 void refreshScreen(){
-    if(timerStruct(lastDisplayTime) > displayTime){
+    if(timerStruct(lastDisplayTime) > displayTime && currentViewDisplay != DISPLAY_Alarm){
         currentViewDisplay = DISPLAY_DateTime;
         LcdBackLight(LCD_BACKLIGHT_OFF);
     }
@@ -59,9 +59,9 @@ long timerStruct(struct _tm s){
     long stime = (s.tm_hour * 3600) + (s.tm_min * 60) + s.tm_sec;
     long ctime = (ct.tm_hour * 3600) + (ct.tm_min * 60) + ct.tm_sec;
 
-    if(ctime < 0){
+ /*   if(ctime < 0){
         return 0;
-    }
+    }*/
     
     return ctime - stime;
 }
@@ -134,16 +134,12 @@ void displayVolume()
 
 void displayTwitter(char* text)
 {
-    //int lineNumber,char text[]
     ClearLcd();
     LcdBackLight(LCD_BACKLIGHT_ON);
     LcdArrayLineOne("     Twitter    ", 16);
     int j = 0;
     int i;
     char text1[16];
-    //char text2[140] = text;
-   // int shift = 0;
-    //char *text = "Twitter";
     for(i = 0; i<140;i++){
         if (text[i] != 0){
             j++;

+ 0 - 1
gotosleep.c

@@ -101,7 +101,6 @@ void playChanel(void){
       connectToStream("62.195.226.247",80,"/test7.mp3");
 	  play();
       break;
-	4 10 11
    case 2  :
       connectToStream("62.195.226.247",80,"/test5.mp3");
 	  play();

+ 1 - 1
main.c

@@ -236,6 +236,7 @@ THREAD(AlarmSync, arg)
             char url[49];
             sprintf(url, "/getAlarmen.php?radiomac=%s&tz=%d", getMacAdress(), getTimeZone());
             httpGet(url, parseAlarmJson);
+            isAlarmSyncing = false;
 
             char url2[43];
             sprintf(url2, "/getTwitch.php?radiomac=%s", getMacAdress());
@@ -244,7 +245,6 @@ THREAD(AlarmSync, arg)
             sprintf(url3,"/getTwitter.php?radiomac=%s", getMacAdress());
             httpGet(url3,TwitterParser);
 
-            isAlarmSyncing = false;
             //Command que (Telegram) sync
             sprintf(url, "%s%s", "/getCommands.php?radiomac=", getMacAdress());
             httpGet(url, parseCommandQue);