automotive-ecu 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ecu/interfaces/dcm/festwert.rb +4 -2
- data/lib/ecu/interfaces/dcm/festwerteblock.rb +5 -3
- data/lib/ecu/interfaces/dcm/kennfeld.rb +4 -2
- data/lib/ecu/interfaces/dcm/kennlinie.rb +4 -2
- data/lib/ecu/interfaces/dcm/label_list.rb +2 -2
- data/lib/ecu/interfaces/dcm/stuetzstellenverteilung.rb +4 -2
- data/lib/ecu/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad8f4f30b32824a37a57939951230876c96e1e6de5d89939fe831eb68b6fd92f
|
4
|
+
data.tar.gz: 397829925fb22b56f76ddd60820c52b8a89739b2e0dccbfc94ad8fb174acec94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d51985201cc46cfe5f4cdab85903f71b3018983fd2053752487cc0295587f9788760e97249da7f0fca07c277fd2fd0982c7d7825d414d21c19654c0afe6da4b6
|
7
|
+
data.tar.gz: 611e2e6b00449f3303f4edf383af46151cce36d340bf6ca67cd932a95739e86865a146f76b5e1b436088c175620db376bef8995fe74c8d61d63d3e6b4dce8623
|
@@ -4,8 +4,10 @@ class Ecu
|
|
4
4
|
%r{FESTWERT\s+(?<name>[A-Za-z0-9\._]+)}
|
5
5
|
end
|
6
6
|
|
7
|
-
def to_dcm
|
8
|
-
"
|
7
|
+
def to_dcm(indented=false)
|
8
|
+
fmtstr = indented ? "%-26s%s\n" : "%s %s\n"
|
9
|
+
|
10
|
+
sprintf(fmtstr, type.upcase, name).tap do |str|
|
9
11
|
str << " LANGNAME #{description.enquote}\n" if description
|
10
12
|
str << " FUNKTION #{function}\n" if function
|
11
13
|
str << " EINHEIT_W #{unit.enquote}\n" if unit
|
@@ -3,11 +3,13 @@ require_relative "../../../core_ext"
|
|
3
3
|
class Ecu
|
4
4
|
class Festwerteblock < Label
|
5
5
|
def self.dcm_header
|
6
|
-
%r{FESTWERTEBLOCK\s+(?<name>[A-Za-z0-9\._]+)\s+(?<xdim>\d+)(?:\s+@\s+(?<ydim>\d+))?}
|
6
|
+
%r{^FESTWERTEBLOCK\s+(?<name>[A-Za-z0-9\._]+)\s+(?<xdim>\d+)(?:\s+@\s+(?<ydim>\d+))?}
|
7
7
|
end
|
8
8
|
|
9
|
-
def to_dcm
|
10
|
-
"
|
9
|
+
def to_dcm(indented=false)
|
10
|
+
fmtstr = indented ? "%-26s%s %s" : "%s %s %d"
|
11
|
+
|
12
|
+
sprintf(fmtstr, type.upcase, name, xdim).tap do |str|
|
11
13
|
str << " @ #{ydim}" if ydim != 1
|
12
14
|
str << "\n"
|
13
15
|
str << " LANGNAME #{description.enquote}\n" if description
|
@@ -4,8 +4,10 @@ class Ecu
|
|
4
4
|
%r{^KENNFELD\s+(?<name>[A-Za-z0-9\._]+)\s+(?<xdim>\d+)\s+(?<ydim>\d+)}
|
5
5
|
end
|
6
6
|
|
7
|
-
def to_dcm
|
8
|
-
"
|
7
|
+
def to_dcm(indented=false)
|
8
|
+
fmtstr = indented ? "%-26s%s %s %s\n" : "%s %s %d %d\n"
|
9
|
+
|
10
|
+
sprintf(fmtstr, type.upcase, name, xdim, ydim).tap do |str|
|
9
11
|
str << " LANGNAME #{description.enquote}\n" if description
|
10
12
|
str << " FUNKTION #{function}\n" if function
|
11
13
|
str << " EINHEIT_X #{xunit.enquote}\n" if xunit
|
@@ -4,8 +4,10 @@ class Ecu
|
|
4
4
|
%r{^KENNLINIE\s+(?<name>[A-Za-z0-9\._]+)\s+(?<xdim>\d+)}
|
5
5
|
end
|
6
6
|
|
7
|
-
def to_dcm
|
8
|
-
"
|
7
|
+
def to_dcm(indented=false)
|
8
|
+
fmtstr = indented ? "%-26s%s %s\n" : "%s %s %d\n"
|
9
|
+
|
10
|
+
sprintf(fmtstr, type.upcase, name, xdim).tap do |str|
|
9
11
|
str << " LANGNAME #{description.enquote}\n" if description
|
10
12
|
str << " FUNKTION #{function}\n" if function
|
11
13
|
str << " EINHEIT_X #{xunit.enquote}\n" if xunit
|
@@ -73,7 +73,7 @@ class Ecu
|
|
73
73
|
line.chomp.gsub(/[[:space:]]/, " ").rstrip
|
74
74
|
end
|
75
75
|
|
76
|
-
def to_dcm
|
76
|
+
def to_dcm(indented=false)
|
77
77
|
out = []
|
78
78
|
|
79
79
|
unless headers.empty?
|
@@ -86,7 +86,7 @@ class Ecu
|
|
86
86
|
out += subheaders.map { "* " + _1 }.push("")
|
87
87
|
end
|
88
88
|
|
89
|
-
out += map(
|
89
|
+
out += map { _1.to_dcm(indented) }
|
90
90
|
|
91
91
|
out.join("\n")
|
92
92
|
end
|
@@ -4,8 +4,10 @@ class Ecu
|
|
4
4
|
%r{STUETZSTELLENVERTEILUNG\s+(?<name>[A-Za-z0-9\._]+)\s+(?<xdim>\d+)}
|
5
5
|
end
|
6
6
|
|
7
|
-
def to_dcm
|
8
|
-
"
|
7
|
+
def to_dcm(indented=false)
|
8
|
+
fmtstr = indented ? "%-26s%s %s\n" : "%s %s %d\n"
|
9
|
+
|
10
|
+
sprintf(fmtstr, type.upcase, name, xdim).tap do |str|
|
9
11
|
str << " LANGNAME #{description.enquote}\n" if description
|
10
12
|
str << " FUNKTION #{function}\n" if function
|
11
13
|
str << " EINHEIT_X #{xunit.enquote}\n" if xunit
|
data/lib/ecu/version.rb
CHANGED