balboa_worldwide_app 2.0.3 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/bwa_mqtt_bridge +2 -0
- data/lib/bwa/client.rb +13 -3
- data/lib/bwa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f47a4fef9d14e31269c10174f40b6074a78df20acf3e2943ec6915cdad9747b
|
4
|
+
data.tar.gz: ba44d2d0026e8ccab28a5831c4ee6b88c23c14f02de5c6c54b4665f6e7f3b831
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b07aa98141a94f5f53cf7ba797b6e29554de4e6d6704dba9dbabe1b2e683af16753a1aac297f0cac2c093694faf109a6b08cd967f5accca3432c15e3b4e4df8d
|
7
|
+
data.tar.gz: c20a3bf9a5da5adc70a79f9d3c1be001ca5fbee6d62755b994c08611c445f27591b7e1d86e44e8d4ddbbafa11600b165c64cc21d82b604f6f4f4b4126865be22
|
data/exe/bwa_mqtt_bridge
CHANGED
data/lib/bwa/client.rb
CHANGED
@@ -64,9 +64,15 @@ module BWA
|
|
64
64
|
@buffer = @buffer[bytes_read..-1] if bytes_read
|
65
65
|
method = @io.respond_to?(:readpartial) ? :readpartial : :read
|
66
66
|
unless message
|
67
|
+
# one EOF is just serial ports saying they have no data;
|
68
|
+
# several EOFs in a row is the file is dead and gone
|
69
|
+
eofs = 0
|
67
70
|
begin
|
68
71
|
@buffer.concat(@io.__send__(method, 64 * 1024))
|
69
72
|
rescue EOFError
|
73
|
+
eofs += 1
|
74
|
+
raise if eofs == 5
|
75
|
+
|
70
76
|
@io.wait_readable
|
71
77
|
retry
|
72
78
|
end
|
@@ -160,8 +166,11 @@ module BWA
|
|
160
166
|
return unless status && configuration
|
161
167
|
|
162
168
|
desired = 0 if desired == false
|
163
|
-
|
164
|
-
|
169
|
+
max_pump_speed = configuration.pumps[index]
|
170
|
+
desired = max_pump_speed if desired == true
|
171
|
+
desired = [desired, max_pump_speed].min
|
172
|
+
current_pump_speed = [status.pumps[index], max_pump_speed].min
|
173
|
+
times = (desired - current_pump_speed) % (max_pump_speed + 1)
|
165
174
|
times.times do
|
166
175
|
toggle_pump(index)
|
167
176
|
sleep(0.1)
|
@@ -191,7 +200,8 @@ module BWA
|
|
191
200
|
return unless status && configuration
|
192
201
|
|
193
202
|
desired = 0 if desired == false
|
194
|
-
desired =
|
203
|
+
desired = configuration.blower if desired == true
|
204
|
+
desired = [desired, configuration.blower].min
|
195
205
|
times = (desired - status.blower) % (configuration.blower + 1)
|
196
206
|
times.times do
|
197
207
|
toggle_blower
|
data/lib/bwa/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: balboa_worldwide_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ccutrer-serialport
|