config-editor-base 2.2.0 → 2.2.2

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 CHANGED
@@ -395,7 +395,7 @@ var checkConfigTransmitPeriodDelay = function checkConfigTransmitPeriodDelay(con
395
395
  for (var i = 1; i < 3; i++) {
396
396
  if (content["can_" + i].transmit != undefined) {
397
397
  var transmitListFiltered = content["can_" + i].transmit.filter(function (e) {
398
- return e.period > 0 && e.period < e.delay;
398
+ return e.period > 0 && e.period <= e.delay;
399
399
  });
400
400
  if (transmitListFiltered.length > 0) {
401
401
  dispatch(set({
@@ -516,6 +516,18 @@ var checkFileSplitOffsetPeriod = function checkFileSplitOffsetPeriod(content) {
516
516
  }
517
517
  };
518
518
  };
519
+ var checkRTCAdjustment = function checkRTCAdjustment(content) {
520
+ return function (dispatch) {
521
+ console.log("content.rtc.adjustment", content.rtc.adjustment);
522
+ if (content.connect != undefined && content.rtc != undefined && content.rtc.adjustment != undefined && content.rtc.adjustment > 400) {
523
+ dispatch(set({
524
+ type: "warning",
525
+ message: "Your RTC Adjustment value exceeds 400 seconds (this field is intended for small drift corrections, not e.g. time zone adjustments). Large values may cause issues with S3 connectivity",
526
+ autoClear: false
527
+ }));
528
+ }
529
+ };
530
+ };
519
531
  var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, content) {
520
532
  return function (dispatch) {
521
533
  if (content.can_2 != undefined) {
@@ -527,6 +539,7 @@ var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, conte
527
539
  dispatch(checkS3EncryptedPasswordsNoKpub(content));
528
540
  dispatch(checkWiFiEncryptedPasswordsNoKpub(content));
529
541
  dispatch(checkFileSplitOffsetPeriod(content));
542
+ dispatch(checkRTCAdjustment(content));
530
543
  }
531
544
  dispatch(setConfigContent(content));
532
545
  var blob = new Blob([JSON.stringify(content, null, 2)], {
@@ -632,6 +645,7 @@ var actions = {
632
645
  checkS3EncryptedPasswordsNoKpub: checkS3EncryptedPasswordsNoKpub,
633
646
  checkWiFiEncryptedPasswordsNoKpub: checkWiFiEncryptedPasswordsNoKpub,
634
647
  checkFileSplitOffsetPeriod: checkFileSplitOffsetPeriod,
648
+ checkRTCAdjustment: checkRTCAdjustment,
635
649
  saveUpdatedConfiguration: saveUpdatedConfiguration,
636
650
  setUpdatedFormData: setUpdatedFormData,
637
651
  setUpdatedFormDataValue: setUpdatedFormDataValue,