config-editor-base 2.2.6 → 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 +50 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +50 -1
- 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) {
|
|
@@ -515,7 +545,6 @@ var checkFileSplitOffsetPeriod = function checkFileSplitOffsetPeriod(content) {
|
|
|
515
545
|
};
|
|
516
546
|
var checkRTCAdjustment = function checkRTCAdjustment(content) {
|
|
517
547
|
return function (dispatch) {
|
|
518
|
-
console.log("content.rtc.adjustment", content.rtc.adjustment);
|
|
519
548
|
if (content.connect != undefined && content.rtc != undefined && content.rtc.adjustment != undefined && content.rtc.adjustment > 400) {
|
|
520
549
|
dispatch(set({
|
|
521
550
|
type: "warning",
|
|
@@ -540,6 +569,22 @@ var checkConfigTlsPort = function checkConfigTlsPort(content) {
|
|
|
540
569
|
}
|
|
541
570
|
};
|
|
542
571
|
};
|
|
572
|
+
var checkMissingAPN = function checkMissingAPN(content) {
|
|
573
|
+
return function (dispatch) {
|
|
574
|
+
if (content.connect != undefined && content.connect.s3 != undefined && content.connect.s3.server != undefined && content.connect.cellular != undefined && content.connect.cellular.apn != undefined) {
|
|
575
|
+
console.log("content.connect.cellular.apn", content.connect.cellular.apn);
|
|
576
|
+
if (content.connect.s3.server.endpoint != undefined && content.connect.cellular.apn != undefined) {
|
|
577
|
+
if (content.connect.s3.server.endpoint.includes("http") && content.connect.cellular.apn == "") {
|
|
578
|
+
dispatch(set({
|
|
579
|
+
type: "warning",
|
|
580
|
+
message: "Your SIM APN is blank. This is most likely incorrect and may result in the device being unable to connect. Please add the APN if it exists",
|
|
581
|
+
autoClear: false
|
|
582
|
+
}));
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
};
|
|
543
588
|
var checkFileSplitValue = function checkFileSplitValue(content) {
|
|
544
589
|
return function (dispatch) {
|
|
545
590
|
if (content.log != undefined && content.log.file != undefined && content.log.file.split_time_period != undefined) {
|
|
@@ -567,6 +612,8 @@ var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, conte
|
|
|
567
612
|
dispatch(checkRTCAdjustment(content));
|
|
568
613
|
dispatch(checkConfigTlsPort(content));
|
|
569
614
|
dispatch(checkFileSplitValue(content));
|
|
615
|
+
dispatch(checkMissingAPN(content));
|
|
616
|
+
dispatch(checkConfigControlSignalZeroScalingFactor(content));
|
|
570
617
|
}
|
|
571
618
|
dispatch(setConfigContent(content));
|
|
572
619
|
var blob = new Blob([JSON.stringify(content, null, 2)], {
|
|
@@ -667,6 +714,7 @@ var actions = {
|
|
|
667
714
|
checkConfigTransmitPeriodDelay: checkConfigTransmitPeriodDelay,
|
|
668
715
|
checkConfigTransmitMonitoring: checkConfigTransmitMonitoring,
|
|
669
716
|
checkConfigFiltersDisabled: checkConfigFiltersDisabled,
|
|
717
|
+
checkConfigControlSignalZeroScalingFactor: checkConfigControlSignalZeroScalingFactor,
|
|
670
718
|
checkConfigTls: checkConfigTls,
|
|
671
719
|
checkConfigAwsEndpoint: checkConfigAwsEndpoint,
|
|
672
720
|
checkS3EncryptedPasswordsNoKpub: checkS3EncryptedPasswordsNoKpub,
|
|
@@ -674,6 +722,7 @@ var actions = {
|
|
|
674
722
|
checkFileSplitOffsetPeriod: checkFileSplitOffsetPeriod,
|
|
675
723
|
checkRTCAdjustment: checkRTCAdjustment,
|
|
676
724
|
checkConfigTlsPort: checkConfigTlsPort,
|
|
725
|
+
checkMissingAPN: checkMissingAPN,
|
|
677
726
|
checkFileSplitValue: checkFileSplitValue,
|
|
678
727
|
saveUpdatedConfiguration: saveUpdatedConfiguration,
|
|
679
728
|
setUpdatedFormData: setUpdatedFormData,
|