Changeset 15385


Ignore:
Timestamp:
04/27/12 21:37:36 (11 years ago)
Author:
gost
Message:

[lcdpearl] adjustable

Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • ipk/source.sh4/titanswaptools_lcdpearl1/CONTROL/control

    r14386 r15385  
    11Package: titan-plugin-swaptools-pearllcd
    2 Version: 2.3
    3 Description: Treiber fuer Pearl LCD V2.3
     2Version: 3.0
     3Description: Treiber fuer Pearl LCD V3.0
    44Section: tools
    55Priority: optional
  • titan/plugins/lcdpearl1/lcdpearl1.c

    r15348 r15385  
    1313struct stimerthread* LCD_Pearl1thread = NULL;
    1414int firststart = 0;
    15 int draw = 0;
    1615
    1716void LCD_start_lcd4linux()
     
    1918        int count = 0;
    2019        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
    2621        if(LCD_Pearl1thread == NULL)
    2722                return;
     
    7166                sleep(8);
    7267        firststart = 0;
    73         draw = 0;
    7468        status.write_png = 0;
    7569        if(ostrcmp(getconfig("write_fb_to_png", NULL), "yes") == 0)
     
    8074                tmpstr = gettime(NULL, "%H:%M");
    8175               
     76                // TV Programm läuft
    8277                if(status.infobaraktiv == 1)
    8378                {
     
    8883                        type = 1;
    8984                }
     85                // Aufzeichnung wird abgespielt
    9086                else if(status.playspeed != 0 || status.play != 0 || status.pause != 0)
    9187                {
     
    9490                        type = 2;
    9591                }
     92                // Sonstige Anzeigen
    9693                else
    9794                {
     
    111108                else
    112109                        put = 0;
    113                
    114                 if(draw == 0)
    115                         put = 1;
    116                
     110
    117111                if(status.security == 1)
    118112                {
     
    170164                                        {
    171165                                                changetext(akttime, tmpstr);
    172                                                 if(drawscreen(LCD_Pearl1, 0) == 0)
    173                                                         draw = 1;
    174                                                 else
    175                                                         draw = 0;
     166                                                drawscreen(LCD_Pearl1, 0);
     167
    176168                                                //system(fbgrab);
    177169                                                //system("mv /tmp/.titanlcd1.png /tmp/titanlcd.png");
     
    221213                                                changetext(akttimeplay, tmpstr);
    222214                                                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
    228217                                        //else if(type == 999 && status.mcaktiv == 1)
    229218                                        //else if(type == 999) 
     
    232221                                                //drawscreen(LCD_MC_Menu, 3);
    233222                                        //}
     223                                        }
    234224                                }
    235225                        }
     
    263253                system(tmpstr);
    264254                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);
    266256                addconfig("lcd_pearl1_plugin_running", "yes");
    267257                LCD_Pearl1thread = addtimer(&LCD_Pearl1_thread, START, 10000, 1, NULL, NULL, NULL);
     
    271261        else
    272262        {
    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                //{
    275265                        LCD_Pearl1thread->aktion = STOP;
    276266                        system("echo ende > /tmp/titanlcd.png");
    277267                        sleep(1);
    278268                        system("killall lcd4linux");
    279                 }
     269                //}
    280270        }
    281271}       
     
    313303void start(void)
    314304{
    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
    19<screen halign=center fontcol=fontcol fontsize=30 name=LCD_Pearl1 posx=0 posy=0 width=320 height=240 bgcol=bgcol>
    210<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.