config-editor-base 2.9.4 → 2.9.6
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/README.md +80 -1
- package/dist/index.js +478 -31
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +478 -31
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -22306,7 +22306,8 @@ var OBDTool = /*#__PURE__*/function (_React$Component) {
|
|
|
22306
22306
|
_proto.onMerge = function onMerge() {
|
|
22307
22307
|
var _this$state5 = this.state,
|
|
22308
22308
|
combinedConfig = _this$state5.combinedConfig,
|
|
22309
|
-
mergedConfigValid = _this$state5.mergedConfigValid
|
|
22309
|
+
mergedConfigValid = _this$state5.mergedConfigValid,
|
|
22310
|
+
enableControlSignal = _this$state5.enableControlSignal;
|
|
22310
22311
|
var formData = this.props.formData;
|
|
22311
22312
|
if (mergedConfigValid !== true) {
|
|
22312
22313
|
this.props.showAlert("warning", "Cannot merge - the combined configuration is invalid. Check console for details.");
|
|
@@ -22324,10 +22325,19 @@ var OBDTool = /*#__PURE__*/function (_React$Component) {
|
|
|
22324
22325
|
});
|
|
22325
22326
|
this.props.setConfigContent(freshMergedConfig);
|
|
22326
22327
|
this.props.setUpdatedFormData(freshMergedConfig);
|
|
22327
|
-
|
|
22328
|
+
if (!enableControlSignal) {
|
|
22329
|
+
this.props.showAlert("warning", "Merged OBD transmit list with Configuration File. Important: If your CANedge transmits data while the vehicle ignition is off it can drain the vehicle battery. Use a control signal to start/stop transmission or ensure the device powers off with the ignition (e.g. by changing the installation setup or manually disconnecting the device).");
|
|
22330
|
+
} else {
|
|
22331
|
+
this.props.showAlert("success", "Merged OBD transmit list with Configuration File");
|
|
22332
|
+
}
|
|
22328
22333
|
};
|
|
22329
22334
|
_proto.onDownload = function onDownload() {
|
|
22330
|
-
var
|
|
22335
|
+
var _this$state6 = this.state,
|
|
22336
|
+
generatedConfig = _this$state6.generatedConfig,
|
|
22337
|
+
enableControlSignal = _this$state6.enableControlSignal;
|
|
22338
|
+
if (!enableControlSignal) {
|
|
22339
|
+
this.props.showAlert("warning", "Important: If your CANedge transmits data while the vehicle ignition is off it can drain the vehicle battery. Use a control signal to start/stop transmission or ensure the device powers off with the ignition (e.g. by changing the installation setup or manually disconnecting the device).");
|
|
22340
|
+
}
|
|
22331
22341
|
var dataStr = JSON.stringify(generatedConfig, null, 2);
|
|
22332
22342
|
var dataUri = 'data:application/json;charset=utf-8,' + encodeURIComponent(dataStr);
|
|
22333
22343
|
var exportFileDefaultName = 'obd-transmit-list.json';
|
|
@@ -22338,23 +22348,23 @@ var OBDTool = /*#__PURE__*/function (_React$Component) {
|
|
|
22338
22348
|
};
|
|
22339
22349
|
_proto.render = function render() {
|
|
22340
22350
|
var _this9 = this;
|
|
22341
|
-
var _this$
|
|
22342
|
-
toolMode = _this$
|
|
22343
|
-
channel = _this$
|
|
22344
|
-
bitRate = _this$
|
|
22345
|
-
canId = _this$
|
|
22346
|
-
obdMode = _this$
|
|
22347
|
-
spacing = _this$
|
|
22348
|
-
searchQuery = _this$
|
|
22349
|
-
supportedPids = _this$
|
|
22350
|
-
generatedConfig = _this$
|
|
22351
|
-
mergedConfigValid = _this$
|
|
22352
|
-
csvFileName = _this$
|
|
22353
|
-
mixedWarning = _this$
|
|
22354
|
-
showPreview = _this$
|
|
22355
|
-
enableControlSignal = _this$
|
|
22356
|
-
enableOBDFilter = _this$
|
|
22357
|
-
combinedConfig = _this$
|
|
22351
|
+
var _this$state7 = this.state,
|
|
22352
|
+
toolMode = _this$state7.toolMode,
|
|
22353
|
+
channel = _this$state7.channel,
|
|
22354
|
+
bitRate = _this$state7.bitRate,
|
|
22355
|
+
canId = _this$state7.canId,
|
|
22356
|
+
obdMode = _this$state7.obdMode,
|
|
22357
|
+
spacing = _this$state7.spacing,
|
|
22358
|
+
searchQuery = _this$state7.searchQuery,
|
|
22359
|
+
supportedPids = _this$state7.supportedPids,
|
|
22360
|
+
generatedConfig = _this$state7.generatedConfig,
|
|
22361
|
+
mergedConfigValid = _this$state7.mergedConfigValid,
|
|
22362
|
+
csvFileName = _this$state7.csvFileName,
|
|
22363
|
+
mixedWarning = _this$state7.mixedWarning,
|
|
22364
|
+
showPreview = _this$state7.showPreview,
|
|
22365
|
+
enableControlSignal = _this$state7.enableControlSignal,
|
|
22366
|
+
enableOBDFilter = _this$state7.enableOBDFilter,
|
|
22367
|
+
combinedConfig = _this$state7.combinedConfig;
|
|
22358
22368
|
var _this$props = this.props,
|
|
22359
22369
|
formData = _this$props.formData,
|
|
22360
22370
|
editorConfigFiles = _this$props.editorConfigFiles;
|
|
@@ -23117,6 +23127,392 @@ function evaluateFilters(frames, configData, detectedDeviceType) {
|
|
|
23117
23127
|
};
|
|
23118
23128
|
}
|
|
23119
23129
|
|
|
23130
|
+
var can_internal$1 = {
|
|
23131
|
+
filter: {
|
|
23132
|
+
id: [
|
|
23133
|
+
{
|
|
23134
|
+
name: "Heartbeat",
|
|
23135
|
+
state: 0,
|
|
23136
|
+
type: 0,
|
|
23137
|
+
id_format: 0,
|
|
23138
|
+
method: 0,
|
|
23139
|
+
f1: "2",
|
|
23140
|
+
f2: "2",
|
|
23141
|
+
prescaler_type: 0
|
|
23142
|
+
},
|
|
23143
|
+
{
|
|
23144
|
+
name: "TimeCalendar",
|
|
23145
|
+
state: 0,
|
|
23146
|
+
type: 0,
|
|
23147
|
+
id_format: 0,
|
|
23148
|
+
method: 0,
|
|
23149
|
+
f1: "3",
|
|
23150
|
+
f2: "3",
|
|
23151
|
+
prescaler_type: 0
|
|
23152
|
+
},
|
|
23153
|
+
{
|
|
23154
|
+
name: "TimeExternal",
|
|
23155
|
+
state: 0,
|
|
23156
|
+
type: 0,
|
|
23157
|
+
id_format: 0,
|
|
23158
|
+
method: 0,
|
|
23159
|
+
f1: "5",
|
|
23160
|
+
f2: "5",
|
|
23161
|
+
prescaler_type: 0
|
|
23162
|
+
}
|
|
23163
|
+
]
|
|
23164
|
+
}
|
|
23165
|
+
};
|
|
23166
|
+
var can_1$2 = {
|
|
23167
|
+
filter: {
|
|
23168
|
+
remote_frames: 0,
|
|
23169
|
+
id: [
|
|
23170
|
+
{
|
|
23171
|
+
name: "AllStandardID",
|
|
23172
|
+
state: 1,
|
|
23173
|
+
type: 0,
|
|
23174
|
+
id_format: 0,
|
|
23175
|
+
method: 0,
|
|
23176
|
+
f1: "0",
|
|
23177
|
+
f2: "7FF",
|
|
23178
|
+
prescaler_type: 0
|
|
23179
|
+
},
|
|
23180
|
+
{
|
|
23181
|
+
name: "AllExtendedID",
|
|
23182
|
+
state: 1,
|
|
23183
|
+
type: 0,
|
|
23184
|
+
id_format: 1,
|
|
23185
|
+
method: 0,
|
|
23186
|
+
f1: "0",
|
|
23187
|
+
f2: "1FFFFFFF",
|
|
23188
|
+
prescaler_type: 0
|
|
23189
|
+
}
|
|
23190
|
+
]
|
|
23191
|
+
}
|
|
23192
|
+
};
|
|
23193
|
+
var can_2$1 = {
|
|
23194
|
+
filter: {
|
|
23195
|
+
remote_frames: 0,
|
|
23196
|
+
id: [
|
|
23197
|
+
{
|
|
23198
|
+
name: "AllStandardID",
|
|
23199
|
+
state: 1,
|
|
23200
|
+
type: 0,
|
|
23201
|
+
id_format: 0,
|
|
23202
|
+
method: 0,
|
|
23203
|
+
f1: "0",
|
|
23204
|
+
f2: "7FF",
|
|
23205
|
+
prescaler_type: 0
|
|
23206
|
+
},
|
|
23207
|
+
{
|
|
23208
|
+
name: "AllExtendedID",
|
|
23209
|
+
state: 1,
|
|
23210
|
+
type: 0,
|
|
23211
|
+
id_format: 1,
|
|
23212
|
+
method: 0,
|
|
23213
|
+
f1: "0",
|
|
23214
|
+
f2: "1FFFFFFF",
|
|
23215
|
+
prescaler_type: 0
|
|
23216
|
+
}
|
|
23217
|
+
]
|
|
23218
|
+
}
|
|
23219
|
+
};
|
|
23220
|
+
var canedgeDefaultFilters = {
|
|
23221
|
+
can_internal: can_internal$1,
|
|
23222
|
+
can_1: can_1$2,
|
|
23223
|
+
can_2: can_2$1
|
|
23224
|
+
};
|
|
23225
|
+
|
|
23226
|
+
var can_internal$2 = {
|
|
23227
|
+
filter: {
|
|
23228
|
+
id: [
|
|
23229
|
+
{
|
|
23230
|
+
name: "Heartbeat",
|
|
23231
|
+
state: 0,
|
|
23232
|
+
type: 0,
|
|
23233
|
+
id_format: 0,
|
|
23234
|
+
method: 0,
|
|
23235
|
+
f1: "2",
|
|
23236
|
+
f2: "2",
|
|
23237
|
+
prescaler_type: 0
|
|
23238
|
+
},
|
|
23239
|
+
{
|
|
23240
|
+
name: "TimeCalendar",
|
|
23241
|
+
state: 0,
|
|
23242
|
+
type: 0,
|
|
23243
|
+
id_format: 0,
|
|
23244
|
+
method: 0,
|
|
23245
|
+
f1: "3",
|
|
23246
|
+
f2: "3",
|
|
23247
|
+
prescaler_type: 0
|
|
23248
|
+
},
|
|
23249
|
+
{
|
|
23250
|
+
name: "TimeExternal",
|
|
23251
|
+
state: 0,
|
|
23252
|
+
type: 0,
|
|
23253
|
+
id_format: 0,
|
|
23254
|
+
method: 0,
|
|
23255
|
+
f1: "5",
|
|
23256
|
+
f2: "5",
|
|
23257
|
+
prescaler_type: 0
|
|
23258
|
+
},
|
|
23259
|
+
{
|
|
23260
|
+
name: "GnssStatus",
|
|
23261
|
+
state: 1,
|
|
23262
|
+
type: 0,
|
|
23263
|
+
id_format: 0,
|
|
23264
|
+
method: 0,
|
|
23265
|
+
f1: "65",
|
|
23266
|
+
f2: "65",
|
|
23267
|
+
prescaler_type: 0
|
|
23268
|
+
},
|
|
23269
|
+
{
|
|
23270
|
+
name: "GnssTime",
|
|
23271
|
+
state: 1,
|
|
23272
|
+
type: 0,
|
|
23273
|
+
id_format: 0,
|
|
23274
|
+
method: 0,
|
|
23275
|
+
f1: "66",
|
|
23276
|
+
f2: "66",
|
|
23277
|
+
prescaler_type: 0
|
|
23278
|
+
},
|
|
23279
|
+
{
|
|
23280
|
+
name: "GnsssPosition",
|
|
23281
|
+
state: 1,
|
|
23282
|
+
type: 0,
|
|
23283
|
+
id_format: 0,
|
|
23284
|
+
method: 0,
|
|
23285
|
+
f1: "67",
|
|
23286
|
+
f2: "67",
|
|
23287
|
+
prescaler_type: 0
|
|
23288
|
+
},
|
|
23289
|
+
{
|
|
23290
|
+
name: "GnssAltitude",
|
|
23291
|
+
state: 1,
|
|
23292
|
+
type: 0,
|
|
23293
|
+
id_format: 0,
|
|
23294
|
+
method: 0,
|
|
23295
|
+
f1: "68",
|
|
23296
|
+
f2: "68",
|
|
23297
|
+
prescaler_type: 0
|
|
23298
|
+
},
|
|
23299
|
+
{
|
|
23300
|
+
name: "GnssAttitude",
|
|
23301
|
+
state: 1,
|
|
23302
|
+
type: 0,
|
|
23303
|
+
id_format: 0,
|
|
23304
|
+
method: 0,
|
|
23305
|
+
f1: "69",
|
|
23306
|
+
f2: "69",
|
|
23307
|
+
prescaler_type: 0
|
|
23308
|
+
},
|
|
23309
|
+
{
|
|
23310
|
+
name: "GnssDistance",
|
|
23311
|
+
state: 1,
|
|
23312
|
+
type: 0,
|
|
23313
|
+
id_format: 0,
|
|
23314
|
+
method: 0,
|
|
23315
|
+
f1: "6A",
|
|
23316
|
+
f2: "6A",
|
|
23317
|
+
prescaler_type: 0
|
|
23318
|
+
},
|
|
23319
|
+
{
|
|
23320
|
+
name: "GnssSpeed",
|
|
23321
|
+
state: 1,
|
|
23322
|
+
type: 0,
|
|
23323
|
+
id_format: 0,
|
|
23324
|
+
method: 0,
|
|
23325
|
+
f1: "6B",
|
|
23326
|
+
f2: "6B",
|
|
23327
|
+
prescaler_type: 0
|
|
23328
|
+
},
|
|
23329
|
+
{
|
|
23330
|
+
name: "GnssGeofence",
|
|
23331
|
+
state: 1,
|
|
23332
|
+
type: 0,
|
|
23333
|
+
id_format: 0,
|
|
23334
|
+
method: 0,
|
|
23335
|
+
f1: "6C",
|
|
23336
|
+
f2: "6C",
|
|
23337
|
+
prescaler_type: 0
|
|
23338
|
+
},
|
|
23339
|
+
{
|
|
23340
|
+
name: "ImuAlign",
|
|
23341
|
+
state: 1,
|
|
23342
|
+
type: 0,
|
|
23343
|
+
id_format: 0,
|
|
23344
|
+
method: 0,
|
|
23345
|
+
f1: "6E",
|
|
23346
|
+
f2: "6E",
|
|
23347
|
+
prescaler_type: 0
|
|
23348
|
+
},
|
|
23349
|
+
{
|
|
23350
|
+
name: "ImuAcc",
|
|
23351
|
+
state: 1,
|
|
23352
|
+
type: 0,
|
|
23353
|
+
id_format: 0,
|
|
23354
|
+
method: 0,
|
|
23355
|
+
f1: "6F",
|
|
23356
|
+
f2: "6F",
|
|
23357
|
+
prescaler_type: 0
|
|
23358
|
+
}
|
|
23359
|
+
]
|
|
23360
|
+
}
|
|
23361
|
+
};
|
|
23362
|
+
var can_1$3 = {
|
|
23363
|
+
filter: {
|
|
23364
|
+
remote_frames: 0,
|
|
23365
|
+
id: [
|
|
23366
|
+
{
|
|
23367
|
+
name: "AllStandardID",
|
|
23368
|
+
state: 1,
|
|
23369
|
+
type: 0,
|
|
23370
|
+
id_format: 0,
|
|
23371
|
+
method: 0,
|
|
23372
|
+
f1: "0",
|
|
23373
|
+
f2: "7FF",
|
|
23374
|
+
prescaler_type: 0
|
|
23375
|
+
},
|
|
23376
|
+
{
|
|
23377
|
+
name: "AllExtendedID",
|
|
23378
|
+
state: 1,
|
|
23379
|
+
type: 0,
|
|
23380
|
+
id_format: 1,
|
|
23381
|
+
method: 0,
|
|
23382
|
+
f1: "0",
|
|
23383
|
+
f2: "1FFFFFFF",
|
|
23384
|
+
prescaler_type: 0
|
|
23385
|
+
}
|
|
23386
|
+
]
|
|
23387
|
+
}
|
|
23388
|
+
};
|
|
23389
|
+
var can_2$2 = {
|
|
23390
|
+
filter: {
|
|
23391
|
+
remote_frames: 0,
|
|
23392
|
+
id: [
|
|
23393
|
+
{
|
|
23394
|
+
name: "AllStandardID",
|
|
23395
|
+
state: 1,
|
|
23396
|
+
type: 0,
|
|
23397
|
+
id_format: 0,
|
|
23398
|
+
method: 0,
|
|
23399
|
+
f1: "0",
|
|
23400
|
+
f2: "7FF",
|
|
23401
|
+
prescaler_type: 0
|
|
23402
|
+
},
|
|
23403
|
+
{
|
|
23404
|
+
name: "AllExtendedID",
|
|
23405
|
+
state: 1,
|
|
23406
|
+
type: 0,
|
|
23407
|
+
id_format: 1,
|
|
23408
|
+
method: 0,
|
|
23409
|
+
f1: "0",
|
|
23410
|
+
f2: "1FFFFFFF",
|
|
23411
|
+
prescaler_type: 0
|
|
23412
|
+
}
|
|
23413
|
+
]
|
|
23414
|
+
}
|
|
23415
|
+
};
|
|
23416
|
+
var canedgeDefaultFiltersGps = {
|
|
23417
|
+
can_internal: can_internal$2,
|
|
23418
|
+
can_1: can_1$3,
|
|
23419
|
+
can_2: can_2$2
|
|
23420
|
+
};
|
|
23421
|
+
|
|
23422
|
+
var phy = {
|
|
23423
|
+
can_s1: {
|
|
23424
|
+
filter: [
|
|
23425
|
+
{
|
|
23426
|
+
name: "AllStandardID",
|
|
23427
|
+
state: 1,
|
|
23428
|
+
id_format: 0,
|
|
23429
|
+
frame_format: 2,
|
|
23430
|
+
f1: "7FF",
|
|
23431
|
+
f2: "0",
|
|
23432
|
+
prescaler_type: 0
|
|
23433
|
+
},
|
|
23434
|
+
{
|
|
23435
|
+
name: "AllExtendedID",
|
|
23436
|
+
state: 1,
|
|
23437
|
+
id_format: 1,
|
|
23438
|
+
frame_format: 2,
|
|
23439
|
+
f1: "1FFFFFFF",
|
|
23440
|
+
f2: "0",
|
|
23441
|
+
prescaler_type: 0
|
|
23442
|
+
}
|
|
23443
|
+
]
|
|
23444
|
+
},
|
|
23445
|
+
can_s2: {
|
|
23446
|
+
filter: [
|
|
23447
|
+
{
|
|
23448
|
+
name: "AllStandardID",
|
|
23449
|
+
state: 1,
|
|
23450
|
+
id_format: 0,
|
|
23451
|
+
frame_format: 2,
|
|
23452
|
+
f1: "7FF",
|
|
23453
|
+
f2: "0",
|
|
23454
|
+
prescaler_type: 0
|
|
23455
|
+
},
|
|
23456
|
+
{
|
|
23457
|
+
name: "AllExtendedID",
|
|
23458
|
+
state: 1,
|
|
23459
|
+
id_format: 1,
|
|
23460
|
+
frame_format: 2,
|
|
23461
|
+
f1: "1FFFFFFF",
|
|
23462
|
+
f2: "0",
|
|
23463
|
+
prescaler_type: 0
|
|
23464
|
+
}
|
|
23465
|
+
]
|
|
23466
|
+
},
|
|
23467
|
+
can_s3: {
|
|
23468
|
+
filter: [
|
|
23469
|
+
{
|
|
23470
|
+
name: "AllStandardID",
|
|
23471
|
+
state: 1,
|
|
23472
|
+
id_format: 0,
|
|
23473
|
+
frame_format: 2,
|
|
23474
|
+
f1: "7FF",
|
|
23475
|
+
f2: "0",
|
|
23476
|
+
prescaler_type: 0
|
|
23477
|
+
},
|
|
23478
|
+
{
|
|
23479
|
+
name: "AllExtendedID",
|
|
23480
|
+
state: 1,
|
|
23481
|
+
id_format: 1,
|
|
23482
|
+
frame_format: 2,
|
|
23483
|
+
f1: "1FFFFFFF",
|
|
23484
|
+
f2: "0",
|
|
23485
|
+
prescaler_type: 0
|
|
23486
|
+
}
|
|
23487
|
+
]
|
|
23488
|
+
},
|
|
23489
|
+
can_s4: {
|
|
23490
|
+
filter: [
|
|
23491
|
+
{
|
|
23492
|
+
name: "AllStandardID",
|
|
23493
|
+
state: 1,
|
|
23494
|
+
id_format: 0,
|
|
23495
|
+
frame_format: 2,
|
|
23496
|
+
f1: "7FF",
|
|
23497
|
+
f2: "0",
|
|
23498
|
+
prescaler_type: 0
|
|
23499
|
+
},
|
|
23500
|
+
{
|
|
23501
|
+
name: "AllExtendedID",
|
|
23502
|
+
state: 1,
|
|
23503
|
+
id_format: 1,
|
|
23504
|
+
frame_format: 2,
|
|
23505
|
+
f1: "1FFFFFFF",
|
|
23506
|
+
f2: "0",
|
|
23507
|
+
prescaler_type: 0
|
|
23508
|
+
}
|
|
23509
|
+
]
|
|
23510
|
+
}
|
|
23511
|
+
};
|
|
23512
|
+
var canmodRouterDefaultFilters = {
|
|
23513
|
+
phy: phy
|
|
23514
|
+
};
|
|
23515
|
+
|
|
23120
23516
|
var _excluded = ["name"],
|
|
23121
23517
|
_excluded2 = ["name"];
|
|
23122
23518
|
var merge$2 = require("deepmerge");
|
|
@@ -23137,8 +23533,10 @@ var MAX_11BIT_FILTERS_CANEDGE = 128;
|
|
|
23137
23533
|
var MAX_29BIT_FILTERS_CANEDGE = 64;
|
|
23138
23534
|
var MAX_FILTERS_CANMOD_ROUTER = 32;
|
|
23139
23535
|
var CANEDGE_CHANNELS = ["CAN1", "CAN2", "CAN9"];
|
|
23140
|
-
var
|
|
23141
|
-
var
|
|
23536
|
+
var SUPPORTED_FIRMWARE_CANEDGE = ["01.08", "01.09"];
|
|
23537
|
+
var SUPPORTED_FIRMWARE_CANMOD_ROUTER = ["01.02"];
|
|
23538
|
+
var MIN_FIRMWARE_CANEDGE = SUPPORTED_FIRMWARE_CANEDGE[0];
|
|
23539
|
+
var MIN_FIRMWARE_CANMOD_ROUTER = SUPPORTED_FIRMWARE_CANMOD_ROUTER[0];
|
|
23142
23540
|
var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
23143
23541
|
function FilterBuilderTool(props) {
|
|
23144
23542
|
var _this;
|
|
@@ -23156,6 +23554,7 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
23156
23554
|
_this.testMergedFile = _this.testMergedFile.bind(_this);
|
|
23157
23555
|
_this.onMerge = _this.onMerge.bind(_this);
|
|
23158
23556
|
_this.onDownload = _this.onDownload.bind(_this);
|
|
23557
|
+
_this.onReset = _this.onReset.bind(_this);
|
|
23159
23558
|
_this.onSubmit = _this.onSubmit.bind(_this);
|
|
23160
23559
|
_this.onValidationError = _this.onValidationError.bind(_this);
|
|
23161
23560
|
_this.state = {
|
|
@@ -23245,9 +23644,9 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
23245
23644
|
var version = this.getConfigVersion();
|
|
23246
23645
|
if (!version) return false;
|
|
23247
23646
|
if (this.props.deviceType === "CANmod") {
|
|
23248
|
-
return version
|
|
23647
|
+
return SUPPORTED_FIRMWARE_CANMOD_ROUTER.includes(version);
|
|
23249
23648
|
}
|
|
23250
|
-
return version
|
|
23649
|
+
return SUPPORTED_FIRMWARE_CANEDGE.includes(version);
|
|
23251
23650
|
};
|
|
23252
23651
|
_proto.calculateFrameWeight = function calculateFrameWeight(dataLength) {
|
|
23253
23652
|
var baseWeight = 4;
|
|
@@ -24309,6 +24708,33 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24309
24708
|
linkElement.setAttribute('download', exportFileDefaultName);
|
|
24310
24709
|
linkElement.click();
|
|
24311
24710
|
};
|
|
24711
|
+
_proto.onReset = function onReset() {
|
|
24712
|
+
var _this$props = this.props,
|
|
24713
|
+
formData = _this$props.formData,
|
|
24714
|
+
deviceType = _this$props.deviceType;
|
|
24715
|
+
if (!formData || Object.keys(formData).length === 0) {
|
|
24716
|
+
this.props.showAlert("warning", "No configuration file loaded");
|
|
24717
|
+
return;
|
|
24718
|
+
}
|
|
24719
|
+
var defaultFilters;
|
|
24720
|
+
var isCanmodRouter = this.isCanmodRouter();
|
|
24721
|
+
if (deviceType === "CANmod" && isCanmodRouter) {
|
|
24722
|
+
defaultFilters = canmodRouterDefaultFilters;
|
|
24723
|
+
} else if (deviceType && deviceType.includes("GNSS")) {
|
|
24724
|
+
defaultFilters = canedgeDefaultFiltersGps;
|
|
24725
|
+
} else {
|
|
24726
|
+
defaultFilters = canedgeDefaultFilters;
|
|
24727
|
+
}
|
|
24728
|
+
var overwriteMerge = function overwriteMerge(destinationArray, sourceArray, options) {
|
|
24729
|
+
return sourceArray;
|
|
24730
|
+
};
|
|
24731
|
+
var resetConfig = merge$2(formData, defaultFilters, {
|
|
24732
|
+
arrayMerge: overwriteMerge
|
|
24733
|
+
});
|
|
24734
|
+
this.props.setConfigContent(resetConfig);
|
|
24735
|
+
this.props.setUpdatedFormData(resetConfig);
|
|
24736
|
+
this.props.showAlert("success", "CAN channel filters reset to defaults (record everything)");
|
|
24737
|
+
};
|
|
24312
24738
|
_proto.renderBarChart = function renderBarChart(percentage, maxPercentage) {
|
|
24313
24739
|
var maxWidth = 25;
|
|
24314
24740
|
var barWidth = Math.max(1, percentage / maxPercentage * maxWidth);
|
|
@@ -24354,7 +24780,7 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24354
24780
|
style: {
|
|
24355
24781
|
display: "flex",
|
|
24356
24782
|
gap: "10px",
|
|
24357
|
-
alignItems: "
|
|
24783
|
+
alignItems: "center",
|
|
24358
24784
|
flexWrap: "wrap"
|
|
24359
24785
|
}
|
|
24360
24786
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -24385,9 +24811,25 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24385
24811
|
clickable: true
|
|
24386
24812
|
}, /*#__PURE__*/React.createElement("button", {
|
|
24387
24813
|
className: "btn btn-primary"
|
|
24388
|
-
}, "Load DBC(s)")))
|
|
24814
|
+
}, "Load DBC(s)"))), function () {
|
|
24815
|
+
var isFirmwareSupported = _this12.isFirmwareVersionSupported();
|
|
24816
|
+
var isCanmod = _this12.props.deviceType === "CANmod";
|
|
24817
|
+
var isCanmodRouter = isCanmod && _this12.isCanmodRouter();
|
|
24818
|
+
var isDeviceSupported = !isCanmod || isCanmodRouter;
|
|
24819
|
+
var hasConfig = _this12.props.formData && Object.keys(_this12.props.formData).length > 0;
|
|
24820
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
24821
|
+
className: "btn",
|
|
24822
|
+
onClick: _this12.onReset,
|
|
24823
|
+
disabled: !hasConfig || !isFirmwareSupported || !isDeviceSupported,
|
|
24824
|
+
style: {
|
|
24825
|
+
backgroundColor: "#fff",
|
|
24826
|
+
border: "1px solid #ccc",
|
|
24827
|
+
color: "#333"
|
|
24828
|
+
}
|
|
24829
|
+
}, "Reset filters");
|
|
24830
|
+
}()), /*#__PURE__*/React.createElement("span", {
|
|
24389
24831
|
className: "field-description field-description-shift"
|
|
24390
|
-
}, this.props.deviceType === "CANmod" ? "Load
|
|
24832
|
+
}, this.props.deviceType === "CANmod" ? "Load CSV: Load a log file recorded with CANedge + CANmod.router(s), demuxed via 'mdf2mdf' and converted to CSV via 'mdf2csv'. Load DBC(s): Add DBC files with channel prefix (e.g. can11-abc.dbc). Reset filters: Reset all CAN channel filters to defaults (record everything)." : "Load CSV: Load a CSV from 'mdf2csv' reflecting a realistic log session. Load DBC(s): Add DBC files with channel prefix (e.g. can1-abc.dbc). Reset filters: Reset all CAN channel filters to defaults (record everything)."), (csvFileName || dbcFileNames.length > 0) && /*#__PURE__*/React.createElement("div", {
|
|
24391
24833
|
style: {
|
|
24392
24834
|
fontSize: "11px",
|
|
24393
24835
|
color: "#666",
|
|
@@ -24940,13 +25382,16 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24940
25382
|
}), /*#__PURE__*/React.createElement("span", {
|
|
24941
25383
|
className: "field-description field-description-shift"
|
|
24942
25384
|
}, _this12.state.prescalerType === "count" && "Accept every Nth message (1-256)", _this12.state.prescalerType === "time" && "Minimum time between messages (1-4194304 ms)", _this12.state.prescalerType === "data" && "Hex mask for data change detection")), /*#__PURE__*/React.createElement("div", {
|
|
25385
|
+
className: "form-group pl0 field-string",
|
|
25386
|
+
style: {
|
|
25387
|
+
marginBottom: "10px"
|
|
25388
|
+
}
|
|
25389
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
24943
25390
|
style: {
|
|
24944
25391
|
display: "flex",
|
|
24945
25392
|
alignItems: "center",
|
|
24946
|
-
marginBottom: "15px",
|
|
24947
25393
|
gap: "10px"
|
|
24948
|
-
}
|
|
24949
|
-
title: "The new filters can either replace existing filters on the affected channel(s) or be appended at the top/bottom of the existing filters."
|
|
25394
|
+
}
|
|
24950
25395
|
}, /*#__PURE__*/React.createElement("label", {
|
|
24951
25396
|
style: {
|
|
24952
25397
|
display: "flex",
|
|
@@ -25031,7 +25476,9 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25031
25476
|
position: "relative",
|
|
25032
25477
|
top: "1px"
|
|
25033
25478
|
}
|
|
25034
|
-
}, "Append (bottom)"))), /*#__PURE__*/React.createElement("
|
|
25479
|
+
}, "Append (bottom)"))), /*#__PURE__*/React.createElement("span", {
|
|
25480
|
+
className: "field-description field-description-shift"
|
|
25481
|
+
}, "The new filters can either replace existing filters on the affected channel(s) or be appended at the top/bottom of the existing filters. If you e.g. wish to prescale 5 specific IDs and then log everything else as-is, you can append the 5 ID filters at the top of the default filters.")), /*#__PURE__*/React.createElement("div", {
|
|
25035
25482
|
style: {
|
|
25036
25483
|
fontSize: "12px",
|
|
25037
25484
|
color: "#666",
|