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