-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopenesc.json
196 lines (196 loc) · 6.59 KB
/
openesc.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
{
"definition": "openesc",
"messages": {
"set": {
"set_device_id": {
"id": "100",
"description": "Set the device ID.",
"payload": [
{
"name": "device_id",
"type": "u8",
"description": "Device ID (0-254). 255 is reserved for broadcast messages."
}
]
},
"set_throttle": {
"id": "101",
"description": "set the throttle signal (12bit)",
"payload": [
{
"name": "throttle_signal",
"type": "u16",
"description": "the throttle signal! the throttle controls the duty (torque)"
}
]
},
"set_armed_state": {
"id": "101",
"description": "arm or disarm the esc",
"payload": [
{
"name": "armed",
"type": "u16",
"description": "0: disarmed, 1: armed"
}
]
},
"set_register": {
"id": "102",
"description": "write register",
"payload": [
{
"name": "value",
"type": "u32",
"description": "register value"
},
{
"name": "address",
"type": "u16",
"description": "register address"
}
]
},
"set_register_multi": {
"id": "103",
"description": "write multiple registers",
"payload": [
{
"name": "address",
"type": "u16",
"description": "register base address"
},
{
"name": "data",
"type": "vector",
"vector": {
"sizetype": "u16",
"datatype": "u8",
"size": "dynamic"
},
"desciption": "register data"
}
]
}
},
"get": {
"state": {
"id": "110",
"description": "esc state information",
"payload": [
{
"name": "phaseA",
"type": "u16",
"description": "phase A adc reading"
},
{
"name": "phaseB",
"type": "u16",
"description": "phase B adc reading"
},
{
"name": "phaseC",
"type": "u16",
"description": "phase C adc reading"
},
{
"name": "neutral",
"type": "u16",
"description": "virtual neutral point adc reading"
},
{
"name": "voltage",
"type": "u16",
"description": "voltage adc reading"
},
{
"name": "current",
"type": "u16",
"description": "current adc reading"
},
{
"name": "throttle",
"type": "u16",
"description": "throttle signal"
},
{
"name": "commutation_period",
"type": "u16",
"description": "commutation timer period (auto-reload ARR register value)"
},
{
"name": "flags",
"type": "u16",
"description": "development flags"
}
]
},
"register": {
"id": "111",
"description": "register value",
"payload": [
{
"name": "value",
"type": "u32",
"description": "register value"
},
{
"name": "address",
"type": "u16",
"description": "register address"
}
]
},
"register_multi": {
"id": "112",
"description": "multiple sequential register values",
"payload": [
{
"name": "address",
"type": "u16",
"description": "starting address"
},
{
"name": "data",
"type": "vector",
"vector": {
"sizetype": "u16",
"datatype": "u8",
"size": "dynamic"
},
"description": "register data"
}
]
}
},
"control": {
"read_register": {
"id": "120",
"description": "read a register",
"payload": [
{
"name": "address",
"type": "u16",
"description": "register address"
}
]
},
"read_register_multi": {
"id": "121",
"description": "read multiple registers",
"payload": [
{
"name": "address",
"type": "u16",
"description": "register address"
},
{
"name": "count",
"type": "u16",
"description": "number of registers to read"
}
]
}
}
}
}