moteus 0.3.81__py3-none-any.whl → 0.3.83__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/moteus_tool.py +59 -6
- moteus/version.py +1 -1
- {moteus-0.3.81.dist-info → moteus-0.3.83.dist-info}/METADATA +1 -1
- {moteus-0.3.81.dist-info → moteus-0.3.83.dist-info}/RECORD +7 -7
- {moteus-0.3.81.dist-info → moteus-0.3.83.dist-info}/WHEEL +0 -0
- {moteus-0.3.81.dist-info → moteus-0.3.83.dist-info}/entry_points.txt +0 -0
- {moteus-0.3.81.dist-info → moteus-0.3.83.dist-info}/top_level.txt +0 -0
moteus/moteus_tool.py
CHANGED
@@ -78,7 +78,7 @@ def stddev(data):
|
|
78
78
|
mean = sum(data) / len(data)
|
79
79
|
return math.sqrt(sum((x - mean) ** 2 for x in data) / len(data))
|
80
80
|
|
81
|
-
SUPPORTED_ABI_VERSION =
|
81
|
+
SUPPORTED_ABI_VERSION = 0x010b
|
82
82
|
|
83
83
|
# Old firmwares used a slightly incorrect definition of Kv/v_per_hz
|
84
84
|
# that didn't match with vendors or oscilloscope tests.
|
@@ -105,6 +105,34 @@ class FirmwareUpgrade:
|
|
105
105
|
lines = old_config.split(b'\n')
|
106
106
|
items = dict([line.split(b' ') for line in lines if b' ' in line])
|
107
107
|
|
108
|
+
if self.new <= 0x010a and self.old >= 0x010b:
|
109
|
+
flux_brake_margin_voltage = float(items.pop(b'servo.flux_brake_margin_voltage'))
|
110
|
+
max_voltage = float(items[b'servo.max_voltage'])
|
111
|
+
|
112
|
+
flux_brake_min_voltage = max_voltage - flux_brake_margin_voltage
|
113
|
+
|
114
|
+
print(f"Downgrading servo.flux_brake_margin_voltage to servo.flux_brake_min_voltage={flux_brake_min_voltage}")
|
115
|
+
|
116
|
+
items[b'servo.flux_brake_min_voltage'] = str(flux_brake_min_voltage).encode('utf8')
|
117
|
+
|
118
|
+
temperature_margin = float(items.pop(b'servo.temperature_margin'))
|
119
|
+
fault_temperature = float(items[b'servo.fault_temperature'])
|
120
|
+
|
121
|
+
derate_temperature = fault_temperature - temperature_margin
|
122
|
+
|
123
|
+
print(f"Downgrading servo.temperature_margin to servo.derate_temperature={derate_temperature}")
|
124
|
+
items[b'servo.derate_temperature'] = str(derate_temperature).encode('utf8')
|
125
|
+
|
126
|
+
motor_temperature_margin = float(items.pop(b'servo.motor_temperature_margin'))
|
127
|
+
motor_fault_temperature = float(items[b'servo.motor_fault_temperature'])
|
128
|
+
motor_derate_temperature = (
|
129
|
+
(motor_fault_temperature - motor_temperature_margin)
|
130
|
+
if math.isfinite(motor_fault_temperature) else
|
131
|
+
50)
|
132
|
+
|
133
|
+
print(f"Downgrading servo.motor_temperature_margin to servo.motor_derate_temperature={motor_derate_temperature}")
|
134
|
+
items[b'servo.motor_derate_temperature'] = str(motor_derate_temperature).encode('utf8')
|
135
|
+
|
108
136
|
if self.new <= 0x0109 and self.old >= 0x010a:
|
109
137
|
kv = float(items.pop(b'motor.Kv'))
|
110
138
|
|
@@ -500,6 +528,35 @@ class FirmwareUpgrade:
|
|
500
528
|
items[b'servo.max_power_W'] = str(old_max_power * (pwm_rate / 40000)).encode('utf8')
|
501
529
|
print(f"Upgraded servo.max_power_W to {items[b'servo.max_power_W'].decode('utf8')} for 0x010a")
|
502
530
|
|
531
|
+
if self.new >= 0x010b and self.old <= 0x010a:
|
532
|
+
flux_brake_min_voltage = float(items.pop(b'servo.flux_brake_min_voltage'))
|
533
|
+
max_voltage = float(items[b'servo.max_voltage'])
|
534
|
+
|
535
|
+
flux_brake_margin_voltage = max(0, max_voltage - flux_brake_min_voltage)
|
536
|
+
|
537
|
+
print(f"Upgraded servo.flux_brake_min_voltage to servo.flux_brake_margin_voltage={flux_brake_margin_voltage}")
|
538
|
+
items[b'servo.flux_brake_margin_voltage'] = str(flux_brake_margin_voltage).encode('utf8')
|
539
|
+
|
540
|
+
|
541
|
+
derate_temperature = float(items.pop(b'servo.derate_temperature'))
|
542
|
+
fault_temperature = float(items[b'servo.fault_temperature'])
|
543
|
+
|
544
|
+
temperature_margin = fault_temperature - derate_temperature
|
545
|
+
|
546
|
+
print(f"Upgraded servo.derate_temperature to servo.temperature_margin={temperature_margin}")
|
547
|
+
items[b'servo.temperature_margin'] = str(temperature_margin).encode('utf8')
|
548
|
+
|
549
|
+
|
550
|
+
motor_derate_temperature = float(items.pop(b'servo.motor_derate_temperature'))
|
551
|
+
motor_fault_temperature = float(items[b'servo.motor_fault_temperature'])
|
552
|
+
|
553
|
+
motor_temperature_margin = (
|
554
|
+
(motor_fault_temperature - motor_derate_temperature)
|
555
|
+
if math.isfinite(motor_fault_temperature) else
|
556
|
+
20)
|
557
|
+
print(f"Upgraded servo.motor_derate_temperature to servo.motor_temperature_margin={motor_temperature_margin}")
|
558
|
+
items[b'servo.motor_temperature_margin'] = str(motor_temperature_margin).encode('utf8')
|
559
|
+
|
503
560
|
lines = [key + b' ' + value for key, value in items.items()]
|
504
561
|
return b'\n'.join(lines)
|
505
562
|
|
@@ -1082,12 +1139,8 @@ class Stream:
|
|
1082
1139
|
raise
|
1083
1140
|
pass
|
1084
1141
|
|
1085
|
-
|
1142
|
+
if await self.is_config_supported("motor_position.sources.0.sign"):
|
1086
1143
|
await self.command("conf set motor_position.sources.0.sign 1")
|
1087
|
-
except moteus.CommandError as e:
|
1088
|
-
if not 'error setting' in e.message:
|
1089
|
-
raise
|
1090
|
-
pass
|
1091
1144
|
|
1092
1145
|
# We have 3 things to calibrate.
|
1093
1146
|
# 1) The encoder to phase mapping
|
moteus/version.py
CHANGED
@@ -6,7 +6,7 @@ moteus/command.py,sha256=UkOsbtkso6Oyex8CfbpAKpBNriik519ymxL86EZGkRs,1169
|
|
6
6
|
moteus/export.py,sha256=XitBUuf4MDRIneXQSUptizIhZi2BdHyFO2Vo_2d2CFI,1742
|
7
7
|
moteus/fdcanusb.py,sha256=7PrQiCTROY96gdT2zSZYU1bOCriw-I7H6NspaZpiEx4,7431
|
8
8
|
moteus/moteus.py,sha256=vImSRBn6VEmoijD6hvrSRVxuv1_xVaEJU3F_3Wi6GiE,52498
|
9
|
-
moteus/moteus_tool.py,sha256=
|
9
|
+
moteus/moteus_tool.py,sha256=Y3yc84JLsxviX8xKSsQs4vgiQDao3HrTZDWY4Nl4C9w,96721
|
10
10
|
moteus/multiplex.py,sha256=2tdNX5JSh21TOjN6N9LKribLQtVYyyYbXjzwXB64sfA,12119
|
11
11
|
moteus/posix_aioserial.py,sha256=2oDrw8TBEwuEQjY41g9rHeuFeffcPHqMwNS3nf5NVq8,3137
|
12
12
|
moteus/pythoncan.py,sha256=M5Qba3aCzO_GyXcIsLJxjw3NrPgUk4CUnHOQIhQeIb0,4786
|
@@ -14,10 +14,10 @@ moteus/reader.py,sha256=9i1-h4aGd4syfqtWJcpg70Bl-bmunkGU4FmXmOLyRt8,12121
|
|
14
14
|
moteus/regression.py,sha256=M5gjDBYJQ64iBXIrvBhMkD8TYhtlnQ85x8U4py0niGA,1196
|
15
15
|
moteus/router.py,sha256=501W5GZ12rFoc1lmcH3S7IYsoc-Q_-FJ4B3i37RzE3Q,2061
|
16
16
|
moteus/transport.py,sha256=WhkW2G9i25lkOlO55eI5_oXmU0PhDmxTeJ75Sg_7nTI,1021
|
17
|
-
moteus/version.py,sha256=
|
17
|
+
moteus/version.py,sha256=7Jp_Mv1z0v2vl9MnwL1_tj1x0iFjbf5TbzFIT97SAR4,627
|
18
18
|
moteus/win32_aioserial.py,sha256=culdl-vYxBKD5n2s5LkIMGyUaHyCcEc8BL5-DWEaxX8,2025
|
19
|
-
moteus-0.3.
|
20
|
-
moteus-0.3.
|
21
|
-
moteus-0.3.
|
22
|
-
moteus-0.3.
|
23
|
-
moteus-0.3.
|
19
|
+
moteus-0.3.83.dist-info/METADATA,sha256=ii1jDDBkGADmZV_RnNXW7N_nIAGS9i_UkqHqWTykcvc,3441
|
20
|
+
moteus-0.3.83.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
21
|
+
moteus-0.3.83.dist-info/entry_points.txt,sha256=accRcwir_K8wCf7i3qHb5R6CPh5SiSgd5a1A92ibb9E,56
|
22
|
+
moteus-0.3.83.dist-info/top_level.txt,sha256=aZzmI_yecTaDrdSp29pTJuowaSQ9dlIZheQpshGg4YQ,7
|
23
|
+
moteus-0.3.83.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|