Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VISCA Over IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Amalio Coron
VISCA Over IP
Commits
b0b3e95c
Commit
b0b3e95c
authored
6 years ago
by
Pierre Minssen
Browse files
Options
Downloads
Patches
Plain Diff
comentaires de fonctions
parent
72a2d41f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
viscaoveriplib/commands_library.py
+55
-61
55 additions, 61 deletions
viscaoveriplib/commands_library.py
with
55 additions
and
61 deletions
viscaoveriplib/commands_library.py
+
55
−
61
View file @
b0b3e95c
...
...
@@ -31,8 +31,12 @@ class Camera:
self
.
send_command
(
payload
)
#CAM_ZOOM : Zoom Control
#x from 1 : "0x0000" to 30 : "0x4000"
def
zoom_direct
(
self
,
x
:
hex
):
"""
Zoom Control
:param x: zoom from 1 :
"
0x0000
"
to 30 :
"
0x4000
"
:return:
"""
if
len
(
x
)
!=
6
:
# x n'est pas bon a voir si on check avant
x
=
"
0x0000
"
...
...
@@ -50,8 +54,12 @@ class Camera:
self
.
send_command
(
payload
)
#CAM_Focus : Focus Control
# inf = "0x1000" to 1cm = "0xF000"
def
focus_direct
(
self
,
x
:
hex
):
"""
Focus Control
:param x: drom inf =
"
0x1000
"
to 1cm =
"
0xF000
"
:return:
"""
if
len
(
x
)
!=
6
:
# x n'est pas bon a voir si on check avant
x
=
"
0x0000
"
...
...
@@ -60,12 +68,10 @@ class Camera:
self
.
send_command
(
payload
)
def
autofocus_on
(
self
):
payload
=
'
81 01 04 38 02 FF
'
self
.
send_command
(
payload
)
def
autofocus_off
(
self
):
payload
=
'
81 01 04 38 03 FF
'
self
.
send_command
(
payload
)
...
...
@@ -136,17 +142,14 @@ class Camera:
#CAM_RGain and BGain
def
rgain_reset
(
self
):
payload
=
"
81 01 04 03 00 FF
"
self
.
send_command
(
payload
)
def
rgain_up
(
self
):
payload
=
"
81 01 04 03 02 FF
"
self
.
send_command
(
payload
)
def
rgain_up
(
self
):
def
rgain_down
(
self
):
payload
=
"
81 01 04 03 03 FF
"
self
.
send_command
(
payload
)
...
...
@@ -159,22 +162,18 @@ class Camera:
self
.
send_command
(
payload
)
def
bgain_reset
(
self
):
payload
=
"
81 01 04 04 00 FF
"
self
.
send_command
(
payload
)
def
bgain_up
(
self
):
payload
=
"
81 01 04 04 02 FF
"
self
.
send_command
(
payload
)
def
bgain_up
(
self
):
payload
=
"
81 01 04 04 03 FF
"
self
.
send_command
(
payload
)
def
bgain_direct
(
self
,
x
:
hex
):
if
len
(
x
)
!=
4
:
# x n'est pas bon a voir si on check avant
x
=
"
0x0000
"
message
=
self
.
hex_2_message
(
x
)
...
...
@@ -215,22 +214,18 @@ class Camera:
#CAM_shutter
def
shutter_reset
(
self
):
payload
=
"
81 01 04 0A 00 FF
"
self
.
send_command
(
payload
)
def
shutter_on
(
self
):
payload
=
"
81 01 04 0A 02 FF
"
self
.
send_command
(
payload
)
def
shutter_off
(
self
):
payload
=
"
81 01 04 0A 03 FF
"
self
.
send_command
(
payload
)
def
shutter_direct
(
self
,
x
:
hex
):
if
len
(
x
)
!=
4
:
# x n'est pas bon a voir si on check avant
x
=
"
0x0000
"
message
=
self
.
hex_2_message
(
x
)
...
...
@@ -240,22 +235,18 @@ class Camera:
#CAM_Iris
def
iris_reset
(
self
):
payload
=
"
81 01 04 0B 00 FF
"
self
.
send_command
(
payload
)
def
iris_up
(
self
):
payload
=
"
81 01 04 0B 02 FF
"
self
.
send_command
(
payload
)
def
iris_down
(
self
):
payload
=
"
81 01 04 0B 03 FF
"
self
.
send_command
(
payload
)
def
iris_direct
(
self
,
x
:
hex
):
if
len
(
x
)
!=
4
:
# x n'est pas bon a voir si on check avant
x
=
"
0x0000
"
message
=
self
.
hex_2_message
(
x
)
...
...
@@ -264,22 +255,22 @@ class Camera:
#CAM_GAIN
def
gain_reset
(
self
):
payload
=
"
81 01 04 0C 00 FF
"
self
.
send_command
(
payload
)
def
gain_up
(
self
):
payload
=
"
81 01 04 0C 02 FF
"
self
.
send_command
(
payload
)
def
gain_down
(
self
):
payload
=
"
81 01 04 0C 03 FF
"
self
.
send_command
(
payload
)
def
gain_direct
(
self
,
x
:
hex
):
"""
:param x: gain position 0dB = 0x01 ; +43dB = 0x0F
:return:
"""
if
len
(
x
)
!=
4
:
# x n'est pas bon a voir si on check avant
x
=
"
0x0000
"
message
=
self
.
hex_2_message
(
x
)
...
...
@@ -288,18 +279,20 @@ class Camera:
# CAM_Bright
def
brigth_up
(
self
):
def
bright_up
(
self
):
payload
=
"
81 01 04 0D 02 FF
"
self
.
send_command
(
payload
)
def
brigth_down
(
self
):
def
bright_down
(
self
):
payload
=
"
81 01 04 0D 03 FF
"
self
.
send_command
(
payload
)
def
brigth_direct
(
self
,
x
:
hex
):
def
bright_direct
(
self
,
x
:
hex
):
"""
bright control
:param x: close : 0x00 to F1.6 +0dB 0x12 to F1.6 +43dB = 0x1F
:return:
"""
if
len
(
x
)
!=
4
:
# x n'est pas bon a voir si on check avant
x
=
"
0x0000
"
message
=
self
.
hex_2_message
(
x
)
...
...
@@ -332,6 +325,11 @@ class Camera:
self
.
send_command
(
payload
)
def
expcomp_direct
(
self
,
x
:
hex
):
"""
Exposure comp. control
:param x: -10.5dB : 0x00 to +10.5dB : 0x0E
:return:
"""
if
len
(
x
)
!=
4
:
# x n'est pas bon a voir si on check avant
x
=
"
0x0000
"
...
...
@@ -371,7 +369,6 @@ class Camera:
self
.
send_command
(
payload
)
def
defog_off
(
self
):
payload
=
"
81 01 04 37 03 00 FF
"
self
.
send_command
(
payload
)
...
...
@@ -389,18 +386,15 @@ class Camera:
self
.
send_command
(
payload
)
def
aperture_up
(
self
):
payload
=
"
81 01 04 42 02 02 FF
"
self
.
send_command
(
payload
)
def
aperture_down
(
self
):
payload
=
"
81 01 04 42 02 03 FF
"
self
.
send_command
(
payload
)
#CAM_HR : High resolution mode
def
hr_on
(
self
):
payload
=
"
81 01 04 52 02 FF
"
self
.
send_command
(
payload
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment