config-editor-base 2.2.7 → 2.2.9
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 -0
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +34 -0
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -438,6 +438,38 @@ var checkConfigFiltersDisabled = function checkConfigFiltersDisabled(content) {
|
|
|
438
438
|
}
|
|
439
439
|
};
|
|
440
440
|
};
|
|
441
|
+
var checkConfigControlSignalZeroScalingFactor = function checkConfigControlSignalZeroScalingFactor(content) {
|
|
442
|
+
return function (dispatch) {
|
|
443
|
+
var channels = ["can_1", "can_2", "can_internal"];
|
|
444
|
+
var channel_names = ["CAN CH1", "CAN CH2", "CAN INTERNAL"];
|
|
445
|
+
for (var i = 0; i < 3; i++) {
|
|
446
|
+
if (content[channels[i]] != undefined && content[channels[i]].control != undefined) {
|
|
447
|
+
var can_control = content[channels[i]].control;
|
|
448
|
+
if (can_control.control_rx_state != undefined && can_control.control_tx_state != undefined) {
|
|
449
|
+
if (can_control.control_rx_state != 0 || can_control.control_tx_state != 0) {
|
|
450
|
+
var type_list = ["start", "stop"];
|
|
451
|
+
for (var j = 0; j < 2; j++) {
|
|
452
|
+
var type = type_list[j];
|
|
453
|
+
if (can_control[type] != undefined && can_control[type].signal != undefined && can_control[type].signal.factor != undefined && can_control[type].signal.length != undefined) {
|
|
454
|
+
var fields = ["factor", "length"];
|
|
455
|
+
var field_names = ["signal scaling factor", "signal bit length"];
|
|
456
|
+
for (var k = 0; k < 2; k++) {
|
|
457
|
+
if (can_control[type].signal[fields[k]] == 0) {
|
|
458
|
+
dispatch(set({
|
|
459
|
+
type: "warning",
|
|
460
|
+
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.",
|
|
461
|
+
autoClear: false
|
|
462
|
+
}));
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
};
|
|
441
473
|
var checkConfigTls = function checkConfigTls(content) {
|
|
442
474
|
return function (dispatch) {
|
|
443
475
|
if (content.connect != undefined && content.connect.s3 != undefined && content.connect.s3.server != undefined) {
|
|
@@ -583,6 +615,7 @@ var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, conte
|
|
|
583
615
|
dispatch(checkConfigTlsPort(content));
|
|
584
616
|
dispatch(checkFileSplitValue(content));
|
|
585
617
|
dispatch(checkMissingAPN(content));
|
|
618
|
+
dispatch(checkConfigControlSignalZeroScalingFactor(content));
|
|
586
619
|
}
|
|
587
620
|
dispatch(setConfigContent(content));
|
|
588
621
|
var blob = new Blob([JSON.stringify(content, null, 2)], {
|
|
@@ -683,6 +716,7 @@ var actions = {
|
|
|
683
716
|
checkConfigTransmitPeriodDelay: checkConfigTransmitPeriodDelay,
|
|
684
717
|
checkConfigTransmitMonitoring: checkConfigTransmitMonitoring,
|
|
685
718
|
checkConfigFiltersDisabled: checkConfigFiltersDisabled,
|
|
719
|
+
checkConfigControlSignalZeroScalingFactor: checkConfigControlSignalZeroScalingFactor,
|
|
686
720
|
checkConfigTls: checkConfigTls,
|
|
687
721
|
checkConfigAwsEndpoint: checkConfigAwsEndpoint,
|
|
688
722
|
checkS3EncryptedPasswordsNoKpub: checkS3EncryptedPasswordsNoKpub,
|