config-editor-base 2.2.7 → 2.2.8
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 +32 -0
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +32 -0
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -441,6 +441,36 @@ var checkConfigFiltersDisabled = function checkConfigFiltersDisabled(content) {
|
|
|
441
441
|
}
|
|
442
442
|
};
|
|
443
443
|
};
|
|
444
|
+
var checkConfigControlSignalZeroScalingFactor = function checkConfigControlSignalZeroScalingFactor(content) {
|
|
445
|
+
return function (dispatch) {
|
|
446
|
+
var channels = ["can_1", "can_2", "can_internal"];
|
|
447
|
+
var channel_names = ["CAN CH1", "CAN CH2", "CAN INTERNAL"];
|
|
448
|
+
for (var i = 0; i < 3; i++) {
|
|
449
|
+
var can_control = content[channels[i]].control;
|
|
450
|
+
if (can_control != undefined && can_control.control_rx_state != undefined && can_control.control_tx_state != undefined) {
|
|
451
|
+
if (can_control.control_rx_state != 0 || can_control.control_tx_state != 0) {
|
|
452
|
+
var type_list = ["start", "stop"];
|
|
453
|
+
for (var j = 0; j < 2; j++) {
|
|
454
|
+
var type = type_list[j];
|
|
455
|
+
if (can_control[type] != undefined && can_control[type].signal != undefined && can_control[type].signal.factor != undefined && can_control[type].signal.length != undefined) {
|
|
456
|
+
var fields = ["factor", "length"];
|
|
457
|
+
var field_names = ["signal scaling factor", "signal bit length"];
|
|
458
|
+
for (var k = 0; k < 2; k++) {
|
|
459
|
+
if (can_control[type].signal[fields[k]] == 0) {
|
|
460
|
+
dispatch(set({
|
|
461
|
+
type: "warning",
|
|
462
|
+
message: "You have enabled a Control Signal on " + channel_names[i] + " (" + type + ") with a " + field_names[k] + " of 0 - this will result in a constant signal value and is most likely not intended.",
|
|
463
|
+
autoClear: false
|
|
464
|
+
}));
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
};
|
|
444
474
|
var checkConfigTls = function checkConfigTls(content) {
|
|
445
475
|
return function (dispatch) {
|
|
446
476
|
if (content.connect != undefined && content.connect.s3 != undefined && content.connect.s3.server != undefined) {
|
|
@@ -586,6 +616,7 @@ var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, conte
|
|
|
586
616
|
dispatch(checkConfigTlsPort(content));
|
|
587
617
|
dispatch(checkFileSplitValue(content));
|
|
588
618
|
dispatch(checkMissingAPN(content));
|
|
619
|
+
dispatch(checkConfigControlSignalZeroScalingFactor(content));
|
|
589
620
|
}
|
|
590
621
|
dispatch(setConfigContent(content));
|
|
591
622
|
var blob = new Blob([JSON.stringify(content, null, 2)], {
|
|
@@ -686,6 +717,7 @@ var actions = {
|
|
|
686
717
|
checkConfigTransmitPeriodDelay: checkConfigTransmitPeriodDelay,
|
|
687
718
|
checkConfigTransmitMonitoring: checkConfigTransmitMonitoring,
|
|
688
719
|
checkConfigFiltersDisabled: checkConfigFiltersDisabled,
|
|
720
|
+
checkConfigControlSignalZeroScalingFactor: checkConfigControlSignalZeroScalingFactor,
|
|
689
721
|
checkConfigTls: checkConfigTls,
|
|
690
722
|
checkConfigAwsEndpoint: checkConfigAwsEndpoint,
|
|
691
723
|
checkS3EncryptedPasswordsNoKpub: checkS3EncryptedPasswordsNoKpub,
|