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.
package/dist/index.js CHANGED
@@ -21760,6 +21760,8 @@ function parseSupportedPids(csvContent) {
21760
21760
  var SUPPORTED_PIDS_QUERY_VALUES = [0x00, 0x20, 0x40, 0x60, 0x80, 0xA0, 0xC0];
21761
21761
  var protocolsDetected = new Set();
21762
21762
  var supportedPidsSet = new Set();
21763
+ var foundSupportedPidQueries = new Set();
21764
+ var rangesIndicatingMore = new Set();
21763
21765
  for (var _iterator = _createForOfIteratorHelperLoose(relevantResponses), _step; !(_step = _iterator()).done;) {
21764
21766
  var frame = _step.value;
21765
21767
  var data = frame.dataBytes.toUpperCase();
@@ -21768,16 +21770,40 @@ function parseSupportedPids(csvContent) {
21768
21770
  var pidRangeStart = parseInt(data.substring(4, 6), 16);
21769
21771
  if (!SUPPORTED_PIDS_QUERY_VALUES.includes(pidRangeStart)) continue;
21770
21772
  protocolsDetected.add('OBD2');
21773
+ foundSupportedPidQueries.add(pidRangeStart);
21771
21774
  var supportBits = data.substring(6, 14);
21775
+ var bitmapValue = parseInt(supportBits, 16);
21776
+ if (bitmapValue & 1) {
21777
+ rangesIndicatingMore.add(pidRangeStart);
21778
+ }
21772
21779
  extractSupportedPidsFromBitmap(pidRangeStart, supportBits, supportedPidsSet);
21773
21780
  } else if (data.substring(2, 6) === '62F4') {
21774
21781
  var _pidRangeStart = parseInt(data.substring(6, 8), 16);
21775
21782
  if (!SUPPORTED_PIDS_QUERY_VALUES.includes(_pidRangeStart)) continue;
21776
21783
  protocolsDetected.add('WWH-OBD');
21784
+ foundSupportedPidQueries.add(_pidRangeStart);
21777
21785
  var _supportBits = data.substring(8, 16);
21786
+ var _bitmapValue = parseInt(_supportBits, 16);
21787
+ if (_bitmapValue & 1) {
21788
+ rangesIndicatingMore.add(_pidRangeStart);
21789
+ }
21778
21790
  extractSupportedPidsFromBitmap(_pidRangeStart, _supportBits, supportedPidsSet);
21779
21791
  }
21780
21792
  }
21793
+ var missingSupportedPidQueries = [];
21794
+ if (foundSupportedPidQueries.size > 0) {
21795
+ if (!foundSupportedPidQueries.has(0x00)) {
21796
+ missingSupportedPidQueries.push('00');
21797
+ }
21798
+ var rangeChain = [0x00, 0x20, 0x40, 0x60, 0x80, 0xA0, 0xC0];
21799
+ for (var i = 0; i < rangeChain.length - 1; i++) {
21800
+ var currentRange = rangeChain[i];
21801
+ var nextRange = rangeChain[i + 1];
21802
+ if (rangesIndicatingMore.has(currentRange) && !foundSupportedPidQueries.has(nextRange)) {
21803
+ missingSupportedPidQueries.push(nextRange.toString(16).toUpperCase().padStart(2, '0'));
21804
+ }
21805
+ }
21806
+ }
21781
21807
  var hasMixedProtocols = protocolsDetected.size > 1;
21782
21808
  var protocol = protocolsDetected.size > 0 ? Array.from(protocolsDetected)[0] : null;
21783
21809
  var supportedPids = Array.from(supportedPidsSet).sort(function (a, b) {
@@ -21796,7 +21822,8 @@ function parseSupportedPids(csvContent) {
21796
21822
  hasMixedProtocols: hasMixedProtocols,
21797
21823
  allProtocolsDetected: Array.from(protocolsDetected),
21798
21824
  obd11BitCount: obd11BitResponses.length,
21799
- obd29BitCount: obd29BitResponses.length
21825
+ obd29BitCount: obd29BitResponses.length,
21826
+ missingSupportedPidQueries: missingSupportedPidQueries
21800
21827
  };
21801
21828
  }
21802
21829
  function extractSupportedPidsFromBitmap(rangeStart, bitmapHex, supportedSet) {
@@ -22019,13 +22046,15 @@ var OBDTool = /*#__PURE__*/function (_React$Component) {
22019
22046
  var filtered = pids;
22020
22047
  if (toolMode === "supported" && supportedPids.length > 0) {
22021
22048
  var supportedSet = new Set(supportedPids);
22049
+ filtered = filtered.filter(function (pid) {
22050
+ return supportedSet.has(pid.pid);
22051
+ });
22022
22052
  filtered = filtered.map(function (pid) {
22023
- var unsupported = !supportedSet.has(pid.pid);
22024
22053
  var isObd2OnlyPid = pid.service === "03" && pid.pid === "AA" || pid.service === "09" && pid.pid === "02";
22025
22054
  var obd2OnlyDisabled = isObd2OnlyPid && obdMode === "WWH-OBD";
22026
22055
  return _extends({}, pid, {
22027
- disabled: unsupported || obd2OnlyDisabled,
22028
- selected: unsupported || obd2OnlyDisabled ? false : pid.selected,
22056
+ disabled: obd2OnlyDisabled,
22057
+ selected: obd2OnlyDisabled ? false : pid.selected,
22029
22058
  displayDescription: pid.isotp ? pid.description + " (ISO TP)" : pid.description
22030
22059
  });
22031
22060
  });
@@ -22075,7 +22104,13 @@ var OBDTool = /*#__PURE__*/function (_React$Component) {
22075
22104
  stateUpdate.mixedWarning = null;
22076
22105
  }
22077
22106
  this.setState(stateUpdate);
22078
- this.props.showAlert("success", "Loaded " + result.totalFrames + " frames");
22107
+ var responseId = result.canIdType === '29bit' ? '18DAF1XX' : '7E8';
22108
+ var baseMessage = "Loaded " + result.totalFrames + " frames: " + result.supportedPids.length + " PIDs are supported with response CAN ID " + responseId + " and protocol " + (result.protocol || 'Unknown') + ".";
22109
+ if (result.missingSupportedPidQueries && result.missingSupportedPidQueries.length > 0) {
22110
+ 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.");
22111
+ } else {
22112
+ this.props.showAlert("success", baseMessage);
22113
+ }
22079
22114
  } catch (e) {
22080
22115
  this.props.showAlert("danger", "Error parsing CSV file: " + e.message);
22081
22116
  }
@@ -22585,7 +22620,7 @@ var OBDTool = /*#__PURE__*/function (_React$Component) {
22585
22620
  color: "orange",
22586
22621
  marginTop: "4px"
22587
22622
  }
22588
- }, "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", {
22623
+ }, "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", {
22589
22624
  className: "form-group pl0 field-string"
22590
22625
  }, /*#__PURE__*/React.createElement("label", {
22591
22626
  style: {