@@ -330,6 +330,7 @@ def load(file, **options):
330
330
else :
331
331
motorolaBitFormat = "msbreverse"
332
332
333
+ additionalInputs = dict ()
333
334
wb = xlrd .open_workbook (file_contents = file .read ())
334
335
sh = wb .sheet_by_index (0 )
335
336
db = CanMatrix ()
@@ -382,6 +383,9 @@ def load(file, **options):
382
383
index ['function' ] = i
383
384
elif "Byteorder" in value :
384
385
index ['byteorder' ] = i
386
+ else :
387
+ if 'Value' in index and i > index ['Value' ]:
388
+ additionalInputs [i ] = value
385
389
386
390
if "byteorder" in index :
387
391
index ['BUstart' ] = index ['byteorder' ] + 1
@@ -437,6 +441,13 @@ def load(file, **options):
437
441
cycleTime = 0
438
442
newBo .addAttribute ("GenMsgCycleTime" , str (int (cycleTime )))
439
443
444
+ for additionalIndex in additionalInputs :
445
+ if "frame" in additionalInputs [additionalIndex ]:
446
+ commandStr = additionalInputs [additionalIndex ].replace ("frame" , "newBo" )
447
+ commandStr += "="
448
+ commandStr += str (sh .cell (rownum , additionalIndex ).value )
449
+ exec (commandStr )
450
+
440
451
# new signal detected
441
452
if sh .cell (rownum , index ['signalName' ]).value != signalName and len (sh .cell (rownum , index ['signalName' ]).value )> 0 :
442
453
# new Signal
@@ -497,9 +508,19 @@ def load(file, **options):
497
508
(startbyte - 1 ) * 8 + startbit ,
498
509
bitNumbering = 1 ,
499
510
startLittle = True )
511
+
512
+ for additionalIndex in additionalInputs :
513
+ if "signal" in additionalInputs [additionalIndex ]:
514
+ commandStr = additionalInputs [additionalIndex ].replace ("signal" , "newSig" )
515
+ commandStr += "="
516
+ commandStr += str (sh .cell (rownum , additionalIndex ).value )
517
+ exec (commandStr )
518
+
500
519
newBo .addSignal (newSig )
501
520
newSig .addComment (signalComment )
502
521
function = sh .cell (rownum , index ['function' ]).value
522
+
523
+
503
524
value = str (sh .cell (rownum , index ['Value' ]).value )
504
525
valueName = sh .cell (rownum , index ['ValueName' ]).value
505
526
0 commit comments