lib/ecu/interfaces/dcm/kennfeld.rb in automotive-ecu-0.1.5 vs lib/ecu/interfaces/dcm/kennfeld.rb in automotive-ecu-0.1.6

- old
+ new

@@ -3,10 +3,10 @@ def self.dcm_header %r{^KENNFELD\s+(?<name>[A-Za-z0-9\._]+)\s+(?<xdim>\d+)\s+(?<ydim>\d+)} end def to_dcm(indented=false) - fmtstr = indented ? "%-26s%s %s %s\n" : "%s %s %d %d\n" + fmtstr = indented ? "%-25s%s %s %s\n" : "%s %s %d %d\n" sprintf(fmtstr, type.upcase, name, xdim, ydim).tap do |str| str << " LANGNAME #{description.enquote}\n" if description str << " FUNKTION #{function}\n" if function str << " EINHEIT_X #{xunit.enquote}\n" if xunit