📄 lv20x0.h
字号:
#ifndef LV20x0_H
#define LV20x0_H
// LV20x0 DLL - DLL for control of LV20x0 camera series via RS-232c
// ================================================================
// The constants ending with _B1 and _B2 should be used as the FIRST and the
// SECOND parameter in LvSendByteCmd() and LvSendByteCmdEx() functions.
//
// Examples:
// LvSendByteCmd(LV_PRESET_STORE_ZOOM_EXT_B1, IndexZoomHi, ZoomLo, CameraID);
// LvSendByteCmdEx(LV_EXPO_SET_AGC_B1, LV_SET_EXPO_AGC_B2, Agc, CameraID,
// &ucReturn1, &ucReturn2, &ucReturn3, &ucReturn4);
//
// The DWORD constants can be used in LvSendCmd(), LvSendCmdEx() functions.
// The 4. byte (less significant) is the camera ID - by default it is 0;
// use the bitwise OR operator or PLUS operator to add camera ID.
//
// Examples:
// LvSendCmd(LV_EXPO_SET_MODE_AUTO + CameraID);
// LvSendCmdEx(LV_EXPO_GET_MODE + CameraID, &ucReturn1, &ucReturn2, &ucReturn3, &ucReturn4);
//
//
// The constants are grouped according to the manual of LV2010/2020
//
// First, constants that can be used for all types (LV2000, LV2010 and LV2020)
// are listed. Then constants specific to a camera type are listed:
// *** group *******************************************************************
// #define LV_... 0x........ // ...
// #define LV_... 0x........ // ...
//
// ~~~ LV2000 ~~~
// #define LV_... 0x........ // ...
// #define LV_... 0x........ // ...
//
// ~~~ LV2010 ~~~
// #define LV_... 0x........ // ...
// #define LV_... 0x........ // ...
//
// ~~~ LV2020 ~~~
// #define LV_... 0x........ // ...
// #define LV_... 0x........ // ...
//
// *** CAMERA ID ***************************************************************
#define LV_CAMERA_ID_GET 0xCC000000 // Get camera ID
#define LV_CAMERA_ID_SET_B1 0x78 // Set camera ID - set ID in uCameraID of LvSendByteCmd
#define LV_CAMERA_ID_TOGGLE_DISPLAY 0xAA6A0000 // Toggle the Camera ID Display ON/OFF
// ~~~ LV2010, LV2020 ~~~
#define LV_CAMERA_ID_POS_CHANGE 0x80000000 // change ID number position - BR->TL->TR->no_pos->BR->...
// *** WHITE BALANCE MODE ******************************************************
#define LV_WB_SET_MODE_AUTO 0xAA650000 // Set White Balance mode to AUTO (ATW)
#define LV_WB_SET_MODE_INDOOR 0xAA650200 // Set White Balance mode to INDOOR
#define LV_WB_SET_MODE_OUTDOOR 0xAA650300 // Set White Balance mode to OUTDOOR
#define LV_WB_SET_MODE_MANUAL 0xAA650400 // Set White Balance mode to MANUAL
// ~~~ LV2000 ~~~
#define LV_WB_SET_MODE_SPECIAL 0xAA650100 // Set White Balance mode to SPECIAL
#define LV_WB_SET_MODE_PUSHAUTO 0xAA650500 // Set White Balance mode to PUSH AUTO
// ~~~ LV2010, LV2020 ~~~
#define LV_WB_SET_MODE_AWC 0xAA650500 // Set White Balance mode to AWC (One Push Mode)
#define LV_WB_GET_MODE 0xAA830000 // Get White Balance mode
// return values (in pucReturn1):
// 0 - ATW mode
// 2 - INDOOR WB
// 3 - OUTDOOR WB
// 4 - MANUAL WB
// 5 - AWC mode
#define LV_WB_SET_ATW 0xAA680000 // Set ATW mode (Auto Trace White balance)
#define LV_WB_SET_MWB 0xAA690000 // Set WB MANUAL mode
#define LV_WB_SET_AWC_LOCK 0xAA780000 // Set AWC mode "Lock"
#define LV_WB_SET_AWC_PUSH 0xAA780100 // Set AWC mode "Push
#define LV_WB_GET_HUE 0xAA870000 // Get Hue in WB manual mode
// value 0-99 in pucReturn1
#define LV_WB_SET_HUE_B1 0xAA // Set Hue in WB manual mode - first byte
#define LV_WB_SET_HUE_B2 0x77 // Set Hue in WB manual mode - second byte
// value 0-99 - third byte
#define LV_WB_SET_ATW_RED_B1 0xAA // Set RED data at ATW WB mode - first byte
#define LV_WB_SET_ATW_RED_B2 0x75 // Set RED data at ATW WB mode - second byte
// third byte - value -3 (0xFD) ... +3 (0x03)
#define LV_WB_GET_ATW_RED 0xAA850000 // Get RED data at ATW WB mode
// return values (in pucReturn1):
// -3 (0xFD) ... +3 (0x03)
#define LV_WB_SET_ATW_BLUE_B1 0xAA // Set BLUE data at ATW WB mode - first byte
#define LV_WB_SET_ATW_BLUE_B2 0x76 // Set BLUE data at ATW WB mode - second byte
// third byte - value -3 (0xFD) ... +3 (0x03)
#define LV_WB_GET_ATW_BLUE 0xAA860000 // Get BLUE data at ATW WB mode
// return values (in pucReturn1):
// -3 (0xFD) ... +3 (0x03)
// *** EXPOSURE MODE ***********************************************************
#define LV_EXPO_SET_MODE_AUTO 0xAA600000 // Set exposure mode to AUTO
#define LV_EXPO_SET_MODE_SHUTTER 0xAA600100 // Set exposure mode to SHUTTER FIX (Iris, AGC remains AUTO)
#define LV_EXPO_SET_MODE_IRIS 0xAA600200 // Set exposure mode to IRIS FIX (Shutter, AGC remains AUTO)
#define LV_EXPO_SET_MODE_AGC 0xAA600300 // Set exposure mode to AGC FIX (Shutter, Iris remains AUTO)
#define LV_EXPO_SET_MODE_MANUAL 0xAA600400 // Set exposure mode to MANUAL
// ~~~ LV2010, LV2020 ~~~
#define LV_EXPO_SET_WEIGHT_B1 0xAA
#define LV_EXPO_SET_WEIGHT_B2 0x6C
#define LV_EXPO_GET_WEIGHTS 0xAA6B0000 // Get auto exposure weighting values
// return value (in pucReturn1):
// upper 4 bits area 1, lower 4 bits area 2
// See also LvGetAutoExpAreaWeights(),
// LvSetAutoExpAreaWeights()
#define LV_EXPO_GET_MODE 0xAA840000 // Get exposure mode
// return values (in pucReturn1):
// 0 - AUTO
// 1 - SHUTTER FIX
// 2 - IRIS FIX
// 3 - AGC FIX
// 4 - MANUAL
#define LV_EXPO_GET_AGC 0xAA8C0000 // Get AGC level
// return value (in pucReturn1):
// 51..232
#define LV_EXPO_SET_AGC_B1 0xAA // Set AGC level - first byte
#define LV_EXPO_SET_AGC_B2 0x7D // Set AGC level - second byte
// third byte - value between 51 and 232
// ~~~ LV2010 ~~~
#define LV_EXPO_SET_SENS_HIGH 0xAA5D0000 // Set auto exposure sensitivity to fast
#define LV_EXPO_SET_SENS_NORMAL 0xAA5D0100 // Set auto exposure sensitivity to normal
// *** IRIS MODE ***************************************************************
// ~~~ LV2010, LV2020 ~~~
#define LV_IRIS_SET_MODE_AUTO 0xAA660000 // Set IRIS mode to AUTO
#define LV_IRIS_SET_MODE_MANUAL 0xAA670000 // Set IRIS mode to MANUAL
#define LV_IRIS_GET 0xAA8B0000 // Get IRIS level
// return value (in pucReturn1):
// 51...205
#define LV_IRIS_SET_B1 0xAA // Set IRIS level - first byte
#define LV_IRIS_SET_B2 0x7C // Set IRIS level - second byte
// third byte - value between 51..205
#define LV_SHUTTER_GET 0xAA8A0000 // Get SHUTTER speed
// return value (in pucReturn1):
// 0..27: 0 - longest shutter,
// 1=1/125, 2=1/150 ... 27=1/10000
#define LV_SHUTTER_SET_B1 0xAA // Set SHUTTER speed - first byte
#define LV_SHUTTER_SET_B2 0x7B // Set SHUTTER speed - second byte
// third byte - value between 0..27
// *** FOCUS MODE **************************************************************
// ~~~ LV2010, LV2020 ~~~
#define LV_FOCUS_SET_MODE_AUTO 0xAA580000 // Set FOCUS mode to AUTO
#define LV_FOCUS_SET_MODE_MANUAL 0xAA590000 // Set FOCUS mode to MANUAL
#define LV_FOCUS_SAVE_MODE 0xAA500000 // Save the focus mode to EEPROM
#define LV_FOCUS_SET_MANUAL_FAR_B1 0xAA // Adjust FOCUS manual mode to FAR, byte 1
#define LV_FOCUS_SET_MANUAL_FAR_B2 0x5A // Adjust FOCUS manual mode to FAR, byte 2
// byte 3 = focusing speed 1..15 (only LV2020)
#define LV_FOCUS_SET_MANUAL_NEAR_B1 0xAA // Adjust FOCUS manual mode to FAR, byte 1
#define LV_FOCUS_SET_MANUAL_NEAR_B2 0x5B // Adjust FOCUS manual mode to FAR, byte 2
// byte 3 = focusing speed 1..15 (only LV2020)
#define LV_FOCUS_SET_MANUAL_STOP 0xAA5C0000 // Adjust FOCUS manual mode to STOP
#define LV_FOCUS_SET_PUSH_AUTO_ON 0xAA730100 // Set the push-auto focus mode
#define LV_FOCUS_SET_PUSH_AUTO_OFF 0xAA730000 // Set the auto/manual focus mode
// ~~~ LV2010 ~~~
#define LV_FOCUS_SET_SENS_HIGH 0xAA5E0000 // Set Auto focus sensitivity to High (fast)
#define LV_FOCUS_SET_SENS_LOW 0xAA5E0100 // Set Auto focus sensitivity to Low (stable)
#define LV_FOCUS_SET_ONE_SHOT_TIME_B1 0x58 // Set one shot auto focus time - first byte
// second byte - 1..9 (seconds)
#define LV_FOCUS_SET_MIN_DIST_B1 0x59 // Adjust minimum distance - first byte
// second byte - 0..6:
// 0=1cm, 1=10cm, 2=50cm, 3=1m, 4=3m,
// 5=10m, 6=infinity
// *** PRESET ******************************************************************
#define LV_PRESET_GET_ZOOM_POS 0x36000000 // Get Zoom Lens Position
// pucReturn1: upper byte of Zoom Lens Position
// pucReturn2: lower byte of Zoom Lens Position
#define LV_PRESET_GET_FOCUS_POS 0x37000000 // Get Focus Lens Position
// pucReturn1: upper byte of Focus Lens Position
// pucReturn2: lower byte of Focus Lens Position
// ~~~ LV2000, LV2010 ~~~
#define LV_PRESET_STORE_ZOOM_EXT_B1 0x49 // Store zoom lens position to RAM
// byte 2 - upper 4 bits - index 0..7,
// lower 4 bits is upper byte of zoom lens position
// byte 3 - lower byte of the zoom lens position
#define LV_PRESET_STORE_FOCUS_EXT_B1 0x4A // Store focus lens position to RAM
// byte 2 - upper 4 bits - index 0..7,
// lower 4 bits is upper byte of focus lens position
// byte 3 - lower byte of the focus lens position
#define LV_PRESET_STORE_DZOOM_EXT_B1 0x4B // Store digital zoom data to RAM
// byte 2 - index 0..7,
// byte 3 - digital zoom data
#define LV_PRESET_LOAD_EXT_0 0x4D000000 // Load and set Preset 0
#define LV_PRESET_LOAD_EXT_1 0x4D010000 // Load and set Preset 1
#define LV_PRESET_LOAD_EXT_2 0x4D020000 // Load and set Preset 2
#define LV_PRESET_LOAD_EXT_3 0x4D030000 // Load and set Preset 3
#define LV_PRESET_LOAD_EXT_4 0x4D040000 // Load and set Preset 4
#define LV_PRESET_LOAD_EXT_5 0x4D050000 // Load and set Preset 5
#define LV_PRESET_LOAD_EXT_6 0x4D060000 // Load and set Preset 6
#define LV_PRESET_LOAD_EXT_7 0x4D070000 // Load and set Preset 7
// ~~~ LV2010 ~~~
#define LV_PRESET_LOAD_EXT_B1 0x4D // Load and set preset (without zoom tracking)
// byte 2 - index 0..7
// ~~~ LV2010, LV2020 ~~~
// Internal preset - stored to EEPROM (64 presets)
// External preset - stored to RAM of camera microcontoller (8 presets) - LV2000 has only external preset
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -