rsmp 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rsmp/tlc.rb +13 -5
- data/lib/rsmp/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: 0f137a9e58a8af4524954c33515926c1b6eb2dc8aa7e4fa9bfd00b22f6e5e4bb
|
4
|
+
data.tar.gz: a9710492f633d584e6ac0acdac9b8f5bf9b820dbe3ad14ca31295bc56b41e232
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb33932006870bcedfbf3a8d07311c1a752ffccdb23c5d72303b80e47fef0f1b61a4a9fc01521afb8c02bfa32a039b54356687e2d912c03ae9c6238159fdc291
|
7
|
+
data.tar.gz: c7161ce4a72fbf33394336ad1d8a8db1aedb5148c8988c66fd7ea361b1afa8efddbccb34e376c47ac030ed30b785b118670f4005412752d490b66696213081f7
|
data/Gemfile.lock
CHANGED
data/lib/rsmp/tlc.rb
CHANGED
@@ -293,7 +293,8 @@ module RSMP
|
|
293
293
|
def handle_s0002 status_code, status_name=nil
|
294
294
|
case status_name
|
295
295
|
when 'detectorlogicstatus'
|
296
|
-
RSMP::Tlc.make_status @detector_logics.
|
296
|
+
RSMP::Tlc.make_status @detector_logics.each { |dl| p dl.value }
|
297
|
+
RSMP::Tlc.make_status @detector_logics.map { |dl| dl.value ? '1' : '0' }.join
|
297
298
|
end
|
298
299
|
end
|
299
300
|
|
@@ -703,7 +704,7 @@ module RSMP
|
|
703
704
|
end
|
704
705
|
|
705
706
|
class DetectorLogic < Component
|
706
|
-
attr_reader :
|
707
|
+
attr_reader :forced, :value
|
707
708
|
|
708
709
|
def initialize node:, id:
|
709
710
|
super node: node, id: id, grouped: false
|
@@ -783,13 +784,20 @@ module RSMP
|
|
783
784
|
|
784
785
|
def handle_m0008 arg
|
785
786
|
@node.verify_security_code 2, arg['securityCode']
|
786
|
-
|
787
|
+
status = arg['status']=='True'
|
788
|
+
mode = arg['mode']=='True'
|
789
|
+
force_detector_logic status, mode
|
787
790
|
arg
|
788
791
|
end
|
789
792
|
|
790
|
-
def force_detector_logic
|
791
|
-
@forced =
|
793
|
+
def force_detector_logic forced, value
|
794
|
+
@forced = forced
|
792
795
|
@value = value
|
796
|
+
if @forced
|
797
|
+
log "Forcing to #{value}", level: :info
|
798
|
+
else
|
799
|
+
log "Releasing", level: :info
|
800
|
+
end
|
793
801
|
end
|
794
802
|
|
795
803
|
end
|
data/lib/rsmp/version.rb
CHANGED