automotive-ecu 0.2.9 → 0.2.11

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9abecde05d166a15b66a246814b5acaaa5f97fd076a7743c62cb2fbeed3c2bfc
4
- data.tar.gz: 7e989b195920703c668f24a7b8eb3c8a20945b22ee740379f3dc0266790a82d7
3
+ metadata.gz: 46f464c471b1a1569978dc4cea6df42d8018421bb6b2cede8c0bf5c428a99d38
4
+ data.tar.gz: 4fcc97289f9d4bedde01475cae8a5833de9254dd4378a064c69ef1a53417a228
5
5
  SHA512:
6
- metadata.gz: bd85bac0266eda1303b4c5c3a6cec4a67638fb36cbcd97f189da4882759ea263ffe29d23cffad9e7f7f34fa39ae820068be8eba7572a86fc2194d40c851a2e58
7
- data.tar.gz: 8f8b0020aaa9bce005e295e66c01a978c69b859c0296748d3f330543fa842f020cfe8e97da43351869e07b1ce53a80a3a94eeb66454e8fbad25152fefc1b65e3
6
+ metadata.gz: a10c4f687d08d0092ead29b6f78d515936bf40f2fba03c9e7557440f0173b472fb11ad7096f391a7c1900d4bd7f455743e85fb7f2a57e474a29d70e0cc51318f
7
+ data.tar.gz: 2a07171a2206c209dbf5ad59d302296165bb67ded795714c1393234b8b0b14033aafd15e289e4dc18ae1aee4d32a6f93828c9ed6f776c3d2c77b3445113ed190
data/lib/core_ext.rb CHANGED
@@ -17,14 +17,6 @@ class String
17
17
  "\"#{to_s}\""
18
18
  end
19
19
 
20
- def to_si
21
- [self].pack("H*").unpack("l>").first
22
- end
23
-
24
- def delete_surrounding(char)
25
- self.delete_prefix(char).delete_suffix(char)
26
- end
27
-
28
20
  def to_regexp(ignorecase: false, multiline: false, extended: false)
29
21
  options = 0
30
22
  options = options | Regexp::EXTENDED if extended
@@ -34,36 +26,15 @@ class String
34
26
  end
35
27
  end
36
28
 
37
- class Regexp
38
- def extract_captures(str)
39
- data = match(str)
40
- return {} if data.nil?
41
- data.named_captures.symbolize_keys
42
- end
43
- end
44
-
45
29
  class Array
46
30
  def avg
47
31
  empty? ? nil : sum.to_f / count
48
32
  end
49
33
  end
50
34
 
51
- class Hash
52
- def symbolize_keys
53
- self.map { |k, v| [k.to_sym, v] }.to_h
54
- end
55
- end
56
-
57
35
  class File
58
36
  def self.read_encoded(filepath)
59
37
  read(filepath).encode('UTF-8', 'ISO-8859-1', invalid: :replace, undef: :replace, replace: '')
60
38
  #read(filepath)
61
39
  end
62
40
  end
63
-
64
- class Range
65
- def overlaps?(other)
66
- max >= other.min && min <= other.min ||
67
- other.max >= min && other.min <= min
68
- end
69
- end
@@ -61,6 +61,7 @@ class Ecu
61
61
  case tok
62
62
  in :NEWLINE then labels << finish_label
63
63
  in :SEPARATOR then # noop, sometimes used as end separator
64
+ in :STRING then # noop
64
65
  end
65
66
  in :SIGNAL
66
67
  case tok
@@ -55,12 +55,14 @@ class Ecu
55
55
  def reinterpx(new_xvalue)
56
56
  self.with \
57
57
  xvalue: new_xvalue,
58
+ xdim: new_xvalue.length,
58
59
  value: yvalue.map { |y| new_xvalue.map { |x| value_at(x, y) } }
59
60
  end
60
61
 
61
62
  def reinterpy(new_yvalue)
62
63
  self.with \
63
64
  yvalue: new_yvalue,
65
+ ydim: new_yvalue.length,
64
66
  value: new_yvalue.map { |y| xvalue.map { |x| value_at(x, y) } }
65
67
  end
66
68
 
data/lib/ecu/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Ecu
2
- VERSION = "0.2.9"
2
+ VERSION = "0.2.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: automotive-ecu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Mueller