config-editor-base 3.0.3 → 3.0.5

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.
@@ -21757,6 +21757,8 @@ function parseSupportedPids(csvContent) {
21757
21757
  var SUPPORTED_PIDS_QUERY_VALUES = [0x00, 0x20, 0x40, 0x60, 0x80, 0xA0, 0xC0];
21758
21758
  var protocolsDetected = new Set();
21759
21759
  var supportedPidsSet = new Set();
21760
+ var foundSupportedPidQueries = new Set();
21761
+ var rangesIndicatingMore = new Set();
21760
21762
  for (var _iterator = _createForOfIteratorHelperLoose(relevantResponses), _step; !(_step = _iterator()).done;) {
21761
21763
  var frame = _step.value;
21762
21764
  var data = frame.dataBytes.toUpperCase();
@@ -21765,16 +21767,40 @@ function parseSupportedPids(csvContent) {
21765
21767
  var pidRangeStart = parseInt(data.substring(4, 6), 16);
21766
21768
  if (!SUPPORTED_PIDS_QUERY_VALUES.includes(pidRangeStart)) continue;
21767
21769
  protocolsDetected.add('OBD2');
21770
+ foundSupportedPidQueries.add(pidRangeStart);
21768
21771
  var supportBits = data.substring(6, 14);
21772
+ var bitmapValue = parseInt(supportBits, 16);
21773
+ if (bitmapValue & 1) {
21774
+ rangesIndicatingMore.add(pidRangeStart);
21775
+ }
21769
21776
  extractSupportedPidsFromBitmap(pidRangeStart, supportBits, supportedPidsSet);
21770
21777
  } else if (data.substring(2, 6) === '62F4') {
21771
21778
  var _pidRangeStart = parseInt(data.substring(6, 8), 16);
21772
21779
  if (!SUPPORTED_PIDS_QUERY_VALUES.includes(_pidRangeStart)) continue;
21773
21780
  protocolsDetected.add('WWH-OBD');
21781
+ foundSupportedPidQueries.add(_pidRangeStart);
21774
21782
  var _supportBits = data.substring(8, 16);
21783
+ var _bitmapValue = parseInt(_supportBits, 16);
21784
+ if (_bitmapValue & 1) {
21785
+ rangesIndicatingMore.add(_pidRangeStart);
21786
+ }
21775
21787
  extractSupportedPidsFromBitmap(_pidRangeStart, _supportBits, supportedPidsSet);
21776
21788
  }
21777
21789
  }
21790
+ var missingSupportedPidQueries = [];
21791
+ if (foundSupportedPidQueries.size > 0) {
21792
+ if (!foundSupportedPidQueries.has(0x00)) {
21793
+ missingSupportedPidQueries.push('00');
21794
+ }
21795
+ var rangeChain = [0x00, 0x20, 0x40, 0x60, 0x80, 0xA0, 0xC0];
21796
+ for (var i = 0; i < rangeChain.length - 1; i++) {
21797
+ var currentRange = rangeChain[i];
21798
+ var nextRange = rangeChain[i + 1];
21799
+ if (rangesIndicatingMore.has(currentRange) && !foundSupportedPidQueries.has(nextRange)) {
21800
+ missingSupportedPidQueries.push(nextRange.toString(16).toUpperCase().padStart(2, '0'));
21801
+ }
21802
+ }
21803
+ }
21778
21804
  var hasMixedProtocols = protocolsDetected.size > 1;
21779
21805
  var protocol = protocolsDetected.size > 0 ? Array.from(protocolsDetected)[0] : null;
21780
21806
  var supportedPids = Array.from(supportedPidsSet).sort(function (a, b) {
@@ -21793,7 +21819,8 @@ function parseSupportedPids(csvContent) {
21793
21819
  hasMixedProtocols: hasMixedProtocols,
21794
21820
  allProtocolsDetected: Array.from(protocolsDetected),
21795
21821
  obd11BitCount: obd11BitResponses.length,
21796
- obd29BitCount: obd29BitResponses.length
21822
+ obd29BitCount: obd29BitResponses.length,
21823
+ missingSupportedPidQueries: missingSupportedPidQueries
21797
21824
  };
21798
21825
  }
21799
21826
  function extractSupportedPidsFromBitmap(rangeStart, bitmapHex, supportedSet) {
@@ -22016,13 +22043,15 @@ var OBDTool = /*#__PURE__*/function (_React$Component) {
22016
22043
  var filtered = pids;
22017
22044
  if (toolMode === "supported" && supportedPids.length > 0) {
22018
22045
  var supportedSet = new Set(supportedPids);
22046
+ filtered = filtered.filter(function (pid) {
22047
+ return supportedSet.has(pid.pid);
22048
+ });
22019
22049
  filtered = filtered.map(function (pid) {
22020
- var unsupported = !supportedSet.has(pid.pid);
22021
22050
  var isObd2OnlyPid = pid.service === "03" && pid.pid === "AA" || pid.service === "09" && pid.pid === "02";
22022
22051
  var obd2OnlyDisabled = isObd2OnlyPid && obdMode === "WWH-OBD";
22023
22052
  return _extends({}, pid, {
22024
- disabled: unsupported || obd2OnlyDisabled,
22025
- selected: unsupported || obd2OnlyDisabled ? false : pid.selected,
22053
+ disabled: obd2OnlyDisabled,
22054
+ selected: obd2OnlyDisabled ? false : pid.selected,
22026
22055
  displayDescription: pid.isotp ? pid.description + " (ISO TP)" : pid.description
22027
22056
  });
22028
22057
  });
@@ -22072,7 +22101,13 @@ var OBDTool = /*#__PURE__*/function (_React$Component) {
22072
22101
  stateUpdate.mixedWarning = null;
22073
22102
  }
22074
22103
  this.setState(stateUpdate);
22075
- this.props.showAlert("success", "Loaded " + result.totalFrames + " frames");
22104
+ var responseId = result.canIdType === '29bit' ? '18DAF1XX' : '7E8';
22105
+ var baseMessage = "Loaded " + result.totalFrames + " frames: " + result.supportedPids.length + " PIDs are supported with response CAN ID " + responseId + " and protocol " + (result.protocol || 'Unknown') + ".";
22106
+ if (result.missingSupportedPidQueries && result.missingSupportedPidQueries.length > 0) {
22107
+ this.props.showAlert("warning", baseMessage + "\n\nWarning: No response data was found for the following 'supported PID' PIDs: " + result.missingSupportedPidQueries.join(', ') + ".\n\nTo properly evaluate supported PIDs, use the mode 'Identify supported PIDs' to create your evaluation Configuration File.");
22108
+ } else {
22109
+ this.props.showAlert("success", baseMessage);
22110
+ }
22076
22111
  } catch (e) {
22077
22112
  this.props.showAlert("danger", "Error parsing CSV file: " + e.message);
22078
22113
  }
@@ -22582,7 +22617,7 @@ var OBDTool = /*#__PURE__*/function (_React$Component) {
22582
22617
  color: "orange",
22583
22618
  marginTop: "4px"
22584
22619
  }
22585
- }, "Warning: This PID selection will result in an infrequent update frequency of each PID of ", /*#__PURE__*/React.createElement("strong", null, (period / 1000).toFixed(1)), " seconds")), toolMode !== "test" && /*#__PURE__*/React.createElement("div", {
22620
+ }, "Warning: This selection will result in an infrequent update frequency of each PID of ", /*#__PURE__*/React.createElement("strong", null, (period / 1000).toFixed(1)), " s")), toolMode !== "test" && /*#__PURE__*/React.createElement("div", {
22586
22621
  className: "form-group pl0 field-string"
22587
22622
  }, /*#__PURE__*/React.createElement("label", {
22588
22623
  style: {