Changeset 17421 for titan/plugins/lcdpearl1/lcdpearl1.c
- Timestamp:
- 08/02/12 19:45:52 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/lcdpearl1/lcdpearl1.c
r17097 r17421 54 54 55 55 struct skin* LCD_Pearl1 = NULL; 56 struct skin* LCD_Pearl1_Standby = NULL; 56 57 struct skin* day0_t = NULL; 57 58 struct skin* day0_i = NULL; … … 63 64 struct skin* day3_i = NULL; 64 65 struct skin* akttime = NULL; 66 struct skin* akttime_Standby = NULL; 65 67 66 68 … … 68 70 FILE *fd = NULL; 69 71 char *fileline = NULL; 70 int weatherwrite = 0;72 int weatherwrite = 999; 71 73 72 74 if(ostrcmp(getconfig("lcd_pearl1_plugin_wetter", NULL), "yes") == 0) … … 83 85 if(file_exist("/tmp/lcdweather") == 1) 84 86 system("rm /tmp/lcdweather"); 87 weatherwrite = 0; 85 88 } 86 89 else … … 98 101 //struct skin* LCD_MC_Menu = getscreen("LCD_MC_Menu"); 99 102 //struct skin* akttimemc1 = getscreennode(LCD_MC_Menu, "akttime"); 103 104 105 if(ostrcmp(getconfig("lcd_pearl1_plugin_standby", NULL), "yes") == 0) 106 { 107 LCD_Pearl1_Standby = getscreen("LCD_Pearl1_Standby"); 108 akttime_Standby = getscreennode(LCD_Pearl1_Standby, "akttime"); 109 } 100 110 101 111 int put = 0, typemerk = 0, type = 0; … … 158 168 if(status.standby == 1 && standby == 0) 159 169 { 160 system("killall lcd4linux"); 161 standby = 1; 170 if(ostrcmp(getconfig("lcd_pearl1_plugin_standby", NULL), "yes") == 0) 171 standby = 2; 172 else { 173 system("killall lcd4linux"); 174 standby = 1; 175 } 162 176 } 163 if(status.standby == 0 && standby == 1) 164 { 165 system(startlcd); 177 if(status.standby == 0 && standby > 0) 178 { 179 if(standby == 1) 180 system(startlcd); 166 181 standby = 0; 182 put = 1; 167 183 } 168 184 185 if(weatherthread == NULL && weatherwrite == 0) 186 { 187 if(file_exist("/tmp/lcdweather") != 0) 188 put = 1; 189 } 190 191 if(ostrcmp(tmpstr, timemerk) != 0) 192 { 193 free(timemerk);timemerk=NULL; 194 timemerk = ostrcat(tmpstr, "", 0, 0); 195 put = 1; 196 } 197 169 198 if(standby == 0) 170 199 { 171 if(ostrcmp(tmpstr, timemerk) != 0)172 {173 free(timemerk);timemerk=NULL;174 timemerk = ostrcat(tmpstr, "", 0, 0);175 put = 1;176 }177 200 if(type == 1) 178 201 { … … 323 346 } 324 347 } 348 else 349 { 350 if(standby == 2) 351 { 352 if(put == 1) 353 { 354 changetext(akttime_Standby, tmpstr); 355 drawscreen(LCD_Pearl1_Standby, 0, 0); 356 put = 0; 357 } 358 } 359 } 325 360 } 326 361 free(tmpstr); tmpstr = NULL; … … 405 440 struct skin* listbox = getscreennode(pearl1_main, "listbox"); 406 441 struct skin* allmenu = getscreennode(pearl1_main, "allmenu"); 442 struct skin* aktstandby = getscreennode(pearl1_main, "aktstandby"); 407 443 struct skin* wettervor = getscreennode(pearl1_main, "wettervor"); 408 444 struct skin* wettervorplz = getscreennode(pearl1_main, "wettervorplz"); … … 425 461 setchoiceboxselection(allmenu, getconfig("write_fb_to_png", NULL)); 426 462 463 addchoicebox(aktstandby, "no", _("nein")); 464 addchoicebox(aktstandby, "yes", _("ja")); 465 setchoiceboxselection(aktstandby, getconfig("lcd_pearl1_plugin_standby", NULL)); 466 427 467 addchoicebox(wettervor, "no", _("nein")); 428 468 addchoicebox(wettervor, "yes", _("ja")); … … 476 516 { 477 517 addconfig("write_fb_to_png", allmenu->ret); 518 addconfig("lcd_pearl1_plugin_standby", aktstandby->ret); 478 519 addconfig("lcd_pearl1_plugin_wetter", wettervor->ret); 479 520 addconfig("lcd_pearl1_plugin_wetterplz", wettervorplz->ret);
Note: See TracChangeset
for help on using the changeset viewer.