odrive 0.6.9.dev0__py37-none-win_amd64.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.
Files changed (49) hide show
  1. odrive/__init__.py +142 -0
  2. odrive/api_client.py +54 -0
  3. odrive/config.py +1296 -0
  4. odrive/crypto.py +369 -0
  5. odrive/data/brakeRs.json +18 -0
  6. odrive/data/drvs.json +82 -0
  7. odrive/data/encoders.json +86 -0
  8. odrive/data/motors.json +128 -0
  9. odrive/data/odrive-micro-x1.json +48 -0
  10. odrive/data/odrive-micro-x3.json +40 -0
  11. odrive/data/odrive-micro-x4.json +40 -0
  12. odrive/data/odrive-s1-x4.json +52 -0
  13. odrive/data/odrive-v4.4.json +58 -0
  14. odrive/data/schema-brakeR.json +6 -0
  15. odrive/data/schema-drv.json +6 -0
  16. odrive/data/schema-encoders.json +6 -0
  17. odrive/data/schema-motors.json +6 -0
  18. odrive/data/schema-odrive.json +5 -0
  19. odrive/data/schema.json +244 -0
  20. odrive/database.py +184 -0
  21. odrive/dfu.py +195 -0
  22. odrive/dfuse/DfuDevice.py +297 -0
  23. odrive/dfuse/__init__.py +1 -0
  24. odrive/enums.py +415 -0
  25. odrive/firmware.py +102 -0
  26. odrive/hw_version.py +67 -0
  27. odrive/legacy.py +73 -0
  28. odrive/legacy_config.py +123 -0
  29. odrive/legacy_dfu.py +442 -0
  30. odrive/lib/libodrive-windows-x64.dll +0 -0
  31. odrive/libodrive.py +325 -0
  32. odrive/pyfibre/fibre/__init__.py +4 -0
  33. odrive/pyfibre/fibre/libfibre-windows-amd64.dll +0 -0
  34. odrive/pyfibre/fibre/libfibre.py +1078 -0
  35. odrive/pyfibre/fibre/libwinpthread-1.dll +0 -0
  36. odrive/pyfibre/fibre/shell.py +162 -0
  37. odrive/pyfibre/fibre/utils.py +133 -0
  38. odrive/release_api.py +184 -0
  39. odrive/rich_text.py +134 -0
  40. odrive/shell.py +144 -0
  41. odrive/utils.py +881 -0
  42. odrive/version.py +1 -0
  43. odrive-0.6.9.dev0.data/scripts/odrive_demo.py +50 -0
  44. odrive-0.6.9.dev0.data/scripts/odrivetool +263 -0
  45. odrive-0.6.9.dev0.data/scripts/odrivetool.bat +2 -0
  46. odrive-0.6.9.dev0.dist-info/METADATA +22 -0
  47. odrive-0.6.9.dev0.dist-info/RECORD +49 -0
  48. odrive-0.6.9.dev0.dist-info/WHEEL +5 -0
  49. odrive-0.6.9.dev0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "ODrive Micro X1",
