Changeset 16140 for titan/plugins/instar/instar.h
- Timestamp:
- 05/29/12 20:06:51 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/instar/instar.h
r16118 r16140 15 15 char* tempcam = NULL; 16 16 char* position = NULL; 17 char* positionstop = NULL; 17 18 int rcret = 0; 18 19 int rcode = 0; 20 int ohnestop = 0; 19 21 20 22 if(actcam == 1) … … 41 43 42 44 drawscreen(instar_screen, 0); 43 rcret = waitrc(instar_screen, 250, 0); 45 rcret = waitrc(instar_screen, 100, 0); 46 ohnestop = 0; 44 47 45 48 if(rcret == getrcconfigint("rcexit", NULL)) break; … … 47 50 if(rcret == getrcconfigint("rcinfo", NULL)) 48 51 { 49 addlist(myconfig, "InstarCamAutostart", "nein");52 //addlist(myconfig, "InstarCamAutostart", "nein"); 50 53 rcode = 1; 51 54 break; 52 55 } 53 56 54 if(rcret == getrcconfigint("rc1", NULL)) 57 if(rcret == getrcconfigint("rc1", NULL)) { 55 58 position = ostrcat("/decoder_control.cgi?command=", "31", 0 , 0); 56 if(rcret == getrcconfigint("rc2", NULL)) 59 ohnestop = 1; 60 } 61 if(rcret == getrcconfigint("rc2", NULL)) { 57 62 position = ostrcat("/decoder_control.cgi?command=", "33", 0 , 0); 58 if(rcret == getrcconfigint("rc3", NULL)) 63 ohnestop = 1; 64 } 65 if(rcret == getrcconfigint("rc3", NULL)) { 59 66 position = ostrcat("/decoder_control.cgi?command=", "35", 0 , 0); 60 if(rcret == getrcconfigint("rc4", NULL)) 67 ohnestop = 1; 68 } 69 if(rcret == getrcconfigint("rc4", NULL)) { 61 70 position = ostrcat("/decoder_control.cgi?command=", "37", 0 , 0); 62 if(rcret == getrcconfigint("rc5", NULL)) 71 ohnestop = 1; 72 } 73 if(rcret == getrcconfigint("rc5", NULL)) { 63 74 position = ostrcat("/decoder_control.cgi?command=", "39", 0 , 0); 64 if(rcret == getrcconfigint("rc6", NULL)) 75 ohnestop = 1; 76 } 77 if(rcret == getrcconfigint("rc6", NULL)) { 65 78 position = ostrcat("/decoder_control.cgi?command=", "41", 0 , 0); 66 if(rcret == getrcconfigint("rc7", NULL)) 79 ohnestop = 1; 80 } 81 if(rcret == getrcconfigint("rc7", NULL)) { 67 82 position = ostrcat("/decoder_control.cgi?command=", "43", 0 , 0); 68 if(rcret == getrcconfigint("rc8", NULL)) 83 ohnestop = 1; 84 } 85 if(rcret == getrcconfigint("rc8", NULL)) { 69 86 position = ostrcat("/decoder_control.cgi?command=", "45", 0 , 0); 70 if(rcret == getrcconfigint("rc9", NULL)) 87 ohnestop = 1; 88 } 89 if(rcret == getrcconfigint("rc9", NULL)) { 71 90 position = ostrcat("/decoder_control.cgi?command=", "47", 0 , 0); 72 if(rcret == getrcconfigint("rcup", NULL)) 73 position = ostrcat("/decoder_control.cgi?command=", "0&onestep=1", 0 , 0); 74 if(rcret == getrcconfigint("rcdown", NULL)) 75 position = ostrcat("/decoder_control.cgi?command=", "2&onestep=1", 0 , 0); 76 if(rcret == getrcconfigint("rcleft", NULL)) 77 position = ostrcat("/decoder_control.cgi?command=", "4&onestep=1", 0 , 0); 78 if(rcret == getrcconfigint("rcright", NULL)) 79 position = ostrcat("/decoder_control.cgi?command=", "6&onestep=1", 0 , 0); 80 81 82 if(position != NULL && tempcam != NULL) 83 { 84 tmpstr = ostrcat(tempcam, position, 0, 0); 85 system(tmpstr); 86 free(tmpstr); tmpstr = NULL; 87 free(position); position = NULL; 91 ohnestop = 1; 92 } 93 if(positionstop == NULL) 94 { 95 if(rcret == getrcconfigint("rcup", NULL)) { 96 position = ostrcat("/decoder_control.cgi?command=", "0", 0 , 0); 97 positionstop = ostrcat("/decoder_control.cgi?command=", "1", 0 , 0); 98 } 99 if(rcret == getrcconfigint("rcdown", NULL)) { 100 position = ostrcat("/decoder_control.cgi?command=", "2", 0 , 0); 101 positionstop = ostrcat("/decoder_control.cgi?command=", "3", 0 , 0); 102 } 103 if(rcret == getrcconfigint("rcleft", NULL)) { 104 position = ostrcat("/decoder_control.cgi?command=", "4", 0 , 0); 105 positionstop = ostrcat("/decoder_control.cgi?command=", "5", 0 , 0); 106 } 107 if(rcret == getrcconfigint("rcright", NULL)) { 108 position = ostrcat("/decoder_control.cgi?command=", "6", 0 , 0); 109 positionstop = ostrcat("/decoder_control.cgi?command=", "7", 0 , 0); 110 } 111 if(rcret == getrcconfigint("rcchup", NULL)) { 112 position = ostrcat("/decoder_control.cgi?command=", "16", 0 , 0); 113 positionstop = ostrcat("/decoder_control.cgi?command=", "17", 0 , 0); 114 } 115 if(rcret == getrcconfigint("rcchdown", NULL)) { 116 position = ostrcat("/decoder_control.cgi?command=", "18", 0 , 0); 117 positionstop = ostrcat("/decoder_control.cgi?command=", "19", 0 , 0); 118 } 119 } 120 121 if(tempcam != NULL && rcret != RCTIMEOUT) 122 { 123 if(positionstop != NULL && ohnestop == 1) 124 { 125 tmpstr = ostrcat(tempcam, positionstop, 0, 0); 126 system(tmpstr); 127 free(tmpstr); tmpstr = NULL; 128 free(positionstop); positionstop = NULL; 129 } 130 if(position != NULL) 131 { 132 tmpstr = ostrcat(tempcam, position, 0, 0); 133 system(tmpstr); 134 free(tmpstr); tmpstr = NULL; 135 free(position); position = NULL; 136 } 137 else if(positionstop != NULL) 138 { 139 tmpstr = ostrcat(tempcam, positionstop, 0, 0); 140 system(tmpstr); 141 free(tmpstr); tmpstr = NULL; 142 free(positionstop); positionstop = NULL; 143 } 88 144 } 89 145 } … … 214 270 if(ostrcmp(getlist(myconfig, "InstarCam2", NULL), "ein") == 0) 215 271 { 216 cam2 = ostrcat("wget -- user=", getlist(myconfig, "InstarCam2User", NULL), 0, 0);217 cam2 = ostrcat(cam2, " --password=",1, 0);272 cam2 = ostrcat("wget --output-document=/tmp/instar2.jpg http://", getlist(myconfig, "InstarCam2User", NULL), 0, 0); 273 cam2 = ostrcat(cam2, ":",1, 0); 218 274 cam2 = ostrcat(cam2, getlist(myconfig, "InstarCam2Pass", NULL), 1, 0); 219 cam2 = ostrcat(cam2, " --output-document=/tmp/instar2.jpg http://",1, 0);220 cam2 = ostrcat(cam2, fixip(getlist(myconfig, "InstarCam2IP", NULL)), 1, 0);221 cam2 = ostrcat(cam2, ":", 275 cam2 = ostrcat(cam2, "@",1, 0); 276 cam2 = ostrcat(cam2, getlist(myconfig, "InstarCam2IP", NULL), 1, 0); 277 cam2 = ostrcat(cam2, ":",1, 0); 222 278 cam2 = ostrcat(cam2, getlist(myconfig, "InstarCam2Port", NULL), 1, 0); 223 279 }
Note: See TracChangeset
for help on using the changeset viewer.