⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 visca_cli.c

📁 visca lib, for camera control
💻 C
📖 第 1 页 / 共 5 页
字号:
    if ((arg2 == NULL) || (intarg2 < 1) || (intarg2 > 20)) {      return 42;    }    if (VISCA_set_pantilt_upleft(&interface, &camera, intarg1, intarg2)        != VISCA_SUCCESS) {      return 46;    }    return 10;  }  if (strcmp(command, "set_pantilt_upright") == 0) {    if ((arg1 == NULL) || (intarg1 < 1) || (intarg1 > 24)) {      return 41;    }    if ((arg2 == NULL) || (intarg2 < 1) || (intarg2 > 20)) {      return 42;    }    if (VISCA_set_pantilt_upright(&interface, &camera, intarg1, intarg2)        != VISCA_SUCCESS) {      return 46;    }    return 10;  }  if (strcmp(command, "set_pantilt_downleft") == 0) {    if ((arg1 == NULL) || (intarg1 < 1) || (intarg1 > 24)) {      return 41;    }    if ((arg2 == NULL) || (intarg2 < 1) || (intarg2 > 20)) {      return 42;    }    if (VISCA_set_pantilt_downleft(&interface, &camera, intarg1, intarg2)        != VISCA_SUCCESS) {      return 46;    }    return 10;  }  if (strcmp(command, "set_pantilt_downright") == 0) {    if ((arg1 == NULL) || (intarg1 < 1) || (intarg1 > 24)) {      return 41;    }    if ((arg2 == NULL) || (intarg2 < 1) || (intarg2 > 20)) {      return 42;    }    if (VISCA_set_pantilt_downright(&interface, &camera, intarg1, intarg2)        != VISCA_SUCCESS) {      return 46;    }    return 10;  }  if (strcmp(command, "set_pantilt_stop") == 0) {    if ((arg1 == NULL) || (intarg1 < 1) || (intarg1 > 24)) {      return 41;    }    if ((arg2 == NULL) || (intarg2 < 1) || (intarg2 > 20)) {      return 42;    }    if (VISCA_set_pantilt_stop(&interface, &camera, intarg1, intarg2)        != VISCA_SUCCESS) {      return 46;    }    return 10;  }  if (strcmp(command, "set_pantilt_limit_upright") == 0) {    if ((arg1 == NULL) || (intarg1 < -879) || (intarg1 > 880)) {      return 41;    }    if ((arg2 == NULL) || (intarg2 < -299) || (intarg2 > 300)) {      return 42;    }    if (VISCA_set_pantilt_limit_upright(&interface, &camera,         intarg1, intarg2) != VISCA_SUCCESS) {      return 46;    }    return 10;  }  if (strcmp(command, "set_pantilt_limit_downleft") == 0) {    if ((arg1 == NULL) || (intarg1 < -879) || (intarg1 > 880)) {      return 41;    }    if ((arg2 == NULL) || (intarg2 < -299) || (intarg2 > 300)) {      return 42;    }    if (VISCA_set_pantilt_limit_downleft(&interface, &camera,         intarg1, intarg2) != VISCA_SUCCESS) {      return 46;    }    return 10;  }  if (strcmp(command, "set_pantilt_absolute_position") == 0) {    if ((arg1 == NULL) || (intarg1 < 1) || (intarg1 > 24)) {      return 41;    }    if ((arg2 == NULL) || (intarg2 < 1) || (intarg2 > 20)) {      return 42;    }    if ((arg3 == NULL) || (intarg3 < -879) || (intarg3 > 880)) {      return 43;    }    if ((arg4 == NULL) || (intarg4 < -299) || (intarg4 > 300)) {      return 44;    }    if (VISCA_set_pantilt_absolute_position(&interface, &camera,         intarg1, intarg2, intarg3, intarg4) != VISCA_SUCCESS) {      return 46;    }    return 10;  }  if (strcmp(command, "set_pantilt_relative_position") == 0) {    if ((arg1 == NULL) || (intarg1 < 1) || (intarg1 > 24)) {      return 41;    }    if ((arg2 == NULL) || (intarg2 < 1) || (intarg2 > 20)) {      return 42;    }    if ((arg3 == NULL) || (intarg3 < -879) || (intarg3 > 880)) {      return 43;    }    if ((arg4 == NULL) || (intarg4 < -299) || (intarg4 > 300)) {      return 44;    }    if (VISCA_set_pantilt_relative_position(&interface, &camera,         intarg1, intarg2, intarg3, intarg4) != VISCA_SUCCESS) {      return 46;    }    return 10;  }#if !D30ONLY  if (strcmp(command, "set_title_params") == 0) {    if ((arg1 == NULL) || (intarg1 < 0) || (intarg1 > 600)) {      return 41;    }    if ((arg2 == NULL) || (intarg2 < 0) || (intarg2 > 800)) {      return 42;    }    if ((arg3 == NULL) || (intarg3 < 0) || (intarg3 > 32)) {      return 43;    }    if ((arg4 == NULL) || (intarg4 < 0) || (intarg4 > 1)) {      return 44;    }    temptitle = (VISCATitleData_t *)malloc((sizeof(unsigned int)*4)+                                            sizeof(unsigned char*));    temptitle->vposition=intarg1;    temptitle->hposition=intarg2;    temptitle->color=intarg3;    temptitle->blink=intarg4;    if (VISCA_set_title_params(&interface, &camera, temptitle)         != VISCA_SUCCESS) {      free(temptitle);      return 46;    }    free(temptitle);    return 10;  }#endif#if !D30ONLY  if (strcmp(command, "set_date_time") == 0) {    if ((arg1 == NULL) || (intarg1 < 1) || (intarg1 > 99)) {      return 41;    }    if ((arg2 == NULL) || (intarg2 < 1) || (intarg2 > 12)) {      return 42;    }    if ((arg3 == NULL) || (intarg3 < 1) || (intarg3 > 31)) {      return 43;    }    if ((arg4 == NULL) || (intarg4 < 1) || (intarg4 > 23)) {      return 44;    }    if ((arg5 == NULL) || (intarg5 < 1) || (intarg5 > 59)) {      return 45;    }    if (VISCA_set_date_time(&interface, &camera,         intarg1, intarg2, intarg3, intarg4, intarg5) != VISCA_SUCCESS) {      return 46;    }    return 10;  }#endif#if !D30ONLY  if (strcmp(command, "set_title") == 0) {    if ((arg1 == NULL) || (intarg1 < 0) || (intarg1 > 600)) {      return 41;    }    if ((arg2 == NULL) || (intarg2 < 0) || (intarg2 > 800)) {      return 42;    }    if ((arg3 == NULL) || (intarg3 < 0) || (intarg3 > 32)) {      return 43;    }    if ((arg4 == NULL) || (intarg4 < 0) || (intarg4 > 1)) {      return 44;    }    if (arg5 == NULL) {      return 45;    }    temptitle = (VISCATitleData_t *)malloc(sizeof(VISCATitleData_t));    temptitle->vposition=intarg1;    temptitle->hposition=intarg2;    temptitle->color=intarg3;    temptitle->blink=intarg4;    strncpy((char*)temptitle->title, arg5, 19);    if (VISCA_set_title_params(&interface, &camera, temptitle)         != VISCA_SUCCESS) {      free(temptitle);      return 46;    }    free(temptitle);    return 10;  }#endif  if (strcmp(command, "get_power") == 0) {    if (VISCA_get_power(&interface, &camera, &value8)!=VISCA_SUCCESS) {      return 46;    }    if (value8 == 2) {      *ret1 = 0;    } else if (value8 == 3) {      *ret1 = 1;    } else {      return 47;    }    return 11;  }  if (strcmp(command, "get_power") == 0) {    if (VISCA_get_power(&interface, &camera, &value8)!=VISCA_SUCCESS) {      return 46;    }    if (value8 == 2) {      *ret1 = 1;    } else if (value8 == 3) {      *ret1 = 0;    } else {      return 47;    }    return 11;  }#if !D30ONLY  if (strcmp(command, "get_dzoom") == 0) {    if (VISCA_get_dzoom(&interface, &camera, &value8)!=VISCA_SUCCESS) {      return 46;    }    *ret1 = value8;    return 11;  }#endif  if (strcmp(command, "get_focus_auto") == 0) {    if (VISCA_get_focus_auto(&interface, &camera, &value8)!=VISCA_SUCCESS) {      return 46;    }    if (value8 == 2) {      *ret1 = 1;    } else if (value8 == 3) {      *ret1 = 0;    } else {      return 47;    }    return 11;  }#if !D30ONLY  if (strcmp(command, "get_exp_comp_power") == 0) {    if (VISCA_get_exp_comp_power(&interface, &camera, &value8)        != VISCA_SUCCESS){      return 46;    }    *ret1 = value8;    return 11;  }#endif  if (strcmp(command, "get_backlight_comp") == 0) {    if (VISCA_get_backlight_comp(&interface, &camera, &value8)        != VISCA_SUCCESS) {      return 46;    }    if (value8 == 2) {      *ret1 = 1;    } else if (value8 == 3) {      *ret1 = 0;    } else {      return 47;    }    return 11;  }#if !D30ONLY  if (strcmp(command, "get_zero_lux_shot") == 0) {    if (VISCA_get_zero_lux_shot(&interface, &camera, &value8)!=VISCA_SUCCESS) {      return 46;    }    *ret1 = value8;    return 11;  }#endif#if !D30ONLY  if (strcmp(command, "get_ir_led") == 0) {    if (VISCA_get_ir_led(&interface, &camera, &value8)!=VISCA_SUCCESS) {      return 46;    }    *ret1 = value8;    return 11;  }#endif#if !D30ONLY  if (strcmp(command, "get_mirror") == 0) {    if (VISCA_get_mirror(&interface, &camera, &value8)!=VISCA_SUCCESS) {      return 46;    }    *ret1 = value8;    return 11;  }#endif#if !D30ONLY  if (strcmp(command, "get_freeze") == 0) {    if (VISCA_get_freeze(&interface, &camera, &value8)!=VISCA_SUCCESS) {      return 46;    }    *ret1 = value8;    return 11;  }#endif#if !D30ONLY  if (strcmp(command, "get_display") == 0) {    if (VISCA_get_display(&interface, &camera, &value8)!=VISCA_SUCCESS) {      return 46;    }    *ret1 = value8;    return 11;  }#endif  if (strcmp(command, "get_datascreen") == 0) {    if (VISCA_get_datascreen(&interface, &camera, &value8)!=VISCA_SUCCESS) {      return 46;    }    if (value8 == 2) {      *ret1 = 1;    } else if (value8 == 3) {      *ret1 = 0;    } else {      return 47;    }    return 11;  }  if (strcmp(command, "get_zoom_value") == 0) {    if (VISCA_get_zoom_value(&interface, &camera, &value16)!=VISCA_SUCCESS) {      return 46;    }    *ret1 = value16;    return 11;  }  if (strcmp(command, "get_focus_value") == 0) {    if (VISCA_get_focus_value(&interface, &camera, &value16)!=VISCA_SUCCESS) {      return 46;    }    *ret1 = value16;    return 11;  }#if !D30ONLY  if (strcmp(command, "get_focus_auto_sense") == 0) {    if (VISCA_get_focus_auto_sense(&interface, &camera, &value8)        != VISCA_SUCCESS) {      return 46;    }    *ret1 = value8;    return 11;  }#endif#if !D30ONLY  if (strcmp(command, "get_focus_near_limit") == 0) {    if (VISCA_get_focus_near_limit(&interface, &camera, &value16)        != VISCA_SUCCESS) {      return 46;    }    *ret1 = value16;    return 11;  }#endif  if (strcmp(command, "get_whitebal_mode") == 0) {    if (VISCA_get_whitebal_mode(&interface, &camera, &value8)!=VISCA_SUCCESS){      return 46;    }    *ret1 = value8;    return 11;  }#if !D30ONLY  if (strcmp(command, "get_rgain_value") == 0) {    if (VISCA_get_rgain_value(&interface, &camera, &value16)!=VISCA_SUCCESS) {      return 46;    }    *ret1 = value16;    return 11;  }#endif#if !D30ONLY  if (strcmp(command, "get_bgain_value") == 0) {    if (VISCA_get_bgain_value(&interface, &camera, &value16)!=VISCA_SUCCESS) {      return 46;    }    *ret1 = value16;    return 11;  }#endif  if (strcmp(command, "get_auto_exp_mode") == 0) {    if (VISCA_get_auto_exp_mode(&interface, &camera, &value8)!=VISCA_SUCCESS){      return 46;    }    *ret1 = value8;    return 11;  }#if !D30ONLY  if (strcmp(command, "get_slow_shutter_auto") == 0) {    if (VISCA_get_slow_shutter_auto(&interface, &camera, &value8)        != VISCA_SUCCESS) {      return 46;    }    *ret1 = value8;    return 11;  }#endif  if (strcmp(command, "get_shutter_value") == 0) {    if (VISCA_get_shutter_value(&interface, &camera, &value16)        != VISCA_SUCCESS) {      return 46;    }    *ret1 = value16;    return 11;  }  if (strcmp(command, "get_iris_value") == 0) {    if (VISCA_get_iris_value(&interface, &camera, &value16)!=VISCA_SUCCESS) {      return 46;    }    *ret1 = value16;    return 11;  }  if (strcmp(command, "get_gain_value") == 0) {    if (VISCA_get_gain_value(&interface, &camera, &value16)!=VISCA_SUCCESS) {      return 46;    }    *ret1 = value16;    return 11;  }#if !D30ONLY  if (strcmp(command, "get_bright_value") == 0) {    if (VISCA_get_bright_value(&interface, &camera, &value16)!=VISCA_SUCCESS){      return 46;    }    *ret1 = value16;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -