config-editor-base 2.0.8 → 2.1.0
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 +25 -17
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +25 -17
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -434,41 +434,47 @@ var resetLocalSchemaList = function resetLocalSchemaList() {
|
|
|
434
434
|
type: RESET_LOCAL_SCHEMA_LIST
|
|
435
435
|
};
|
|
436
436
|
};
|
|
437
|
-
var
|
|
437
|
+
var checkConfigTransmitPeriodDelay = function checkConfigTransmitPeriodDelay(content) {
|
|
438
438
|
return function (dispatch) {
|
|
439
|
-
|
|
439
|
+
console.log("We get here right?");
|
|
440
|
+
|
|
441
|
+
for (var i = 1; i < 3; i++) {
|
|
442
|
+
console.log("Check contents", content["can_" + i], content["can_" + i].transmit);
|
|
440
443
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
var
|
|
444
|
-
var transmitList1Filtered = transmitList1.filter(function (e) {
|
|
444
|
+
if (content["can_" + i].transmit != undefined) {
|
|
445
|
+
var transmitList = content["can_" + i].transmit;
|
|
446
|
+
var transmitListFiltered = transmitList.filter(function (e) {
|
|
445
447
|
return e.period < e.delay;
|
|
446
448
|
});
|
|
447
449
|
|
|
448
|
-
if (
|
|
450
|
+
if (transmitListFiltered.length > 0) {
|
|
449
451
|
dispatch(set({
|
|
450
452
|
type: "warning",
|
|
451
|
-
message: "Your CAN
|
|
453
|
+
message: "Your CAN CH" + i + " transmit list includes one or more entries with period < delay. This is invalid and will cause the device to reject your Configuration File.",
|
|
452
454
|
autoClear: false
|
|
453
455
|
}));
|
|
454
456
|
}
|
|
455
457
|
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
if (
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
var checkConfigTransmitMonitoring = function checkConfigTransmitMonitoring(content) {
|
|
462
|
+
return function (dispatch) {
|
|
463
|
+
for (var i = 1; i < 3; i++) {
|
|
464
|
+
if (content["can_" + i].transmit != undefined && content["can_" + i].phy != undefined && content["can_" + i].phy.mode != undefined && content["can_" + i].transmit.length > 0) {
|
|
465
|
+
if (content["can_" + i].phy.mode != 0) {
|
|
464
466
|
dispatch(set({
|
|
465
467
|
type: "warning",
|
|
466
|
-
message: "Your CAN
|
|
468
|
+
message: "Your CAN CH" + i + " has a non-empty transmit list, but the device will not transmit any messages unless the mode is set to Normal.",
|
|
467
469
|
autoClear: false
|
|
468
470
|
}));
|
|
469
471
|
}
|
|
470
472
|
}
|
|
471
473
|
}
|
|
474
|
+
};
|
|
475
|
+
};
|
|
476
|
+
var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, content) {
|
|
477
|
+
return function (dispatch) {
|
|
472
478
|
|
|
473
479
|
dispatch(setConfigContent(content));
|
|
474
480
|
var blob = new Blob([JSON.stringify(content, null, 2)], {
|
|
@@ -566,6 +572,8 @@ var actions = {
|
|
|
566
572
|
setSchemaContent: setSchemaContent,
|
|
567
573
|
resetFiles: resetFiles,
|
|
568
574
|
resetLocalSchemaList: resetLocalSchemaList,
|
|
575
|
+
checkConfigTransmitPeriodDelay: checkConfigTransmitPeriodDelay,
|
|
576
|
+
checkConfigTransmitMonitoring: checkConfigTransmitMonitoring,
|
|
569
577
|
saveUpdatedConfiguration: saveUpdatedConfiguration,
|
|
570
578
|
setUpdatedFormData: setUpdatedFormData,
|
|
571
579
|
setUpdatedFormDataValue: setUpdatedFormDataValue,
|