Changeset 41024
- Timestamp:
- 10/13/17 19:23:21 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/instar/instar.h
r41002 r41024 24 24 char* tmpstr = NULL; 25 25 char* tempcam = NULL; 26 char* tempcam1 = NULL; 26 27 char* position = NULL; 27 28 char* positionstop = NULL; … … 31 32 32 33 if(actcam == 1) 34 { 33 35 tempcam = cam1; 36 tempcam1 = cam11; 37 } 34 38 if(actcam == 2) 39 { 35 40 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 } 36 53 37 54 setfbtransparent(255); … … 151 168 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)) 152 169 { 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); 154 171 ohnestop = 1; 155 172 } … … 163 180 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)) 164 181 { 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); 166 183 ohnestop = 1; 167 184 } … … 175 192 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)) 176 193 { 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); 178 195 ohnestop = 1; 179 196 } … … 187 204 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)) 188 205 { 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); 190 207 ohnestop = 1; 191 208 } … … 199 216 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)) 200 217 { 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); 202 219 ohnestop = 1; 203 220 } … … 211 228 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)) 212 229 { 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); 214 231 ohnestop = 1; 215 232 } … … 223 240 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)) 224 241 { 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); 226 243 ohnestop = 1; 227 244 } … … 235 252 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)) 236 253 { 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); 238 255 ohnestop = 1; 239 256 } … … 247 264 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)) 248 265 { 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); 250 267 ohnestop = 1; 251 268 } … … 261 278 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)) 262 279 { 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); 265 282 } 266 283 else … … 273 290 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)) 274 291 { 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); 277 294 } 278 295 else … … 285 302 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)) 286 303 { 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); 289 306 } 290 307 else … … 297 314 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)) 298 315 { 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); 301 318 } 302 319 else … … 321 338 { 322 339 tmpstr = ostrcat(tempcam, positionstop, 0, 0); 340 if(tempcam1 != NULL) 341 tmpstr = ostrcat(tmpstr, tempcam1, 1, 0); 323 342 system(tmpstr); 324 343 free(tmpstr); tmpstr = NULL; … … 328 347 { 329 348 tmpstr = ostrcat(tempcam, position, 0, 0); 349 if(tempcam1 != NULL) 350 tmpstr = ostrcat(tmpstr, tempcam1, 1, 0); 330 351 system(tmpstr); 331 352 free(tmpstr); tmpstr = NULL; … … 335 356 { 336 357 tmpstr = ostrcat(tempcam, positionstop, 0, 0); 358 if(tempcam1 != NULL) 359 tmpstr = ostrcat(tmpstr, tempcam1, 1, 0); 337 360 system(tmpstr); 338 361 free(tmpstr); tmpstr = NULL;
Note: See TracChangeset
for help on using the changeset viewer.