config-editor-base 2.9.7 → 2.9.9

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.
@@ -21823,8 +21823,11 @@ function isObdResponse29Bit(canId) {
21823
21823
  }
21824
21824
 
21825
21825
  function parseSupportedPids(csvContent) {
21826
- var frames = parseCanFrameCsv(csvContent);
21827
- var receiveFrames = getReceiveFrames(frames);
21826
+ var parseResult = parseCanFrameCsv(csvContent);
21827
+ if (parseResult.error) {
21828
+ throw new Error(parseResult.error);
21829
+ }
21830
+ var receiveFrames = getReceiveFrames(parseResult.frames);
21828
21831
  var obd11BitResponses = receiveFrames.filter(function (f) {
21829
21832
  return f.ide === 0 && f.id === '7E8';
21830
21833
  });
@@ -21868,7 +21871,7 @@ function parseSupportedPids(csvContent) {
21868
21871
  transmitId: use29Bit ? '18DB33F1' : '7DF',
21869
21872
  canIdType: use29Bit ? '29bit' : '11bit',
21870
21873
  responseCount: relevantResponses.length,
21871
- totalFrames: frames.length,
21874
+ totalFrames: parseResult.frames.length,
21872
21875
  hasMixedIds: hasBothIdTypes,
21873
21876
  hasMixedProtocols: hasMixedProtocols,
21874
21877
  allProtocolsDetected: Array.from(protocolsDetected),
@@ -24280,7 +24283,8 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
24280
24283
  filterType = _this$state6.filterType,
24281
24284
  prescalerType = _this$state6.prescalerType,
24282
24285
  prescalerValue = _this$state6.prescalerValue,
24283
- dataPrescalerMask = _this$state6.dataPrescalerMask;
24286
+ dataPrescalerMask = _this$state6.dataPrescalerMask,
24287
+ csvData = _this$state6.csvData;
24284
24288
  var selectedEntries = mergedEntries.filter(function (e) {
24285
24289
  return e.selected;
24286
24290
  });
@@ -24404,15 +24408,33 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
24404
24408
  } else if (isCanmodRouter) {
24405
24409
  var isExtended = _entry4.idInt > 0x7FF;
24406
24410
  var idHex = parseInt(_entry4.id, 16).toString(16).toUpperCase();
24407
- var _filter = {
24408
- name: (_entry4.messageName || idHex).substring(0, 16),
24409
- state: 1,
24410
- id_format: isExtended ? 1 : 0,
24411
- frame_format: 2,
24412
- f1: idHex,
24413
- f2: isExtended ? "1FFFFFFF" : "7FF",
24414
- prescaler_type: prescaler_type
24415
- };
24411
+ var isDbcOnlyJ1939 = !csvData && _entry4.isJ1939 && isExtended;
24412
+ var _filter = void 0;
24413
+ if (isDbcOnlyJ1939) {
24414
+ var _pgn = extractPgn$1(_entry4.idInt);
24415
+ var _isPdu = (_pgn & 0xFF00) < 0xF000;
24416
+ var _mask = _isPdu ? "3FF0000" : "3FFFF00";
24417
+ var _filterId = _isPdu ? ((_pgn & 0x3FF00) << 8).toString(16).toUpperCase() : (_pgn << 8).toString(16).toUpperCase();
24418
+ _filter = {
24419
+ name: (_entry4.messageName || "PGN " + _pgn.toString(16).toUpperCase()).substring(0, 16),
24420
+ state: 1,
24421
+ id_format: 1,
24422
+ frame_format: 2,
24423
+ f1: _filterId,
24424
+ f2: _mask,
24425
+ prescaler_type: prescaler_type
24426
+ };
24427
+ } else {
24428
+ _filter = {
24429
+ name: (_entry4.messageName || idHex).substring(0, 16),
24430
+ state: 1,
24431
+ id_format: isExtended ? 1 : 0,
24432
+ frame_format: 2,
24433
+ f1: idHex,
24434
+ f2: isExtended ? "1FFFFFFF" : "7FF",
24435
+ prescaler_type: prescaler_type
24436
+ };
24437
+ }
24416
24438
  if (prescaler_value !== undefined) {
24417
24439
  _filter.prescaler_value = prescaler_value;
24418
24440
  }
@@ -24420,16 +24442,35 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
24420
24442
  } else {
24421
24443
  var _isExtended = _entry4.idInt > 0x7FF;
24422
24444
  var _idHex = _entry4.id.toUpperCase();
24423
- var _filter2 = {
24424
- name: (_entry4.messageName || _idHex).substring(0, 16),
24425
- state: 1,
24426
- type: filterTypeValue,
24427
- id_format: _isExtended ? 1 : 0,
24428
- method: 0,
24429
- f1: _idHex,
24430
- f2: _idHex,
24431
- prescaler_type: prescaler_type
24432
- };
24445
+ var _isDbcOnlyJ = !csvData && _entry4.isJ1939 && _isExtended;
24446
+ var _filter2 = void 0;
24447
+ if (_isDbcOnlyJ) {
24448
+ var _pgn2 = extractPgn$1(_entry4.idInt);
24449
+ var _isPdu2 = (_pgn2 & 0xFF00) < 0xF000;
24450
+ var _mask2 = _isPdu2 ? "3FF0000" : "3FFFF00";
24451
+ var _filterId2 = _isPdu2 ? ((_pgn2 & 0x3FF00) << 8).toString(16).toUpperCase() : (_pgn2 << 8).toString(16).toUpperCase();
24452
+ _filter2 = {
24453
+ name: (_entry4.messageName || "PGN " + _pgn2.toString(16).toUpperCase()).substring(0, 16),
24454
+ state: 1,
24455
+ type: filterTypeValue,
24456
+ id_format: 1,
24457
+ method: 1,
24458
+ f1: _filterId2,
24459
+ f2: _mask2,
24460
+ prescaler_type: prescaler_type
24461
+ };
24462
+ } else {
24463
+ _filter2 = {
24464
+ name: (_entry4.messageName || _idHex).substring(0, 16),
24465
+ state: 1,
24466
+ type: filterTypeValue,
24467
+ id_format: _isExtended ? 1 : 0,
24468
+ method: 0,
24469
+ f1: _idHex,
24470
+ f2: _idHex,
24471
+ prescaler_type: prescaler_type
24472
+ };
24473
+ }
24433
24474
  if (prescaler_value !== undefined) {
24434
24475
  _filter2.prescaler_value = prescaler_value;
24435
24476
  }