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.modern.js
CHANGED
|
@@ -438,6 +438,36 @@ 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
|
+
var can_control = content[channels[i]].control;
|
|
447
|
+
if (can_control != undefined && can_control.control_rx_state != undefined && can_control.control_tx_state != undefined) {
|
|
448
|
+
if (can_control.control_rx_state != 0 || can_control.control_tx_state != 0) {
|
|
449
|
+
var type_list = ["start", "stop"];
|
|
450
|
+
for (var j = 0; j < 2; j++) {
|
|
451
|
+
var type = type_list[j];
|
|
452
|
+
if (can_control[type] != undefined && can_control[type].signal != undefined && can_control[type].signal.factor != undefined && can_control[type].signal.length != undefined) {
|
|
453
|
+
var fields = ["factor", "length"];
|
|
454
|
+
var field_names = ["signal scaling factor", "signal bit length"];
|
|
455
|
+
for (var k = 0; k < 2; k++) {
|
|
456
|
+
if (can_control[type].signal[fields[k]] == 0) {
|
|
457
|
+
dispatch(set({
|
|
458
|
+
type: "warning",
|
|
459
|
+
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.",
|
|
460
|
+
autoClear: false
|
|
461
|
+
}));
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
};
|
|
441
471
|
var checkConfigTls = function checkConfigTls(content) {
|
|
442
472
|
return function (dispatch) {
|
|
443
473
|
if (content.connect != undefined && content.connect.s3 != undefined && content.connect.s3.server != undefined) {
|
|
@@ -583,6 +613,7 @@ var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, conte
|
|
|
583
613
|
dispatch(checkConfigTlsPort(content));
|
|
584
614
|
dispatch(checkFileSplitValue(content));
|
|
585
615
|
dispatch(checkMissingAPN(content));
|
|
616
|
+
dispatch(checkConfigControlSignalZeroScalingFactor(content));
|
|
586
617
|
}
|
|
587
618
|
dispatch(setConfigContent(content));
|
|
588
619
|
var blob = new Blob([JSON.stringify(content, null, 2)], {
|
|
@@ -683,6 +714,7 @@ var actions = {
|
|
|
683
714
|
checkConfigTransmitPeriodDelay: checkConfigTransmitPeriodDelay,
|
|
684
715
|
checkConfigTransmitMonitoring: checkConfigTransmitMonitoring,
|
|
685
716
|
checkConfigFiltersDisabled: checkConfigFiltersDisabled,
|
|
717
|
+
checkConfigControlSignalZeroScalingFactor: checkConfigControlSignalZeroScalingFactor,
|
|
686
718
|
checkConfigTls: checkConfigTls,
|
|
687
719
|
checkConfigAwsEndpoint: checkConfigAwsEndpoint,
|
|
688
720
|
checkS3EncryptedPasswordsNoKpub: checkS3EncryptedPasswordsNoKpub,
|