Преглед изворни кода

fixed forever displaying bob ross.

Aareschluchtje пре 9 година
родитељ
комит
8a315f873b
2 измењених фајлова са 13 додато и 2 уклоњено
  1. 7 1
      contentparser.c
  2. 6 1
      main.c

+ 7 - 1
contentparser.c

@@ -9,6 +9,8 @@
 #include "alarm.h"
 #include "displayHandler.h"
 
+int streamid;
+
 void parseAlarmJson(char* content){
     int r;
     int i = 2;
@@ -100,7 +102,7 @@ void parseAlarmJson(char* content){
 
 void parsetimezone(char* content)
 {
-    int timezone = atoi(content);
+    int timezone = atoi(content); //parsing string to int (only works when everything is int)
     setTimeZone(timezone);
 }
 
@@ -149,6 +151,10 @@ void parseTwitch(char* content)
             getStringToken(content, &token[i+1], game, 20);
             i++;
         }
+        else if(jsoneq(content, &token[i], "Date") == 0)
+        {
+            //convert date to int
+        }
     }
 
     printf("%s - %s - %s", name, title, game);

+ 6 - 1
main.c

@@ -398,6 +398,11 @@ int main(void)
 				}
 			}
 		}else if(isDisplayingCustomMessage() == true){
+            if(timerStruct(timeCheck) >= 5)
+            {
+                setDisplayingCustomMessage(false);
+                LcdBackLight(LCD_BACKLIGHT_OFF);
+            }
 
         }
 		else if (timerStruct(timeCheck) >= 5){
@@ -408,4 +413,4 @@ int main(void)
         WatchDogRestart();
     }
     return(0);
-}
+}