moteus 0.3.93__tar.gz → 0.3.95__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.
Files changed (34) hide show
  1. {moteus-0.3.93 → moteus-0.3.95}/PKG-INFO +1 -1
  2. {moteus-0.3.93 → moteus-0.3.95}/moteus/transport.py +1 -1
  3. {moteus-0.3.93 → moteus-0.3.95}/moteus/transport_factory.py +25 -0
  4. {moteus-0.3.93 → moteus-0.3.95}/moteus/version.py +1 -1
  5. {moteus-0.3.93 → moteus-0.3.95}/moteus.egg-info/PKG-INFO +1 -1
  6. {moteus-0.3.93 → moteus-0.3.95}/moteus.egg-info/requires.txt +1 -0
  7. {moteus-0.3.93 → moteus-0.3.95}/setup.py +2 -1
  8. {moteus-0.3.93 → moteus-0.3.95}/README.md +0 -0
  9. {moteus-0.3.93 → moteus-0.3.95}/moteus/__init__.py +0 -0
  10. {moteus-0.3.93 → moteus-0.3.95}/moteus/aioserial.py +0 -0
  11. {moteus-0.3.93 → moteus-0.3.95}/moteus/aiostream.py +0 -0
  12. {moteus-0.3.93 → moteus-0.3.95}/moteus/calibrate_encoder.py +0 -0
  13. {moteus-0.3.93 → moteus-0.3.95}/moteus/command.py +0 -0
  14. {moteus-0.3.93 → moteus-0.3.95}/moteus/device_info.py +0 -0
  15. {moteus-0.3.93 → moteus-0.3.95}/moteus/export.py +0 -0
  16. {moteus-0.3.93 → moteus-0.3.95}/moteus/fdcanusb.py +0 -0
  17. {moteus-0.3.93 → moteus-0.3.95}/moteus/fdcanusb_device.py +0 -0
  18. {moteus-0.3.93 → moteus-0.3.95}/moteus/moteus.py +0 -0
  19. {moteus-0.3.93 → moteus-0.3.95}/moteus/moteus_tool.py +0 -0
  20. {moteus-0.3.93 → moteus-0.3.95}/moteus/multiplex.py +0 -0
  21. {moteus-0.3.93 → moteus-0.3.95}/moteus/posix_aioserial.py +0 -0
  22. {moteus-0.3.93 → moteus-0.3.95}/moteus/protocol.py +0 -0
  23. {moteus-0.3.93 → moteus-0.3.95}/moteus/pythoncan.py +0 -0
  24. {moteus-0.3.93 → moteus-0.3.95}/moteus/pythoncan_device.py +0 -0
  25. {moteus-0.3.93 → moteus-0.3.95}/moteus/reader.py +0 -0
  26. {moteus-0.3.93 → moteus-0.3.95}/moteus/regression.py +0 -0
  27. {moteus-0.3.93 → moteus-0.3.95}/moteus/transport_device.py +0 -0
  28. {moteus-0.3.93 → moteus-0.3.95}/moteus/transport_wrapper.py +0 -0
  29. {moteus-0.3.93 → moteus-0.3.95}/moteus/win32_aioserial.py +0 -0
  30. {moteus-0.3.93 → moteus-0.3.95}/moteus.egg-info/SOURCES.txt +0 -0
  31. {moteus-0.3.93 → moteus-0.3.95}/moteus.egg-info/dependency_links.txt +0 -0
  32. {moteus-0.3.93 → moteus-0.3.95}/moteus.egg-info/entry_points.txt +0 -0
  33. {moteus-0.3.93 → moteus-0.3.95}/moteus.egg-info/top_level.txt +0 -0
  34. {moteus-0.3.93 → moteus-0.3.95}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: moteus
3
- Version: 0.3.93
3
+ Version: 0.3.95
4
4
  Summary: moteus brushless controller library and tools
5
5
  Home-page: https://github.com/mjbots/moteus
6
6
  Author: mjbots Robotic Systems
@@ -419,7 +419,7 @@ class Transport:
419
419
  # We can send at most one broadcast frame that needs
420
420
  # replies per transaction.
421
421
  broadcast_with_reply = lambda request: (
422
- (request.frame.arbitration_id & 0x7f) == 0x7f and
422
+ (request.frame and ((request.frame.arbitration_id & 0x7f) == 0x7f)) and
423
423
  request.frame_filter is not None)
424
424
 
425
425
  broadcast_requests = [x for x in request_list
@@ -16,6 +16,7 @@
16
16
  import argparse
17
17
  import importlib_metadata
18
18
  import sys
19
+ import warnings
19
20
 
20
21
  from . import fdcanusb_device
21
22
  from . import pythoncan_device
@@ -141,12 +142,36 @@ def make_transport_args(parser):
141
142
  help='Force the given transport type to be used exclusively')
142
143
 
143
144
 
145
+ def check_gui_compatibility():
146
+ try:
147
+ import moteus_gui
148
+ from importlib.metadata import version, PackageNotFoundError
149
+ from packaging.version import parse as parse_version
150
+
151
+ try:
152
+ gui_version = version('moteus-gui')
153
+ if parse_version(gui_version) < parse_version('0.3.93'):
154
+ warnings.warn(
155
+ "moteus-gui is outdated. Please upgrade: python -m pip install -U moteus-gui",
156
+ UserWarning
157
+ )
158
+ except PackageNotFoundError:
159
+ pass
160
+ except ImportError:
161
+ pass
162
+
163
+
144
164
  def get_singleton_transport(args=None):
145
165
  global GLOBAL_TRANSPORT
146
166
 
147
167
  if GLOBAL_TRANSPORT:
148
168
  return GLOBAL_TRANSPORT
149
169
 
170
+ # We check this here because it will likely only be called once
171
+ # per application instance, and will nearly always be called by
172
+ # the GUI.
173
+ check_gui_compatibility()
174
+
150
175
  if args and args.can_debug:
151
176
  args.can_debug = open(args.can_debug, 'wb')
152
177
 
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- VERSION="0.3.93"
15
+ VERSION="0.3.95"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: moteus
3
- Version: 0.3.93
3
+ Version: 0.3.95
4
4
  Summary: moteus brushless controller library and tools
5
5
  Home-page: https://github.com/mjbots/moteus
6
6
  Author: mjbots Robotic Systems
@@ -1,4 +1,5 @@
1
1
  importlib_metadata>=3.6
2
+ packaging
2
3
  pyelftools>=0.26
3
4
  pyserial>=3.5
4
5
  python-can>=3.3
@@ -25,7 +25,7 @@ long_description = (here / 'README.md').read_text(encoding='utf-8')
25
25
 
26
26
  setuptools.setup(
27
27
  name = 'moteus',
28
- version = "0.3.93",
28
+ version = "0.3.95",
29
29
  description = 'moteus brushless controller library and tools',
30
30
  long_description = long_description,
31
31
  long_description_content_type = 'text/markdown',
@@ -53,5 +53,6 @@ setuptools.setup(
53
53
  'scipy>=1.8.0',
54
54
  'importlib_metadata>=3.6',
55
55
  'pywin32;platform_system=="Windows"',
56
+ 'packaging',
56
57
  ],
57
58
  )
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