moteus-gui 0.3.86__py3-none-any.whl → 0.3.88__py3-none-any.whl
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.
- moteus_gui/tview.py +10 -7
- moteus_gui/version.py +1 -1
- {moteus_gui-0.3.86.dist-info → moteus_gui-0.3.88.dist-info}/METADATA +1 -1
- moteus_gui-0.3.88.dist-info/RECORD +9 -0
- moteus_gui-0.3.86.dist-info/RECORD +0 -9
- {moteus_gui-0.3.86.dist-info → moteus_gui-0.3.88.dist-info}/WHEEL +0 -0
- {moteus_gui-0.3.86.dist-info → moteus_gui-0.3.88.dist-info}/entry_points.txt +0 -0
- {moteus_gui-0.3.86.dist-info → moteus_gui-0.3.88.dist-info}/top_level.txt +0 -0
moteus_gui/tview.py
CHANGED
@@ -25,6 +25,7 @@ import moteus.moteus_tool
|
|
25
25
|
import numpy
|
26
26
|
import os
|
27
27
|
import re
|
28
|
+
import signal
|
28
29
|
import struct
|
29
30
|
import sys
|
30
31
|
import time
|
@@ -184,9 +185,9 @@ class RecordSignal(object):
|
|
184
185
|
|
185
186
|
return Connection(self, result)
|
186
187
|
|
187
|
-
def update(self, value):
|
188
|
+
def update(self, value, now):
|
188
189
|
for handler in self._callbacks.values():
|
189
|
-
handler(value)
|
190
|
+
handler(value, now)
|
190
191
|
return len(self._callbacks) != 0
|
191
192
|
|
192
193
|
|
@@ -225,14 +226,13 @@ class PlotItem(object):
|
|
225
226
|
self.axis.legend(loc=self.axis.legend_loc)
|
226
227
|
self.plot_widget.canvas.draw()
|
227
228
|
|
228
|
-
def _handle_update(self, value):
|
229
|
+
def _handle_update(self, value, now):
|
229
230
|
if self.plot_widget.paused:
|
230
231
|
return
|
231
232
|
|
232
233
|
if self.line is None:
|
233
234
|
self._make_line()
|
234
235
|
|
235
|
-
now = time.time()
|
236
236
|
self.xdata.append(now)
|
237
237
|
self.ydata.append(value)
|
238
238
|
|
@@ -403,7 +403,7 @@ class Record:
|
|
403
403
|
|
404
404
|
return self.signals[name]
|
405
405
|
|
406
|
-
def update(self, struct):
|
406
|
+
def update(self, struct, now):
|
407
407
|
count = 0
|
408
408
|
self.history.append(struct)
|
409
409
|
if len(self.history) > MAX_HISTORY_SIZE:
|
@@ -420,7 +420,7 @@ class Record:
|
|
420
420
|
value = numpy.mean(values)
|
421
421
|
else:
|
422
422
|
value = _get_data(struct, key)
|
423
|
-
if signal.update(value):
|
423
|
+
if signal.update(value, now):
|
424
424
|
count += 1
|
425
425
|
return count != 0
|
426
426
|
|
@@ -754,6 +754,8 @@ class Device:
|
|
754
754
|
return await self.read_sized_block()
|
755
755
|
|
756
756
|
async def do_data(self, name):
|
757
|
+
now = time.time()
|
758
|
+
|
757
759
|
data = await self.read_sized_block()
|
758
760
|
if not data:
|
759
761
|
return
|
@@ -764,7 +766,7 @@ class Device:
|
|
764
766
|
record = self._telemetry_records[name]
|
765
767
|
if record:
|
766
768
|
struct = record.archive.read(reader.Stream(io.BytesIO(data)))
|
767
|
-
record.update(struct)
|
769
|
+
record.update(struct, now)
|
768
770
|
_set_tree_widget_data(record.tree_item, struct, record.archive)
|
769
771
|
|
770
772
|
self._data[name] = struct
|
@@ -1269,6 +1271,7 @@ class TviewMainWindow():
|
|
1269
1271
|
|
1270
1272
|
|
1271
1273
|
def main():
|
1274
|
+
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
1272
1275
|
parser = argparse.ArgumentParser(description=__doc__)
|
1273
1276
|
|
1274
1277
|
# These two commands are aliases.
|
moteus_gui/version.py
CHANGED
@@ -0,0 +1,9 @@
|
|
1
|
+
moteus_gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
moteus_gui/tview.py,sha256=AFOsdGSHMSQ5AYinA6pMnkZhUYE3IZYnJp3zPgyVT98,42106
|
3
|
+
moteus_gui/tview_main_window.ui,sha256=q_qA1sooIWzprVT8eYAe0EH9lfu7zg-QP1diETCNFh8,5556
|
4
|
+
moteus_gui/version.py,sha256=bYmrQeWLHbeSIrqSgHNqnNU3m7WMEJx3w6Szx9slMuo,627
|
5
|
+
moteus_gui-0.3.88.dist-info/METADATA,sha256=IcBOQ9zXaI44rPKGzfloqjEX1WsNVt8Exei18EAEqu4,996
|
6
|
+
moteus_gui-0.3.88.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
7
|
+
moteus_gui-0.3.88.dist-info/entry_points.txt,sha256=Y9PnhK_gNxr8CO7_POHieVaK1U_4fgu2EYoS6TyzSgk,48
|
8
|
+
moteus_gui-0.3.88.dist-info/top_level.txt,sha256=oPOkXR-zpPFhGiDcbnDY6scvNqQQAXWzV7oPD_GHMns,11
|
9
|
+
moteus_gui-0.3.88.dist-info/RECORD,,
|
@@ -1,9 +0,0 @@
|
|
1
|
-
moteus_gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
moteus_gui/tview.py,sha256=DANIKJVpSC893A1reUb6a144dVrjo6okaRvN-L46BEA,42012
|
3
|
-
moteus_gui/tview_main_window.ui,sha256=q_qA1sooIWzprVT8eYAe0EH9lfu7zg-QP1diETCNFh8,5556
|
4
|
-
moteus_gui/version.py,sha256=xB3AWW4PPnSUzd7MMXbwCcYTSWPZDqGWSabi_HYJyBU,627
|
5
|
-
moteus_gui-0.3.86.dist-info/METADATA,sha256=qli-7EXNzBiAWeeDKUXsjkjQyO6AKUYR8m9jWAJnbaA,996
|
6
|
-
moteus_gui-0.3.86.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
7
|
-
moteus_gui-0.3.86.dist-info/entry_points.txt,sha256=Y9PnhK_gNxr8CO7_POHieVaK1U_4fgu2EYoS6TyzSgk,48
|
8
|
-
moteus_gui-0.3.86.dist-info/top_level.txt,sha256=oPOkXR-zpPFhGiDcbnDY6scvNqQQAXWzV7oPD_GHMns,11
|
9
|
-
moteus_gui-0.3.86.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|