UC2-REST 0.2.0.20__tar.gz → 0.2.0.21__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/PKG-INFO +1 -1
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/UC2_REST.egg-info/PKG-INFO +1 -1
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/__version__.py +1 -1
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/galvo.py +7 -4
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/laser.py +15 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/ledmatrix.py +1 -2
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/LICENSE +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/README.md +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/UC2_REST.egg-info/SOURCES.txt +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/UC2_REST.egg-info/dependency_links.txt +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/UC2_REST.egg-info/not-zip-safe +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/UC2_REST.egg-info/requires.txt +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/UC2_REST.egg-info/top_level.txt +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/setup.cfg +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/setup.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/MockSerial.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/UC2Client.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/__init__.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/analog.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/camera.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/cmdrecorder.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/config.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/config_.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/digitalout.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/home.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/logger.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/message.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/modules.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/motor.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/mserial.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/pid.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/rotator.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/slm.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/state.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/temperature.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/updater.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/utils.py +0 -0
- {uc2_rest-0.2.0.20 → uc2_rest-0.2.0.21}/uc2rest/wifi.py +0 -0
|
@@ -6,7 +6,7 @@ __version__.py
|
|
|
6
6
|
|
|
7
7
|
__title__ = 'UC2-REST'
|
|
8
8
|
__description__ = 'This pacage will help you to drive the ESP32-driven microscopy control modules from UC2'
|
|
9
|
-
__version__ = "v0.2.0.
|
|
9
|
+
__version__ = "v0.2.0.21"
|
|
10
10
|
__author__ = 'Benedict Diederich'
|
|
11
11
|
__author_email__ = 'benedictdied@gmail.com'
|
|
12
12
|
__license__ = 'GPL v3'
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import numpy as np
|
|
1
2
|
class Galvo(object):
|
|
2
3
|
def __init__(self, parent=None):
|
|
3
4
|
'''
|
|
@@ -15,16 +16,18 @@ class Galvo(object):
|
|
|
15
16
|
self._parent = parent
|
|
16
17
|
|
|
17
18
|
|
|
18
|
-
def set_dac(self, channel=1, frequency=1, offset=0, amplitude=1
|
|
19
|
-
|
|
19
|
+
def set_dac(self, channel=1, frequency=1, offset=0, amplitude=1, clk_div=0, phase=0, invert=1, timeout=1):
|
|
20
|
+
# {"task":"/dac_act", "dac_channel":1, "frequency":10, "offset":1, "amplitude":1, "divider":0, "phase":0, "invert":1, "qid":2}
|
|
20
21
|
path = "/dac_act"
|
|
21
22
|
payload = {
|
|
22
23
|
"task": path,
|
|
23
24
|
"dac_channel": channel, # 1 or 2
|
|
24
25
|
"frequency": frequency,
|
|
25
26
|
"offset": offset,
|
|
26
|
-
"
|
|
27
|
-
"
|
|
27
|
+
"divider": clk_div,
|
|
28
|
+
"amplitude":amplitude,
|
|
29
|
+
"phase":phase,
|
|
30
|
+
"invert":invert
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
self._parent.post_json(path, payload, timeout=timeout, getReturn=False)
|
|
@@ -60,3 +60,18 @@ class Laser(object):
|
|
|
60
60
|
r = self._parent.post_json(path, payload)
|
|
61
61
|
return r
|
|
62
62
|
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def set_servo(self, channel=1, value=0, is_blocking=False):
|
|
66
|
+
#{"task":"/laser_act", "LASERid":1 ,"LASERval":99, "servo":1, "qid":1}
|
|
67
|
+
path = '/laser_act'
|
|
68
|
+
|
|
69
|
+
payload = {
|
|
70
|
+
"task": path,
|
|
71
|
+
"LASERid": channel,
|
|
72
|
+
"LASERval": value,
|
|
73
|
+
"servo": 1
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
r = self._parent.post_json(path, payload, getReturn=is_blocking)
|
|
77
|
+
return r
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|