device_control 0.0.0.3 → 0.1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -7
- data/VERSION +1 -1
- data/lib/{pid_controller.rb → device_control.rb} +0 -0
- data/test/{pid_controller.rb → device_control.rb} +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdcd9344b15b304432916abc67301349241f87f6001e1b8501ed391e810adccf
|
4
|
+
data.tar.gz: 601ff3ef86d511d25ee7357b3798580f57f1afba3efccb9647d8b77ac7c165d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ce49d473ee9c6c380f1e1f91b254b529db2a04bdc3652786d84a8e5c9c88b8a495530256ebbff5d4f60fe9e6323be6c965d85eda1161a378a048b329a8c017a
|
7
|
+
data.tar.gz: 850d60e4173e84cbb2cd3aea55502a9b159e220c8dbed038f3b7391c6594ffe428c38dd6e0ed149f5ae0fd5d732f1ea74a47285f3975a8ce73c6986947efe36f
|
data/README.md
CHANGED
@@ -52,7 +52,7 @@ to make sense.
|
|
52
52
|
Our control loop is composed of the 3 concepts above:
|
53
53
|
|
54
54
|
```
|
55
|
-
CONTROLLER
|
55
|
+
CONTROLLER ----> DEVICE
|
56
56
|
^ |
|
57
57
|
| |
|
58
58
|
| V
|
@@ -215,6 +215,10 @@ class Thermostat < Controller
|
|
215
215
|
end
|
216
216
|
```
|
217
217
|
|
218
|
+
Notice, the thermostat essentially answers the question: *is it hot enough?*
|
219
|
+
(or: *is it too cold?*). You can run it either or both ways, but notice that
|
220
|
+
you can simply pick one orientation and remain logically consistent.
|
221
|
+
|
218
222
|
Now consider:
|
219
223
|
|
220
224
|
```ruby
|
@@ -237,15 +241,12 @@ temp = 24.9
|
|
237
241
|
|
238
242
|
```
|
239
243
|
|
240
|
-
|
241
|
-
(or: *is it too cold?*). You can run it either or both ways, but notice that
|
242
|
-
you can simply pick one orientation and remain logically consistent. So the
|
243
|
-
**heat knob** goes to 1 when its thermostat goes *below* setpoint.
|
244
|
+
So the **heat knob** goes to 1 when its thermostat goes *below* setpoint.
|
244
245
|
The **cool knob** goes to 1 when its thermostat goes *above* setpoint.
|
245
246
|
|
246
247
|
# Finale
|
247
248
|
|
248
249
|
If you've made it this far, congratulations! For further reading:
|
249
250
|
|
250
|
-
* [lib/
|
251
|
-
* [test/
|
251
|
+
* [lib/device_control.rb](lib/device_control.rb#L155)
|
252
|
+
* [test/device_control.rb](test/device_control.rb)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.1.0.1
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: device_control
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rick Hull
|
@@ -20,8 +20,8 @@ files:
|
|
20
20
|
- Rakefile
|
21
21
|
- VERSION
|
22
22
|
- device_control.gemspec
|
23
|
-
- lib/
|
24
|
-
- test/
|
23
|
+
- lib/device_control.rb
|
24
|
+
- test/device_control.rb
|
25
25
|
homepage: https://github.com/rickhull/device_control
|
26
26
|
licenses:
|
27
27
|
- LGPL-3.0
|