Skip to content

Commit

Permalink
possible quick fix for issue #781
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduard Bröcker committed Jun 27, 2024
1 parent 6f71686 commit c88c92a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/canmatrix/formats/dbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ def dump(in_db, f, **options):
for signal in frame.signals:
if signal.cycle_time != 0:
signal.add_attribute("GenSigCycleTime", signal.cycle_time)
if signal.initial_value != 0 and "GenSigStartValue" not in db.signal_defines:
db.add_signal_defines("GenSigStartValue", 'FLOAT 0 100000000000')

if "GenSigStartValue" in db.signal_defines:
signal.add_attribute("GenSigStartValue", signal.phys2raw(None))

Expand Down

0 comments on commit c88c92a

Please sign in to comment.