Changeset 41024


Ignore:
Timestamp:
10/13/17 19:23:21 (6 years ago)
Author:
gost
Message:

[plugins] ip-kamera test typ2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/instar/instar.h

    r41002 r41024  
    2424        char* tmpstr = NULL;
    2525        char* tempcam = NULL;
     26        char* tempcam1 = NULL;
    2627        char* position = NULL;
    2728        char* positionstop = NULL;
     
    3132       
    3233        if(actcam == 1)
     34        {
    3335                tempcam = cam1;
     36                tempcam1 = cam11;
     37        }
    3438        if(actcam == 2)
     39        {
    3540                tempcam = cam2;
     41                tempcam1 = cam21;
     42        }
     43        if(actcam == 3)
     44        {
     45                tempcam = cam3;
     46                tempcam1 = cam31;
     47        }
     48        if(actcam == 4)
     49        {
     50                tempcam = cam4;
     51                tempcam1 = cam41;
     52        }
    3653       
    3754        setfbtransparent(255);
     
    151168                        if((actcam == 1 && getconfigint("instar_1", NULL) == 2) || (actcam == 2 && getconfigint("instar_2", NULL) == 2) || (actcam == 3 && getconfigint("instar_3", NULL) == 2)  || (actcam == 4 && getconfigint("instar_4", NULL) == 2))
    152169                        {
    153                                 position = ostrcat("/cgi-bin/hi3510/preset.cgi?-act=goto&-status=1&-number=", "0", 0 , 0);
     170                                position = ostrcat("/cgi-bin/hi3510/preset.cgi?-act%3Dgoto%26-status%3D1%26-number%3D", "0", 0 , 0);
    154171                                ohnestop = 1;                   
    155172                        }
     
    163180                        if((actcam == 1 && getconfigint("instar_1", NULL) == 2) || (actcam == 2 && getconfigint("instar_2", NULL) == 2) || (actcam == 3 && getconfigint("instar_3", NULL) == 2)  || (actcam == 4 && getconfigint("instar_4", NULL) == 2))
    164181                        {
    165                                 position = ostrcat("/cgi-bin/hi3510/preset.cgi?-act=goto&-status=1&-number=", "1", 0 , 0);
     182                                position = ostrcat("/cgi-bin/hi3510/preset.cgi?-act%3Dgoto%26-status%3D1%26-number%3D", "1", 0 , 0);
    166183                                ohnestop = 1;                   
    167184                        }
     
    175192                        if((actcam == 1 && getconfigint("instar_1", NULL) == 2) || (actcam == 2 && getconfigint("instar_2", NULL) == 2) || (actcam == 3 && getconfigint("instar_3", NULL) == 2)  || (actcam == 4 && getconfigint("instar_4", NULL) == 2))
    176193                        {
    177                                 position = ostrcat("/cgi-bin/hi3510/preset.cgi?-act=goto&-status=1&-number=", "2", 0 , 0);
     194                                position = ostrcat("/cgi-bin/hi3510/preset.cgi?-act%3Dgoto%26-status%3D1%26-number%3D", "2", 0 , 0);
    178195                                ohnestop = 1;                   
    179196                        }
     
    187204                        if((actcam == 1 && getconfigint("instar_1", NULL) == 2) || (actcam == 2 && getconfigint("instar_2", NULL) == 2) || (actcam == 3 && getconfigint("instar_3", NULL) == 2)  || (actcam == 4 && getconfigint("instar_4", NULL) == 2))
    188205                        {
    189                                 position = ostrcat("/cgi-bin/hi3510/preset.cgi?-act=goto&-status=1&-number=", "3", 0 , 0);
     206                                position = ostrcat("/cgi-bin/hi3510/preset.cgi?-act%3Dgoto%26-status%3D1%26-number%3D", "3", 0 , 0);
    190207                                ohnestop = 1;                   
    191208                        }
     
    199216                        if((actcam == 1 && getconfigint("instar_1", NULL) == 2) || (actcam == 2 && getconfigint("instar_2", NULL) == 2) || (actcam == 3 && getconfigint("instar_3", NULL) == 2)  || (actcam == 4 && getconfigint("instar_4", NULL) == 2))
    200217                        {
    201                                 position = ostrcat("/cgi-bin/hi3510/preset.cgi?-act=goto&-status=1&-number=", "4", 0 , 0);
     218                                position = ostrcat("/cgi-bin/hi3510/preset.cgi?-act%3Dgoto%26-status%3D1%26-number%3D", "4", 0 , 0);
    202219                                ohnestop = 1;                   
    203220                        }
     
    211228                        if((actcam == 1 && getconfigint("instar_1", NULL) == 2) || (actcam == 2 && getconfigint("instar_2", NULL) == 2) || (actcam == 3 && getconfigint("instar_3", NULL) == 2)  || (actcam == 4 && getconfigint("instar_4", NULL) == 2))
    212229                        {
    213                                 position = ostrcat("/cgi-bin/hi3510/preset.cgi?-act=goto&-status=1&-number=", "5", 0 , 0);
     230                                position = ostrcat("/cgi-bin/hi3510/preset.cgi?-act%3Dgoto%26-status%3D1%26-number%3D", "5", 0 , 0);
    214231                                ohnestop = 1;                   
    215232                        }
     
    223240                        if((actcam == 1 && getconfigint("instar_1", NULL) == 2) || (actcam == 2 && getconfigint("instar_2", NULL) == 2) || (actcam == 3 && getconfigint("instar_3", NULL) == 2)  || (actcam == 4 && getconfigint("instar_4", NULL) == 2))
    224241                        {
    225                                 position = ostrcat("/cgi-bin/hi3510/preset.cgi?-act=goto&-status=1&-number=", "6", 0 , 0);
     242                                position = ostrcat("/cgi-bin/hi3510/preset.cgi?-act%3Dgoto%26-status%3D1%26-number%3D", "6", 0 , 0);
    226243                                ohnestop = 1;                   
    227244                        }
     
    235252                        if((actcam == 1 && getconfigint("instar_1", NULL) == 2) || (actcam == 2 && getconfigint("instar_2", NULL) == 2) || (actcam == 3 && getconfigint("instar_3", NULL) == 2)  || (actcam == 4 && getconfigint("instar_4", NULL) == 2))
    236253                        {
    237                                 position = ostrcat("/cgi-bin/hi3510/preset.cgi?-act=goto&-status=1&-number=", "7", 0 , 0);
     254                                position = ostrcat("/cgi-bin/hi3510/preset.cgi?-act%3Dgoto%26-status%3D1%26-number%3D", "7", 0 , 0);
    238255                                ohnestop = 1;                   
    239256                        }
     
    247264                        if((actcam == 1 && getconfigint("instar_1", NULL) == 2) || (actcam == 2 && getconfigint("instar_2", NULL) == 2) || (actcam == 3 && getconfigint("instar_3", NULL) == 2)  || (actcam == 4 && getconfigint("instar_4", NULL) == 2))
    248265                        {
    249                                 position = ostrcat("/cgi-bin/hi3510/preset.cgi?-act=goto&-status=1&-number=", "8", 0 , 0);
     266                                position = ostrcat("/cgi-bin/hi3510/preset.cgi?-act%3Dgoto%26-status%3D1%26-number%3D", "8", 0 , 0);
    250267                                ohnestop = 1;                   
    251268                        }
     
    261278                                if((actcam == 1 && getconfigint("instar_1", NULL) == 2) || (actcam == 2 && getconfigint("instar_2", NULL) == 2) || (actcam == 3 && getconfigint("instar_3", NULL) == 2)  || (actcam == 4 && getconfigint("instar_4", NULL) == 2))
    262279                                {
    263                                         position = ostrcat("/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=", "up", 0 , 0);
    264                                         positionstop = ostrcat("/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=", "stop", 0 , 0);
     280                                        position = ostrcat("/cgi-bin/hi3510/ptzctrl.cgi?-step%3D0%26-act%3D", "up", 0 , 0);
     281                                        positionstop = ostrcat("/cgi-bin/hi3510/ptzctrl.cgi?-step%3D0%26-act%3D", "stop", 0 , 0);
    265282                                }
    266283                                else
     
    273290                                if((actcam == 1 && getconfigint("instar_1", NULL) == 2) || (actcam == 2 && getconfigint("instar_2", NULL) == 2) || (actcam == 3 && getconfigint("instar_3", NULL) == 2)  || (actcam == 4 && getconfigint("instar_4", NULL) == 2))
    274291                                {
    275                                         position = ostrcat("/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=", "down", 0 , 0);
    276                                         positionstop = ostrcat("/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=", "stop", 0 , 0);
     292                                        position = ostrcat("/cgi-bin/hi3510/ptzctrl.cgi?-step%3D0%26-act%3D", "down", 0 , 0);
     293                                        positionstop = ostrcat("/cgi-bin/hi3510/ptzctrl.cgi?-step%3D0%26-act%3D", "stop", 0 , 0);
    277294                                }
    278295                                else
     
    285302                                if((actcam == 1 && getconfigint("instar_1", NULL) == 2) || (actcam == 2 && getconfigint("instar_2", NULL) == 2) || (actcam == 3 && getconfigint("instar_3", NULL) == 2)  || (actcam == 4 && getconfigint("instar_4", NULL) == 2))
    286303                                {
    287                                         position = ostrcat("/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=", "left", 0 , 0);
    288                                         positionstop = ostrcat("/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=", "stop", 0 , 0);
     304                                        position = ostrcat("/cgi-bin/hi3510/ptzctrl.cgi?-step%3D0%26-act%3D", "left", 0 , 0);
     305                                        positionstop = ostrcat("/cgi-bin/hi3510/ptzctrl.cgi?-step%3D0%26-act%3D", "stop", 0 , 0);
    289306                                }
    290307                                else
     
    297314                                if((actcam == 1 && getconfigint("instar_1", NULL) == 2) || (actcam == 2 && getconfigint("instar_2", NULL) == 2) || (actcam == 3 && getconfigint("instar_3", NULL) == 2)  || (actcam == 4 && getconfigint("instar_4", NULL) == 2))
    298315                                {
    299                                         position = ostrcat("/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=", "right", 0 , 0);
    300                                         positionstop = ostrcat("/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=", "stop", 0 , 0);
     316                                        position = ostrcat("/cgi-bin/hi3510/ptzctrl.cgi?-step%3D0%26-act%3D", "right", 0 , 0);
     317                                        positionstop = ostrcat("/cgi-bin/hi3510/ptzctrl.cgi?-step%3D0%26-act%3D", "stop", 0 , 0);
    301318                                }
    302319                                else
     
    321338                        {
    322339                                tmpstr = ostrcat(tempcam, positionstop, 0, 0);
     340                                if(tempcam1 != NULL)
     341                                        tmpstr = ostrcat(tmpstr, tempcam1, 1, 0);
    323342                                system(tmpstr);
    324343                                free(tmpstr); tmpstr = NULL;   
     
    328347                        {
    329348                                tmpstr = ostrcat(tempcam, position, 0, 0);
     349                                if(tempcam1 != NULL)
     350                                        tmpstr = ostrcat(tmpstr, tempcam1, 1, 0);
    330351                                system(tmpstr);
    331352                                free(tmpstr); tmpstr = NULL;   
     
    335356                        {
    336357                                tmpstr = ostrcat(tempcam, positionstop, 0, 0);
     358                                if(tempcam1 != NULL)
     359                                        tmpstr = ostrcat(tmpstr, tempcam1, 1, 0);
    337360                                system(tmpstr);
    338361                                free(tmpstr); tmpstr = NULL;   
Note: See TracChangeset for help on using the changeset viewer.