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
19de2f20
Commit
19de2f20
authored
6 years ago
by
Pierre Minssen
Browse files
Options
Downloads
Patches
Plain Diff
suite de comentaires
parent
b0b3e95c
Branches
Branches containing commit
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
-39
55 additions, 39 deletions
viscaoveriplib/commands_library.py
with
55 additions
and
39 deletions
viscaoveriplib/commands_library.py
+
55
−
39
View file @
19de2f20
...
...
@@ -154,9 +154,13 @@ class Camera:
self
.
send_command
(
payload
)
def
rgain_direct
(
self
,
x
:
hex
):
if
len
(
x
)
!=
4
:
# x n'est pas bon a voir si on check avant
x
=
"
0x0000
"
"""
R Gain Control
:param x: pq R gain eg 0x11
:return:
"""
if
len
(
x
)
!=
2
:
# x n'est pas bon a voir si on check avant
x
=
"
0x00
"
message
=
self
.
hex_2_message
(
x
)
payload
=
"
81 01 04 43 00 00
"
+
message
+
"
FF
"
self
.
send_command
(
payload
)
...
...
@@ -174,8 +178,13 @@ class Camera:
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
"
"""
B Gain Control
:param x: pq B gain eg 0x11
:return:
"""
if
len
(
x
)
!=
2
:
# x n'est pas bon a voir si on check avant
x
=
"
0x00
"
message
=
self
.
hex_2_message
(
x
)
payload
=
"
81 01 04 44 00 00
"
+
message
+
"
FF
"
self
.
send_command
(
payload
)
...
...
@@ -226,8 +235,13 @@ class Camera:
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
"
"""
Shutter speed control
:param x: 0x00 : 1/1 to 0x15 : 1/10000
:return:
"""
if
len
(
x
)
!=
2
:
# x n'est pas bon a voir si on check avant
x
=
"
0x00
"
message
=
self
.
hex_2_message
(
x
)
payload
=
"
81 01 04 4A 00 00
"
+
message
+
"
FF
"
self
.
send_command
(
payload
)
...
...
@@ -247,8 +261,13 @@ class Camera:
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
"
"""
iris control
:param x: 0x00 : close, then 0x05 F14 to 0x11 : F1.6
:return:
"""
if
len
(
x
)
!=
2
:
# x n'est pas bon a voir si on check avant
x
=
"
0x00
"
message
=
self
.
hex_2_message
(
x
)
payload
=
"
81 01 04 4B 00 00
"
+
message
+
"
FF
"
self
.
send_command
(
payload
)
...
...
@@ -268,11 +287,12 @@ class Camera:
def
gain_direct
(
self
,
x
:
hex
):
"""
gain control
: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
=
"
0x00
00
"
if
len
(
x
)
!=
2
:
# x n'est pas bon a voir si on check avant
x
=
"
0x00
"
message
=
self
.
hex_2_message
(
x
)
payload
=
"
81 01 04 4C 00 00
"
+
message
+
"
FF
"
self
.
send_command
(
payload
)
...
...
@@ -293,8 +313,8 @@ class Camera:
: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
=
"
0x00
00
"
if
len
(
x
)
!=
2
:
# x n'est pas bon a voir si on check avant
x
=
"
0x00
"
message
=
self
.
hex_2_message
(
x
)
payload
=
"
81 01 04 4D 00 00
"
+
message
+
"
FF
"
self
.
send_command
(
payload
)
...
...
@@ -330,9 +350,8 @@ class Camera:
: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
"
if
len
(
x
)
!=
2
:
# x n'est pas bon a voir si on check avant
x
=
"
0x00
"
message
=
self
.
hex_2_message
(
x
)
payload
=
"
81 01 04 4E 00 00
"
+
message
+
"
FF
"
self
.
send_command
(
payload
)
...
...
@@ -379,8 +398,13 @@ class Camera:
self
.
send_command
(
payload
)
def
aperture_direct
(
self
,
x
:
hex
):
if
len
(
x
)
!=
4
:
# x n'est pas bon a voir si on check avant
x
=
"
0x0000
"
"""
aperture control
:param x: 0xpq aperture gain
:return:
"""
if
len
(
x
)
!=
2
:
# x n'est pas bon a voir si on check avant
x
=
"
0x00
"
message
=
self
.
hex_2_message
(
x
)
payload
=
"
81 01 04 42 00 00
"
+
message
+
"
FF
"
self
.
send_command
(
payload
)
...
...
@@ -399,110 +423,102 @@ class Camera:
self
.
send_command
(
payload
)
def
hr_off
(
self
):
payload
=
"
81 01 04 52 03 FF
"
self
.
send_command
(
payload
)
#CAM_NR : Noise reduction
def
noise_reduction_level
(
self
,
parameter
:
int
):
# entier entre 0= OFF et puis entre 1 et 5
def
noise_reduction_level
(
self
,
parameter
:
int
):
#TODO
"""
:param parameter: 0= OFF, then from 1 to 5
:return:
"""
payload
=
"
81 01 04 53 0
"
+
str
(
parameter
)
+
"
FF
"
self
.
send_command
(
payload
)
def
gamma_level
(
self
,
parameter
:
int
):
# entier 0 = off, 1 = standard
# TODO
payload
=
"
81 01 04 5B 0
"
+
str
(
parameter
)
+
"
FF
"
self
.
send_command
(
payload
)
# High Sensitivity On/off
def
high_sensitivity_on
(
self
):
payload
=
"
81 01 04 5E 02 FF
"
self
.
send_command
(
payload
)
def
high_sensitivity_off
(
self
):
payload
=
"
81 01 06 5E 03 FF
"
self
.
send_command
(
payload
)
def
picture_effect_off
(
self
):
payload
=
"
81 01 04 63 00 FF
"
self
.
send_command
(
payload
)
def
picture_effect_BW
(
self
):
payload
=
"
81 01 04 63 04 FF
"
self
.
send_command
(
payload
)
def
picture_effect_negatif
(
self
):
payload
=
"
81 01 04 63 02 FF
"
self
.
send_command
(
payload
)
def
irc_on
(
self
):
payload
=
"
81 01 04 01 02 FF
"
self
.
send_command
(
payload
)
def
irc_off
(
self
):
payload
=
"
81 01 04 01 03 FF
"
self
.
send_command
(
payload
)
def
irc_auto_on
(
self
):
payload
=
"
81 01 04 51 02 FF
"
self
.
send_command
(
payload
)
def
irc_auto_off
(
self
):
payload
=
"
81 01 04 51 03 FF
"
self
.
send_command
(
payload
)
def
irc_auto_threshold
(
self
,
x
:
hex
):
"""
:param x: 0xpq thershold level
:return:
"""
message_x
=
self
.
hex_2_message
(
x
)
payload
=
"
81 01 04 21 00 00
"
+
message_x
+
"
FF
"
self
.
send_command
(
payload
)
def
stabilizer_on
(
self
):
payload
=
"
81 01 04 34 02 FF
"
self
.
send_command
(
payload
)
def
stabilizer_off
(
self
):
payload
=
"
81 01 04 34 03 FF
"
self
.
send_command
(
payload
)
def
stabilizer_hold
(
self
):
payload
=
"
81 01 04 34 00 FF
"
self
.
send_command
(
payload
)
def
memory_reset
(
self
,
x
:
hex
):
payload
=
"
81 01 04 3F 00 0
"
+
x
[
2
]
+
"
FF
"
self
.
send_command
(
payload
)
def
memory_set
(
self
,
x
:
hex
):
payload
=
"
81 01 04 3F 01 0
"
+
x
[
2
]
+
"
FF
"
self
.
send_command
(
payload
)
def
memory_recall
(
self
,
x
:
hex
):
payload
=
"
81 01 04 3F 02 0
"
+
x
[
2
]
+
"
FF
"
self
.
send_command
(
payload
)
def
idwrite
(
self
,
x
:
hex
):
payload
=
"
81 01 04 22
"
+
self
.
hex_2_message
(
x
)
+
"
FF
"
self
.
send_command
(
payload
)
def
chroma_suppress
(
self
,
x
:
hex
):
payload
=
"
81 01 04 5F
"
+
x
[
2
:]
+
"
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