config-editor-base 2.7.5 → 2.7.6

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.
@@ -76,7 +76,7 @@ var set = function set(alert) {
76
76
  };
77
77
  };
78
78
 
79
- var demoConfig = 'config-01.07.json';
79
+ var demoConfig = 'config-01.09.json';
80
80
  var regexUISchemaPublic = new RegExp(/^uischema-\d{2}\.\d{2}\.json/, 'g');
81
81
  var regexSchemaPublic = new RegExp(/^schema-\d{2}\.\d{2}\.json/, 'g');
82
82
  var isValidUISchema = function isValidUISchema(file) {
@@ -173,7 +173,280 @@ var publicUiSchemaFiles = function publicUiSchemaFiles(uiSchemaAry, schemaAry, d
173
173
  dispatch(setUISchemaContent(loadFile(uiSchemaAry[0])));
174
174
  }
175
175
  if (demoMode && schemaAry.length) {
176
- dispatch(publicSchemaFiles(demoConfig, schemaAry, {}, uiSchemaAry));
176
+ schemaAry = schemaAry.filter(function (e) {
177
+ return e.includes("CANedge3");
178
+ });
179
+ var demoContent = {
180
+ "general": {
181
+ "device": {},
182
+ "security": {},
183
+ "debug": {
184
+ "syslog": 1,
185
+ "restart_timer": 24
186
+ }
187
+ },
188
+ "log": {
189
+ "file": {
190
+ "split_size": 50,
191
+ "split_time_period": 0,
192
+ "split_time_offset": 0,
193
+ "cyclic": 1
194
+ },
195
+ "compression": {
196
+ "level": 0
197
+ },
198
+ "encryption": {
199
+ "state": 0
200
+ },
201
+ "error_frames": {
202
+ "state": 0
203
+ }
204
+ },
205
+ "rtc": {
206
+ "sync": 2,
207
+ "timezone": 0,
208
+ "adjustment": 0,
209
+ "tolerance": 30
210
+ },
211
+ "secondaryport": {
212
+ "power_schedule": []
213
+ },
214
+ "can_internal": {
215
+ "general": {
216
+ "rx_state": 1,
217
+ "tx_state": 1
218
+ },
219
+ "filter": {
220
+ "id": [{
221
+ "state": 1,
222
+ "type": 0,
223
+ "id_format": 0,
224
+ "method": 0,
225
+ "f1": "0",
226
+ "f2": "7FF",
227
+ "prescaler_type": 0
228
+ }]
229
+ },
230
+ "control": {
231
+ "control_rx_state": 0,
232
+ "control_tx_state": 0,
233
+ "start": {
234
+ "message": {
235
+ "chn": 0,
236
+ "id_format": 0,
237
+ "id": "0",
238
+ "id_mask": "7FF"
239
+ },
240
+ "signal": {
241
+ "type": 0,
242
+ "byteorder": 1,
243
+ "bitpos": 0,
244
+ "length": 0,
245
+ "factor": 0,
246
+ "offset": 0
247
+ },
248
+ "trigger_high": 0,
249
+ "trigger_low": 0
250
+ },
251
+ "stop": {
252
+ "message": {
253
+ "chn": 0,
254
+ "id_format": 0,
255
+ "id": "0",
256
+ "id_mask": "7FF"
257
+ },
258
+ "signal": {
259
+ "type": 0,
260
+ "byteorder": 1,
261
+ "bitpos": 0,
262
+ "length": 0,
263
+ "factor": 0,
264
+ "offset": 0
265
+ },
266
+ "trigger_high": 0,
267
+ "trigger_low": 0
268
+ }
269
+ }
270
+ },
271
+ "can_1": {
272
+ "general": {
273
+ "rx_state": 1,
274
+ "tx_state": 1
275
+ },
276
+ "phy": {
277
+ "mode": 1,
278
+ "retransmission": 1,
279
+ "fd_spec": 0,
280
+ "bit_rate_cfg_mode": 0
281
+ },
282
+ "filter": {
283
+ "remote_frames": 0,
284
+ "id": [{
285
+ "state": 1,
286
+ "type": 0,
287
+ "id_format": 0,
288
+ "method": 0,
289
+ "f1": "0",
290
+ "f2": "7FF",
291
+ "prescaler_type": 0
292
+ }]
293
+ },
294
+ "control": {
295
+ "control_rx_state": 0,
296
+ "control_tx_state": 0,
297
+ "start": {
298
+ "message": {
299
+ "chn": 0,
300
+ "id_format": 0,
301
+ "id": "0",
302
+ "id_mask": "7FF"
303
+ },
304
+ "signal": {
305
+ "type": 0,
306
+ "byteorder": 1,
307
+ "bitpos": 0,
308
+ "length": 0,
309
+ "factor": 0,
310
+ "offset": 0
311
+ },
312
+ "trigger_high": 0,
313
+ "trigger_low": 0
314
+ },
315
+ "stop": {
316
+ "message": {
317
+ "chn": 0,
318
+ "id_format": 0,
319
+ "id": "0",
320
+ "id_mask": "7FF"
321
+ },
322
+ "signal": {
323
+ "type": 0,
324
+ "byteorder": 1,
325
+ "bitpos": 0,
326
+ "length": 0,
327
+ "factor": 0,
328
+ "offset": 0
329
+ },
330
+ "trigger_high": 0,
331
+ "trigger_low": 0
332
+ }
333
+ }
334
+ },
335
+ "can_2": {
336
+ "general": {
337
+ "rx_state": 1,
338
+ "tx_state": 1
339
+ },
340
+ "phy": {
341
+ "mode": 1,
342
+ "retransmission": 1,
343
+ "fd_spec": 0,
344
+ "bit_rate_cfg_mode": 0
345
+ },
346
+ "filter": {
347
+ "remote_frames": 0,
348
+ "id": [{
349
+ "state": 1,
350
+ "type": 0,
351
+ "id_format": 0,
352
+ "method": 0,
353
+ "f1": "0",
354
+ "f2": "7FF",
355
+ "prescaler_type": 0
356
+ }]
357
+ },
358
+ "control": {
359
+ "control_rx_state": 0,
360
+ "control_tx_state": 0,
361
+ "start": {
362
+ "message": {
363
+ "chn": 0,
364
+ "id_format": 0,
365
+ "id": "0",
366
+ "id_mask": "7FF"
367
+ },
368
+ "signal": {
369
+ "type": 0,
370
+ "byteorder": 1,
371
+ "bitpos": 0,
372
+ "length": 0,
373
+ "factor": 0,
374
+ "offset": 0
375
+ },
376
+ "trigger_high": 0,
377
+ "trigger_low": 0
378
+ },
379
+ "stop": {
380
+ "message": {
381
+ "chn": 0,
382
+ "id_format": 0,
383
+ "id": "0",
384
+ "id_mask": "7FF"
385
+ },
386
+ "signal": {
387
+ "type": 0,
388
+ "byteorder": 1,
389
+ "bitpos": 0,
390
+ "length": 0,
391
+ "factor": 0,
392
+ "offset": 0
393
+ },
394
+ "trigger_high": 0,
395
+ "trigger_low": 0
396
+ }
397
+ }
398
+ },
399
+ "lin_1": {
400
+ "phy": {
401
+ "mode": 0,
402
+ "bit_rate": 19200
403
+ }
404
+ },
405
+ "lin_2": {
406
+ "phy": {
407
+ "mode": 0,
408
+ "bit_rate": 19200
409
+ }
410
+ },
411
+ "connect": {
412
+ "cellular": {
413
+ "keyformat": 0,
414
+ "pin": "",
415
+ "apn": "",
416
+ "roaming": 0
417
+ },
418
+ "protocol": 0,
419
+ "s3": {
420
+ "sync": {
421
+ "ota": 600,
422
+ "heartbeat": 300,
423
+ "logfiles": 1
424
+ },
425
+ "server": {
426
+ "request_style": 0,
427
+ "keyformat": 0,
428
+ "signed_payload": 0
429
+ }
430
+ }
431
+ },
432
+ "gnss": {
433
+ "system": 5,
434
+ "invalid_signals": 0,
435
+ "alignment": {
436
+ "method": 0,
437
+ "z": 0,
438
+ "y": 0,
439
+ "x": 0
440
+ },
441
+ "geofence": [{
442
+ "lat": 10,
443
+ "lon": 20,
444
+ "radius": 1
445
+ }],
446
+ "dyn_model": 0
447
+ }
448
+ };
449
+ dispatch(publicSchemaFiles(demoConfig, schemaAry, demoContent, uiSchemaAry));
177
450
  }
178
451
  };
179
452
  };
@@ -335,11 +608,6 @@ var publicSchemaFiles = function publicSchemaFiles(selectedConfig, schemaAry, co
335
608
  return e.includes(deviceType);
336
609
  });
337
610
  }
338
- if (demoMode) {
339
- schemaAryFiltered = schemaAry.filter(function (e) {
340
- return e.includes("CANedge3");
341
- });
342
- }
343
611
  var loadedSchema = loadFile(schemaAryFiltered[0]);
344
612
  if (schemaAryFiltered[0] && loadedSchema) {
345
613
  dispatch(setSchemaFile(schemaAryFiltered));