Changeset 15385
- Timestamp:
- 04/27/12 21:37:36 (11 years ago)
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ipk/source.sh4/titanswaptools_lcdpearl1/CONTROL/control
r14386 r15385 1 1 Package: titan-plugin-swaptools-pearllcd 2 Version: 2.33 Description: Treiber fuer Pearl LCD V 2.32 Version: 3.0 3 Description: Treiber fuer Pearl LCD V3.0 4 4 Section: tools 5 5 Priority: optional -
titan/plugins/lcdpearl1/lcdpearl1.c
r15348 r15385 13 13 struct stimerthread* LCD_Pearl1thread = NULL; 14 14 int firststart = 0; 15 int draw = 0;16 15 17 16 void LCD_start_lcd4linux() … … 19 18 int count = 0; 20 19 char* startlcd = ostrcat(getconfig("pluginpath", NULL), "/lcdpearl1/start.sh", 0, 0); 21 /* while (draw == 0 && LCD_Pearl1thread != NULL) 22 { 23 sleep(1); 24 } 25 sleep(2);*/ 20 26 21 if(LCD_Pearl1thread == NULL) 27 22 return; … … 71 66 sleep(8); 72 67 firststart = 0; 73 draw = 0;74 68 status.write_png = 0; 75 69 if(ostrcmp(getconfig("write_fb_to_png", NULL), "yes") == 0) … … 80 74 tmpstr = gettime(NULL, "%H:%M"); 81 75 76 // TV Programm läuft 82 77 if(status.infobaraktiv == 1) 83 78 { … … 88 83 type = 1; 89 84 } 85 // Aufzeichnung wird abgespielt 90 86 else if(status.playspeed != 0 || status.play != 0 || status.pause != 0) 91 87 { … … 94 90 type = 2; 95 91 } 92 // Sonstige Anzeigen 96 93 else 97 94 { … … 111 108 else 112 109 put = 0; 113 114 if(draw == 0) 115 put = 1; 116 110 117 111 if(status.security == 1) 118 112 { … … 170 164 { 171 165 changetext(akttime, tmpstr); 172 if(drawscreen(LCD_Pearl1, 0) == 0) 173 draw = 1; 174 else 175 draw = 0; 166 drawscreen(LCD_Pearl1, 0); 167 176 168 //system(fbgrab); 177 169 //system("mv /tmp/.titanlcd1.png /tmp/titanlcd.png"); … … 221 213 changetext(akttimeplay, tmpstr); 222 214 changetext(stitle, basename(status.playfile)); 223 if (drawscreen(LCD_Play, 0) == 0) 224 draw = 1; 225 else 226 draw = 0; 227 } 215 drawscreen(LCD_Play, 0); 216 228 217 //else if(type == 999 && status.mcaktiv == 1) 229 218 //else if(type == 999) … … 232 221 //drawscreen(LCD_MC_Menu, 3); 233 222 //} 223 } 234 224 } 235 225 } … … 263 253 system(tmpstr); 264 254 free(tmpstr); tmpstr=NULL; 265 textbox(_("Message"), _("LCD Pearl1 starts ..."), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 600, 200, 5, 0);255 //textbox(_("Message"), _("LCD Pearl1 starts ..."), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 600, 200, 5, 0); 266 256 addconfig("lcd_pearl1_plugin_running", "yes"); 267 257 LCD_Pearl1thread = addtimer(&LCD_Pearl1_thread, START, 10000, 1, NULL, NULL, NULL); … … 271 261 else 272 262 { 273 if (textbox(_("Message"), _("Stop LCD Pearl1 ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("exit", NULL), NULL, 0, NULL, 0, 600, 200, 5, 0) != 2);274 {263 //if (textbox(_("Message"), _("Stop LCD Pearl1 ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("exit", NULL), NULL, 0, NULL, 0, 600, 200, 5, 0) != 2); 264 //{ 275 265 LCD_Pearl1thread->aktion = STOP; 276 266 system("echo ende > /tmp/titanlcd.png"); 277 267 sleep(1); 278 268 system("killall lcd4linux"); 279 }269 //} 280 270 } 281 271 } … … 313 303 void start(void) 314 304 { 315 LCD_Pearl1_main(); 316 } 305 struct skin* pearl1_main = getscreen("pearl1_main"); 306 struct skin* listbox = getscreennode(pearl1_main, "listbox"); 307 struct skin* allmenu = getscreennode(pearl1_main, "allmenu"); 308 struct skin* b3 = getscreennode(pearl1_main, "b3"); 309 struct skin* tmp = NULL; 310 311 int rcret = 0; 312 int startstop = 0; 313 int restart = 0; 314 315 addchoicebox(allmenu, "no", _("nein")); 316 addchoicebox(allmenu, "yes", _("ja")); 317 setchoiceboxselection(allmenu, getconfig("write_fb_to_png", NULL)); 318 319 if(LCD_Pearl1thread != NULL) 320 changetext(b3, "STOP"); 321 else 322 changetext(b3, "START"); 323 324 drawscreen(pearl1_main, 0); 325 addscreenrc(pearl1_main, listbox); 326 tmp = listbox->select; 327 328 while(1) 329 { 330 addscreenrc(pearl1_main, tmp); 331 rcret = waitrc(pearl1_main, 0, 0); 332 tmp = listbox->select; 333 334 if(rcret == getrcconfigint("rcexit", NULL)) 335 break; 336 if(rcret == getrcconfigint("rcgreen", NULL)) 337 { 338 addconfig("write_fb_to_png", allmenu->ret); 339 restart = 1; 340 break; 341 } 342 343 if(rcret == getrcconfigint("rcblue", NULL)) 344 { 345 startstop = 1; 346 break; 347 } 348 } 349 delownerrc(pearl1_main); 350 clearscreen(pearl1_main); 351 352 if(LCD_Pearl1thread != NULL && restart == 1) 353 { 354 LCD_Pearl1thread->aktion = STOP; 355 sleep(2); 356 LCD_Pearl1thread = addtimer(&LCD_Pearl1_thread, START, 10000, 1, NULL, NULL, NULL); 357 sleep(1); 358 return; 359 } 360 if(startstop == 1) 361 { 362 if(LCD_Pearl1thread != NULL) 363 { 364 addconfig("lcd_pearl1_plugin_running", "no"); 365 LCD_Pearl1thread->aktion = STOP; 366 sleep(1); 367 system("killall lcd4linux"); 368 debug(10, "LCD Pearl1 unloadet !!!"); 369 sleep(1); 370 } 371 else { 372 addconfig("lcd_pearl1_plugin_running", "yes"); 373 LCD_Pearl1thread = addtimer(&LCD_Pearl1_thread, START, 10000, 1, NULL, NULL, NULL); 374 addtimer(&LCD_start_lcd4linux, START, 10000, 1, NULL, NULL, NULL); 375 sleep(1); 376 } 377 } 378 return; 379 } 380 -
titan/skins/lcdpearl1/skin.xml
r14052 r15385 1 <screen name="pearl1_main" title="Pearl LCD Settings" titlealign=center fontcol=fontcol valign=bottom fontsize=30 posx=center posy=center width=50% height=40% bordercol=bordercol bordersize=2 bgcol=bgcol> 2 <node bordercol=bordercol scrollbar=auto type=listbox posy=center posx=center name=listbox width=85% height=70%> 3 <node name=allmenu type=choicebox parent=listbox valign=middle posx=0 text="alle Menus anzeigen" bordercol=bordercol bordersize=2 width=100% height=25> 4 <node name=b1 text=SAVE halign=center valign=middle bordercol=green bordersize=2 bordertype=2 posx=0 posy=0 width=150 height=30/> 5 <node name=b2 text=EXIT halign=center valign=middle bordercol=exitcol bordersize=2 bordertype=2 posx=160 posy=0 width=150 height=30/> 6 <node name=b3 text=START halign=center valign=middle bordercol=blue bordersize=2 bordertype=2 posx=400 posy=0 width=200 height=30/> 7 </screen> 8 1 9 <screen halign=center fontcol=fontcol fontsize=30 name=LCD_Pearl1 posx=0 posy=0 width=320 height=240 bgcol=bgcol> 2 10 <node fontsize=40 halign=center text="" func=getaktchannelname name=channelname posx=5 posy=5 width=310 height=40 fontcol=fontcol/>
Note: See TracChangeset
for help on using the changeset viewer.