3
+ "mcu": "STM32H72x",
4
+ "min_voltage": 6.0,
5
+ "max_voltage": 30.0,
6
+ "inverters": [
7
+ {"drv": {"$ref": "drv8316"}, "max_current": 15.0}
8
+ ],
9
+ "rails": {},
10
+ "aux_inverters": [],
11
+ "io": {
12
+ "gpio0": "io",
13
+ "gpio1": "t",
14
+ "gpio2": "io",
15
+ "gpio3": "io",
16
+ "gpio4": "io",
17
+ "gpio5": "ia",
18
+ "gpio6": "ia",
19
+ "gpio7": "i",
20
+ "gpio8": "io",
21
+ "gpio9": "io",
22
+ "gpio10": "iop",
23
+ "gpio11": "io",
24
+ "miso": "",
25
+ "mosi": "",
26
+ "sck": ""
27
+ },
28
+ "inc_enc": [
29
+ {"a": "gpio2", "b": "gpio3"}
30
+ ],
31
+ "spi": [
32
+ {"miso": "miso", "mosi": "mosi", "sck": "sck"}
33
+ ],
34
+ "uart": [
35
+ {"rx": "gpio9", "tx": "gpio8"}
36
+ ],
37
+ "step_dir": [
38
+ {"step": "gpio10", "dir": "gpio11"}
39
+ ],
40
+ "rs485": [],
41
+ "temp_in": [{"io": "gpio1", "r_load": 1000, "thermistor_bottom": true}],
42
+ "fan": false,
43
+ "onboard_encoders": 1,
44
+ "defaults": {
45
+ "inc_enc_z": ["gpio4"],
46
+ "spi_ncs": ["gpio0"]
47
+ }
48
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "ODrive Micro X3",
3
+ "mcu": "STM32H72x",
4
+ "min_voltage": 6.0,
5
+ "max_voltage": 30.0,
6
+ "inverters": [
7
+ {"drv": {"$ref": "drv8316"}, "max_current": 15.0}
8
+ ],
9
+ "rails": {},
10
+ "aux_inverters": [],
11
+ "io": {
12
+ "gpio0": "io",
13
+ "gpio1": "t",
14
+ "gpio2": "io",
15
+ "gpio3": "io",
16
+ "gpio4": "io",
17
+ "gpio5": "ia",
18
+ "gpio6": "ia",
19
+ "gpio7": "i",
20
+ "miso": "",
21
+ "mosi": "",
22
+ "sck": ""
23
+ },
24
+ "inc_enc": [
25
+ {"a": "gpio2", "b": "gpio3"}
26
+ ],
27
+ "spi": [
28
+ {"miso": "miso", "mosi": "mosi", "sck": "sck"}
29
+ ],
30
+ "uart": [],
31
+ "step_dir": [],
32
+ "rs485": [],
33
+ "temp_in": [{"io": "gpio1", "r_load": 1000, "thermistor_bottom": true}],
34
+ "fan": false,
35
+ "onboard_encoders": 1,
36
+ "defaults": {
37
+ "inc_enc_z": ["gpio4"],
38
+ "spi_ncs": ["gpio0"]
39
+ }
40
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "ODrive Micro X4",
3
+ "mcu": "STM32H72x",
4
+ "min_voltage": 6.0,
5
+ "max_voltage": 30.0,
6
+ "inverters": [
7
+ {"drv": {"$ref": "drv8316"}, "max_current": 15.0}
8
+ ],
9
+ "rails": {},
10
+ "aux_inverters": [],
11
+ "io": {
12
+ "gpio0": "io",
13
+ "gpio1": "t",
14
+ "gpio2": "io",
15
+ "gpio3": "io",
16
+ "gpio4": "io",
17
+ "gpio5": "ia",
18
+ "gpio6": "ia",
19
+ "gpio7": "i",
20
+ "miso": "",
21
+ "mosi": "",
22
+ "sck": ""
23
+ },
24
+ "inc_enc": [
25
+ {"a": "gpio2", "b": "gpio3"}
26
+ ],
27
+ "spi": [
28
+ {"miso": "miso", "mosi": "mosi", "sck": "sck"}
29
+ ],
30
+ "uart": [],
31
+ "step_dir": [],
32
+ "rs485": [],
33
+ "temp_in": [{"io": "gpio1", "r_load": 1000, "thermistor_bottom": true}],
34
+ "fan": false,
35
+ "onboard_encoders": 1,
36
+ "defaults": {
37
+ "inc_enc_z": ["gpio4"],
38
+ "spi_ncs": ["gpio0"]
39
+ }
40
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "ODrive S1 X4",
3
+ "mcu": "STM32H72x",
4
+ "min_voltage": 10.5,
5
+ "max_voltage": 54.0,
6
+ "inverters": [
7
+ {"drv": {"$ref": "drv8353"}, "max_current": 150.0}
8
+ ],
9
+ "rails": {
10
+ "5v": 5.0,
11
+ "vcc": 3.3
12
+ },
13
+ "aux_inverters": [{}],
14
+ "io": {
15
+ "gpio0": "iod",
16
+ "gpio1": "ioa",
17
+ "gpio2": "io",
18
+ "gpio3": "io",
19
+ "gpio4": "t",
20
+ "gpio5": "i",
21
+ "gpio6": "o",
22
+ "gpio7": "i",
23
+ "gpio8": "ip",
24
+ "gpio9": "io",
25
+ "gpio10": "io",
26
+ "gpio11": "ioa",
27
+ "gpio12": "o",
28
+ "miso": "",
29
+ "mosi": "",
30
+ "sck": ""
31
+ },
32
+ "inc_enc": [
33
+ {"a": "gpio3", "b": "gpio9"}
34
+ ],
35
+ "spi": [
36
+ {"miso": "miso", "mosi": "mosi", "sck": "sck"}
37
+ ],
38
+ "uart": [
39
+ {"rx": "gpio7", "tx": "gpio6"}
40
+ ],
41
+ "step_dir": [
42
+ {"step": "gpio8", "dir": "gpio5"}
43
+ ],
44
+ "rs485": ["gpio0"],
45
+ "temp_in": [{"io": "gpio4", "r_load": 1000, "thermistor_bottom": true}],
46
+ "fan": false,
47
+ "onboard_encoders": 1,
48
+ "defaults": {
49
+ "inc_enc_z": ["gpio10"],
50
+ "spi_ncs": ["gpio12"]
51
+ }
52
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "ODrive Pro v4.4-58V",
3
+ "mcu": "STM32H7A3",
4
+ "min_voltage": 10.5,
5
+ "max_voltage": 64.0,
6
+ "inverters": [
7
+ {"drv": {"$ref": "drv8353"}, "max_current": 150.0}
8
+ ],
9
+ "aux_inverters": [],
10
+ "rails": {
11
+ "vcc": 3.3,
12
+ "mio_vdd": 5.0,
13
+ "5v": 5.0,
14
+ "12v": 12.0
15
+ },
16
+ "io": {
17
+ "gpio0": "dio",
18
+ "gpio1": "i",
19
+ "gpio2": "i",
20
+ "gpio3": "to",
21
+ "gpio4": "i",
22
+ "gpio5": "i",
23
+ "gpio6": "i",
24
+ "gpio7": "i",
25
+ "gpio8": "ip",
26
+ "gpio9": "ip",
27
+ "gpio10": "o",
28
+ "gpio11": "i",
29
+ "gpio12": "i",
30
+ "gpio13": "o",
31
+ "gpio14": "io",
32
+ "gpio15": "ioa",
33
+ "gpio16": "ioa",
34
+ "gpio17": "do",
35
+ "gpio18": "di"
36
+ },
37
+ "inc_enc": [
38
+ {"a": "gpio1", "b": "gpio6"},
39
+ {"a": "gpio16", "b": "gpio15"}
40
+ ],
41
+ "spi": [
42
+ {"miso": "gpio18", "mosi": "gpio14", "sck": "gpio0"}
43
+ ],
44
+ "uart": [
45
+ {"rx": "gpio12", "tx": "gpio13"}
46
+ ],
47
+ "step_dir": [
48
+ {"step": "gpio8", "dir": "gpio9"}
49
+ ],
50
+ "rs485": ["gpio0"],
51
+ "temp_in": [{"io": "gpio3", "r_load": 1000, "thermistor_bottom": true}],
52
+ "fan": true,
53
+ "onboard_encoders": 1,
54
+ "defaults": {
55
+ "inc_enc_z": ["gpio7", "gpio14"],
56
+ "spi_ncs": ["gpio17"]
57
+ }
58
+ }
@@ -0,0 +1,6 @@
1
+
2
+ {
3
+ "$schema": "http://json-schema.org/schema",
4
+ "type": "object",
5
+ "additionalProperties": {"$ref": "schema.json#/$defs/brakeR"}
6
+ }
@@ -0,0 +1,6 @@
1
+
2
+ {
3
+ "$schema": "http://json-schema.org/schema",
4
+ "type": "object",
5
+ "additionalProperties": {"$ref": "schema.json#/$defs/drv"}
6
+ }
@@ -0,0 +1,6 @@
1
+
2
+ {
3
+ "$schema": "http://json-schema.org/schema",
4
+ "type": "object",
5
+ "additionalProperties": {"$ref": "schema.json#/$defs/encoder"}
6
+ }
@@ -0,0 +1,6 @@
1
+
2
+ {
3
+ "$schema": "http://json-schema.org/schema",
4
+ "type": "object",
5
+ "additionalProperties": {"$ref": "schema.json#/$defs/motor"}
6
+ }
@@ -0,0 +1,5 @@
1
+
2
+ {
3
+ "$schema": "http://json-schema.org/schema",
4
+ "$ref": "schema.json#/$defs/odrive"
5
+ }
@@ -0,0 +1,244 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$defs": {
4
+ "odrive": {
5
+ "type": "object",
6
+ "properties": {
7
+ "name": {"type": "string"},
8
+ "mcu": {"type": "string"},
9
+ "min_voltage": {"type": "number"},
10
+ "max_voltage": {"type": "number"},
11
+ "inverters": {
12
+ "type": "array",
13
+ "items":{
14
+ "type": "object",
15
+ "properties": {
16
+ "drv": {
17
+ "anyOf": [
18
+ {"$ref": "#/$defs/ref"},
19
+ {"$ref": "#/$defs/drv"}
20
+ ]
21
+ },
22
+ "max_current": {"type": "number"}
23
+ },
24
+ "required": ["drv"],
25
+ "additionalProperties": false
26
+ }
27
+ },
28
+ "aux_inverters": {
29
+ "type": "array",
30
+ "items":{
31
+ "type": "object",
32
+ "properties": {},
33
+ "additionalProperties": false
34
+ }
35
+ },
36
+ "rails": {
37
+ "additionalProperties": {
38
+ "type": "number"
39
+ }
40
+ },
41
+ "io": {
42
+ "additionalProperties": {
43
+ "type": "string",
44
+ "pattern": "^[tioapd]*$"
45
+ }
46
+ },
47
+ "inc_enc": {
48
+ "type": "array",
49
+ "items": {
50
+ "type": "object",
51
+ "properties": {
52
+ "a": {"$ref": "#/$defs/ioName"},
53
+ "b": {"$ref": "#/$defs/ioName"}
54
+ },
55
+ "required": ["a", "b"],
56
+ "additionalProperties": false
57
+ }
58
+ },
59
+ "spi": {
60
+ "type": "array",
61
+ "items": {
62
+ "type": "object",
63
+ "properties": {
64
+ "miso": {"$ref": "#/$defs/optionalIoName"},
65
+ "mosi": {"$ref": "#/$defs/optionalIoName"},
66
+ "sck": {"$ref": "#/$defs/optionalIoName"}
67
+ },
68
+ "required": ["miso", "mosi", "sck"],
69
+ "additionalProperties": false
70
+ }
71
+ },
72
+ "uart": {
73
+ "type": "array",
74
+ "items": {
75
+ "type": "object",
76
+ "properties": {
77
+ "rx": {"$ref": "#/$defs/ioName"},
78
+ "tx": {"$ref": "#/$defs/ioName"}
79
+ },
80
+ "required": ["rx", "tx"],
81
+ "additionalProperties": false
82
+ }
83
+ },
84
+ "step_dir": {
85
+ "type": "array",
86
+ "items": {
87
+ "type": "object",
88
+ "properties": {
89
+ "step": {"$ref": "#/$defs/ioName"},
90
+ "dir": {"$ref": "#/$defs/ioName"}
91
+ },
92
+ "required": ["step", "dir"],
93
+ "additionalProperties": false
94
+ }
95
+ },
96
+ "rs485": {
97
+ "type": "array",
98
+ "items": {"$ref": "#/$defs/ioName"}
99
+ },
100
+ "temp_in": {
101
+ "type": "array",
102
+ "items": {
103
+ "type": "object",
104
+ "properties": {
105
+ "io": {"$ref": "#/$defs/ioName"},
106
+ "r_load": {"type": "number"},
107
+ "thermistor_bottom": {"type": "boolean"}
108
+ },
109
+ "required": ["io", "r_load", "thermistor_bottom"],
110
+ "additionalProperties": false
111
+ }
112
+ },
113
+ "fan": {"type": "boolean"},
114
+ "onboard_encoders": {"type": "number"},
115
+ "defaults": {
116
+ "type": "object",
117
+ "properties": {
118
+ "inc_enc_z": {
119
+ "type": "array",
120
+ "items": {"$ref": "#/$defs/ioName"}
121
+ },
122
+ "spi_ncs": {
123
+ "type": "array",
124
+ "items": {"$ref": "#/$defs/ioName"}
125
+ }
126
+ },
127
+ "required": ["inc_enc_z", "spi_ncs"],
128
+ "additionalProperties": false
129
+ }
130
+ },
131
+ "required": ["inverters", "aux_inverters", "io", "inc_enc", "spi", "rs485", "temp_in", "fan", "defaults"],
132
+ "additionalProperties": false
133
+ },
134
+
135
+ "ioName": {
136
+ "type": "string"
137
+ },
138
+ "optionalIoName": {
139
+ "type": ["string", "null"]
140
+ },
141
+
142
+ "drv": {
143
+ "type": "object",
144
+ "properties": {
145
+ "faults": {
146
+ "type": "array",
147
+ "items": {
148
+ "type": "array",
149
+ "items": [
150
+ {"type": "number"},
151
+ {"type": "string"}
152
+ ],
153
+ "minItems": 2,
154
+ "maxItems": 2
155
+ }
156
+ },
157
+ "config": {
158
+ "type": "array",
159
+ "items": {
160
+ "type": "object",
161
+ "properties": {
162
+ "name": {"type": "string"},
163
+ "pos": {"type": "number"},
164
+ "mask": {"type": "number"},
165
+ "codes": {
166
+ "type": "array",
167
+ "items": {"type": "string"}
168
+ }
169
+ },
170
+ "required": ["name", "pos", "mask", "codes"],
171
+ "additionalProperties": false
172
+ }
173
+ }
174
+ },
175
+ "required": ["faults", "config"],
176
+ "additionalProperties": false
177
+ },
178
+
179
+ "motor": {
180
+ "type": "object",
181
+ "properties": {
182
+ "phase_resistance": {"type": "number"},
183
+ "phase_inductance": {"type": "number"},
184
+ "pole_pairs": {"type": "number"},
185
+ "kv": {"type": "number"},
186
+ "torque_constant": {"type": "number"},
187
+ "max_current": {"type": "number"},
188
+ "max_temp": {"type": "number"},
189
+ "max_vel": {"type": "number"},
190
+ "calibration_current": {"type": "number"},
191
+ "moment_of_inertia": {"type": "number"},
192
+ "thermistor_r25": {"type": "number"},
193
+ "thermistor_beta": {"type": "number"},
194
+ "shop_url": {"type": "string"},
195
+ "show_in_gui": {"type": "boolean"},
196
+ "builtin_inc_cpr": {"type": "number"},
197
+ "builtin_hall": {"type": "boolean"}
198
+ },
199
+ "required": ["phase_resistance", "phase_inductance", "pole_pairs", "max_current"],
200
+ "oneOf": [
201
+ {"required": ["kv"]},
202
+ {"required": ["torque_constant"]}
203
+ ],
204
+ "additionalProperties": false
205
+ },
206
+
207
+ "encoder": {
208
+ "type": "object",
209
+ "properties": {
210
+ "inherits": {"type": "string"},
211
+ "type": {
212
+ "type": "string",
213
+ "enum": ["incremental", "rs485"]
214
+ },
215
+ "datasheet_url": {"type": "string"},
216
+ "cpr": {"type": "number"},
217
+ "protocol": {"type": "string"},
218
+ "max_rpm": {"type": "number"},
219
+ "shop_url": {"type": "string"},
220
+ "image": {"type": "string"},
221
+ "show_in_gui": {"type": "boolean"}
222
+ },
223
+ "additionalProperties": false
224
+ },
225
+
226
+ "brakeR": {
227
+ "type": "object",
228
+ "properties": {
229
+ "resistance": {"type": "number"},
230
+ "power_rating": {"type": "number"}
231
+ },
232
+ "required": ["resistance", "power_rating"],
233
+ "additionalProperties": false
234
+ },
235
+
236
+ "ref": {
237
+ "type": "object",
238
+ "properties": {
239
+ "$ref": {"type": "string"}
240
+ },
241
+ "required": ["$ref"]
242
+ }
243
+ }
244
+ }