xieb
2023-09-13 3667807a7b7418efc090ee3fa6a6b734bc3080bf
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
export interface ErrorCode {
  code: number;
  msg: string;
}
 
/**
 * 根据错误码翻译错误信息
 * @param code
 * @param errorMsg
 * @returns
 */
export function getErrorMessage (code: number, errorMsg?: string): string {
  const errorInfo = ERROR_CODE.find((item: ErrorCode) => item.code === code)
  return errorInfo ? errorInfo.msg : errorMsg || 'Server error'
}
 
// 暂时只添加航线错误
export const ERROR_CODE = [
  {
    code: 314001,
    msg: 'The issued route task url is empty',
  },
  {
    code: 314002,
    msg: 'The issued route task md5 is empty',
  },
  {
    code: 314003,
    msg: 'MissionID is invalid',
  },
  {
    code: 314004,
    msg: 'Failed to send flight route task from cloud',
  },
  {
    code: 314005,
    msg: 'Route md5 check failed',
  },
  {
    code: 314006,
    msg: 'Timeout waiting for aircraft to upload route (waiting for gs_state)',
  },
  {
    code: 314007,
    msg: 'Failed to upload route to aircraft',
  },
  {
    code: 314008,
    msg: 'Timeout waiting for the aircraft to enter the route executable state',
  },
  {
    code: 314009,
    msg: 'Failed to open route mission',
  },
  {
    code: 314010,
    msg: 'Route execution failed',
  },
  {
    code: 316001,
    msg: 'Failed to set alternate point',
  },
  {
    code: 316002,
    msg: 'Alternate safety transfer altitude equipment failed',
  },
  {
    code: 316003,
    msg: 'Failed to set takeoff altitude. Remarks: The default safe takeoff height of the aircraft set by the current DJI Dock is: 1.8',
  },
  {
    code: 316004,
    msg: 'Failed to set runaway behavior',
  },
  {
    code: 316005,
    msg: 'Aircraft RTK convergence failed',
  },
  {
    code: 316013,
    msg: 'DJI Dock Moved',
  },
  {
    code: 316015,
    msg: 'The aircraft RTK convergence position is too far from the DJI Dock',
  },
  {
    code: 316007,
    msg: 'Set parameter timeout while waiting for aircraft to be ready',
  },
  {
    code: 316008,
    msg: 'Failed to gain control of aircraft',
  },
  {
    code: 316009,
    msg: 'Aircraft power is low',
  },
  {
    code: 316010,
    msg: 'After power on, the aircraft is not connected for more than 2 minutes (flight control OSD reception timeout)',
  },
  {
    code: 316011,
    msg: 'Landing Position Offset',
  },
 
  {
    code: 317001,
    msg: 'Failed to get the number of media files',
  },
 
  {
    code: 319001,
    msg: 'The task center is not currently idle',
  },
  {
    code: 319002,
    msg: 'dronenest communication timeout',
  },
  {
    code: 319999,
    msg: 'Unknown error, e.g. restart after crash',
  },
  {
    code: 321000,
    msg: 'Route execution failed, unknown error',
  },
  {
    code: 321257,
    msg: 'The route has already started and cannot be started again',
  },
  {
    code: 321258,
    msg: 'The route cannot be interrupted in this state',
  },
  {
    code: 321259,
    msg: 'The route has not started and cannot end the route',
  },
  {
    code: 321513,
    msg: 'Reach the height limit',
  },
  {
    code: 321514,
    msg: 'Reach the limit',
  },
  {
    code: 321515,
    msg: 'Crossing the restricted flight zone',
  },
  {
    code: 321516,
    msg: 'Low limit',
  },
 
  {
    code: 321517,
    msg: 'Obstacle Avoidance',
  },
  {
    code: 321769,
    msg: 'Weak GPS signal',
  },
  {
    code: 321770,
    msg: 'The current gear state cannot be executed, B control seizes the control, and the gear is switched',
  },
  {
    code: 321771,
    msg: 'The home point is not refreshed',
  },
  {
    code: 321772,
    msg: 'The current battery is too low to start the task',
  },
  {
    code: 321773,
    msg: 'Low battery return',
  },
  {
    code: 321776,
    msg: 'RTK not ready',
  },
  {
    code: 321778,
    msg: 'The aircraft is idling on the ground and is not allowed to start the route, thinking that the user is not ready.',
  },
  {
    code: 322282,
    msg: 'User interrupt (B control takeover)',
  },
  {
    code: 514100,
    msg: 'Command not supported',
  },
  {
    code: 514101,
    msg: 'Failed to close putter',
  },
  {
    code: 514102,
    msg: 'Failed to release putter',
  },
  {
    code: 514103,
    msg: 'Aircraft battery is low',
  },
  {
    code: 514104,
    msg: 'Failed to start charging',
  },
  {
    code: 514105,
    msg: 'Failed to stop charging',
  },
  {
    code: 514106,
    msg: 'Failed to restart the aircraft',
  },
  {
    code: 514107,
    msg: 'Failed to open hatch',
  },
  {
    code: 514108,
    msg: 'Failed to close hatch',
  },
  {
    code: 514109,
    msg: 'Failed to open the plane',
  },
  {
    code: 514110,
    msg: 'Failed to close the plane',
  },
  {
    code: 514111,
    msg: 'The aircraft failed to turn on the slow-rotating propeller in the cabin',
  },
  {
    code: 514112,
    msg: 'The aircraft failed to stop the slow-rotating propeller in the cabin',
  },
  {
    code: 514113,
    msg: 'Failed to establish wired connection with aircraft',
  },
  {
    code: 514114,
    msg: 'Get aircraft power status, command timed out, or return code is not 0',
  },
  {
    code: 514116,
    msg: 'The DJI Dock is busy and other control orders are being executed at the DJI Dock',
  },
  {
    code: 514117,
    msg: 'Check hatch status failed',
  },
  {
    code: 514118,
    msg: 'Check putter status failed',
  },
  {
    code: 514120,
    msg: 'DJI Dock and aircraft SDR connection failed',
  },
  {
    code: 514121,
    msg: 'Emergency stop state',
  },
  {
    code: 514122,
    msg: 'Failed to get the charging status of the aircraft (Failed to get the charging status, the flight mission can be executed, affecting charging and remote troubleshooting)',
  },
  {
    code: 514123,
    msg: 'Unable to power on due to low battery',
  },
  {
    code: 514124,
    msg: 'Failed to get battery information',
  },
  {
    code: 514125,
    msg: 'The battery is fully charged and cannot be charged',
  },
  {
    code: 514145,
    msg: 'Can not work while debugging on site',
  },
  {
    code: 514146,
    msg: 'Unable to work in remote debugging',
  },
  {
    code: 514147,
    msg: 'Unable to work in upgrade state',
  },
  {
    code: 514148,
    msg: 'Unable to execute new tasks in job state',
  },
  {
    code: 514150,
    msg: 'DJI Dock is automatically restarting',
  },
]