waterfurnace_aurora 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da4fc2ec80153f77b6f1f0971346cc3bdab4cfa59937d6855a1fb4de0be798e0
4
- data.tar.gz: a92c46be932d97012865a308f60f890146eab3db29ec9e2499dc88552dd74a29
3
+ metadata.gz: e09071363ccbd485b256f1e79c2f363e03bc3b2d4d94af9149e50295d0f38d38
4
+ data.tar.gz: a092a806f450e77559de1899173b9b4cb63349a73220c17af6f67382daa30280
5
5
  SHA512:
6
- metadata.gz: d126de657ef1ae47513c8f9a0cfa6c94d4a335e4f4fc4fb467bd3bca9aa193957e6edd506d8fe2ef0d87ec26ba3b4d34dbfa921e9977af3d7182f6db9bdc1341
7
- data.tar.gz: 9098c02eb4ce2ac480ebd70739ae6f96b5ca6c7114a040a9374e7edf614b7ffcdd15f28c2750603ff69482cc6f21eede51c58ed686f7a4e82723545ed7b332a7
6
+ metadata.gz: 7e915833530cbf2d78f9e4de98dda9efbcdd0c4eca386716ef4d455e030a28d1847c38d1df379773bff24581cfd4dee765e86bf6d61d5eec706e20dd8bafd4f8
7
+ data.tar.gz: 7cb9b9b8ca0b3f17a88cf2dc66c937c52a396eb52cfd955fb311732a432e7b648c5514b12b14faafe99f76d19243e837b24f2dade224f6177c14a1c543e60e01
@@ -60,11 +60,16 @@ module Aurora
60
60
  result
61
61
  end
62
62
 
63
- def to_int32(registers, idx)
63
+ def to_uint32(registers, idx)
64
64
  Aurora&.logger&.warn("Missing register #{idx + 1}") unless registers[idx + 1]
65
65
  (registers[idx] << 16) + registers[idx + 1]
66
66
  end
67
67
 
68
+ def to_int32(registers, idx)
69
+ v = to_uint32(registers, idx)
70
+ v & 0x80000000 == 0x80000000 ? v - 0x100000000 : v
71
+ end
72
+
68
73
  def to_string(registers, idx, length)
69
74
  (idx...(idx + length)).map do |i|
70
75
  next "\ufffd" unless registers[i] # missing data? add unicode invalid character
@@ -533,7 +538,8 @@ module Aurora
533
538
  ->(v) { COMPONENT_STATUS[v] } => [800, 803, 806, 812, 815, 818, 824, 827],
534
539
  method(:axb_inputs) => [1103],
535
540
  ->(v) { from_bitmask(v, AXB_OUTPUTS) } => [1104],
536
- method(:to_int32) => [1146, 1148, 1150, 1152, 1154, 1156, 1164, 3422, 3424],
541
+ method(:to_uint32) => [1146, 1148, 1150, 1152, 1164, 3422, 3424],
542
+ method(:to_int32) => [1154, 1156],
537
543
  method(:manual_operation) => [3002],
538
544
  method(:thermostat_configuration2) => [12_006],
539
545
  ->(v) { HEATING_MODE[v] } => [12_606, 21_202, 21_211, 21_220, 21_229, 21_238, 21_247],
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Aurora
4
- VERSION = "1.3.1"
4
+ VERSION = "1.3.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waterfurnace_aurora
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-09 00:00:00.000000000 Z
11
+ date: 2022-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ccutrer-serialport