config-editor-base 2.0.3 → 2.0.5
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 +34 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +34 -2
- package/dist/index.modern.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -347,8 +347,6 @@ var publicSchemaFiles = function publicSchemaFiles(selectedConfig, schemaAry, co
|
|
|
347
347
|
|
|
348
348
|
if (selectedConfig) {
|
|
349
349
|
var deviceType = "Other";
|
|
350
|
-
console.log("contentJSON", contentJSON);
|
|
351
|
-
console.log("contentJSON.gnss", contentJSON.gnss);
|
|
352
350
|
|
|
353
351
|
if (contentJSON.can_2 != undefined && contentJSON.connect == undefined && contentJSON.gnss == undefined) {
|
|
354
352
|
deviceType = "CANedge1";
|
|
@@ -438,6 +436,40 @@ var resetLocalSchemaList = function resetLocalSchemaList() {
|
|
|
438
436
|
};
|
|
439
437
|
var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, content) {
|
|
440
438
|
return function (dispatch) {
|
|
439
|
+
var contentJSON = JSON.parse(content);
|
|
440
|
+
console.log("contentJSON", contentJSON);
|
|
441
|
+
console.log("contentJSON.can_1", contentJSON.can_1);
|
|
442
|
+
|
|
443
|
+
if (contentJSON.can_2 != undefined) {
|
|
444
|
+
var transmitList1 = contentJSON.can_1.transmit;
|
|
445
|
+
var transmitList2 = contentJSON.can_2.transmit;
|
|
446
|
+
transmitList1Filtered = transmitList1.filter(function (e) {
|
|
447
|
+
return e.period < e.delay;
|
|
448
|
+
});
|
|
449
|
+
transmitList2Filtered = transmitList2.filter(function (e) {
|
|
450
|
+
return e.period < e.delay;
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
console.log("transmitList1Filtered", transmitList1Filtered);
|
|
455
|
+
console.log("transmitList2Filtered", transmitList2Filtered);
|
|
456
|
+
|
|
457
|
+
if (transmitList1Filtered.length > 0) {
|
|
458
|
+
dispatch(set({
|
|
459
|
+
type: "warning",
|
|
460
|
+
message: "Your CAN CH1 transmit list includes one or more entries with period < delay. This is invalid and will cause the device to reject your Configuration File.",
|
|
461
|
+
autoClear: false
|
|
462
|
+
}));
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
if (transmitList2Filtered.length > 0) {
|
|
466
|
+
dispatch(set({
|
|
467
|
+
type: "warning",
|
|
468
|
+
message: "Your CAN CH2 transmit list includes one or more entries with period < delay. This is invalid and will cause the device to reject your Configuration File.",
|
|
469
|
+
autoClear: false
|
|
470
|
+
}));
|
|
471
|
+
}
|
|
472
|
+
|
|
441
473
|
dispatch(setConfigContent(content));
|
|
442
474
|
var blob = new Blob([JSON.stringify(content, null, 2)], {
|
|
443
475
|
type: "text/json"
|