moteus 0.3.93__py3-none-any.whl → 0.3.95__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/transport.py CHANGED
@@ -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
 
moteus/version.py CHANGED
@@ -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
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3
13
13
  Requires-Python: >=3.7, <4
14
14
  Description-Content-Type: text/markdown
15
15
  Requires-Dist: importlib-metadata >=3.6
16
+ Requires-Dist: packaging
16
17
  Requires-Dist: pyelftools >=0.26
17
18
  Requires-Dist: pyserial >=3.5
18
19
  Requires-Dist: python-can >=3.3
@@ -16,14 +16,14 @@ moteus/pythoncan.py,sha256=7VMCPHvFasy9V507kKVV5jUyzZXFjvhsbqT5hMYI-jA,864
16
16
  moteus/pythoncan_device.py,sha256=e-NGnMX4-tFhQY8PShNJiA8GLwf_iKU_BiJsTekM6B8,7710
17
17
  moteus/reader.py,sha256=9i1-h4aGd4syfqtWJcpg70Bl-bmunkGU4FmXmOLyRt8,12121
18
18
  moteus/regression.py,sha256=M5gjDBYJQ64iBXIrvBhMkD8TYhtlnQ85x8U4py0niGA,1196
19
- moteus/transport.py,sha256=jVrT47O5nv_TpZeNr2GUZd7oOz397zIJJnBQvXT82gY,28125
19
+ moteus/transport.py,sha256=rfLMxKjyY_5Mod2Pele_FihiJI3cSmnCrtpwesVrORI,28147
20
20
  moteus/transport_device.py,sha256=QDSqFiGuLQVvMo26a6CmnMXMzrSovdji6yzHSr_cDGA,5820
21
- moteus/transport_factory.py,sha256=vuLUXWl62DcGrXfoQTRKQvx4EAegx22lU8A-18JgJqg,5889
21
+ moteus/transport_factory.py,sha256=r_5iCKTkxxK4YFanQEUHluiWtjK3LrQ5m0j6QJU15F0,6688
22
22
  moteus/transport_wrapper.py,sha256=7oOBFSvD7Zk5BiWjX_YcGSTlMIZC4GmL88uzVYVQBbE,1733
23
- moteus/version.py,sha256=O719mKnILALctfBBRT6sn77cBNmjrF5gGIFv54dJvXo,627
23
+ moteus/version.py,sha256=_FqoSdW6eRgXvRiBUxLsj73Os3bsvpeZgRAUScaR57M,627
24
24
  moteus/win32_aioserial.py,sha256=culdl-vYxBKD5n2s5LkIMGyUaHyCcEc8BL5-DWEaxX8,2025
25
- moteus-0.3.93.dist-info/METADATA,sha256=_4swFTQeCCEDlqeUTJjwaootPp2_vVLwD1TfDkRdleE,3417
26
- moteus-0.3.93.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
27
- moteus-0.3.93.dist-info/entry_points.txt,sha256=accRcwir_K8wCf7i3qHb5R6CPh5SiSgd5a1A92ibb9E,56
28
- moteus-0.3.93.dist-info/top_level.txt,sha256=aZzmI_yecTaDrdSp29pTJuowaSQ9dlIZheQpshGg4YQ,7
29
- moteus-0.3.93.dist-info/RECORD,,
25
+ moteus-0.3.95.dist-info/METADATA,sha256=dgfA0scnIcXGKJk26B2N5abf-atzQKLPHnO7N7-qGSw,3442
26
+ moteus-0.3.95.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
27
+ moteus-0.3.95.dist-info/entry_points.txt,sha256=accRcwir_K8wCf7i3qHb5R6CPh5SiSgd5a1A92ibb9E,56
28
+ moteus-0.3.95.dist-info/top_level.txt,sha256=aZzmI_yecTaDrdSp29pTJuowaSQ9dlIZheQpshGg4YQ,7
29
+ moteus-0.3.95.dist-info/RECORD,,