Changeset f38145a for de.wigbels.ruby/hothotread
- Timestamp:
- 01/08/2018 12:35:57 PM (7 years ago)
- Branches:
- master
- Children:
- a605f5ba
- Parents:
- aff95c1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
de.wigbels.ruby/hothotread/hothotpiper_water.rb
raff95c1 rf38145a 26 26 end 27 27 28 watch :pin => 9, :trigger => :rising , :pull => :updo28 watch :pin => 9, :trigger => :rising do 29 29 puts('triggered watch to 1') 30 30 trigger_watch = 1 … … 33 33 34 34 rrdpath = mypath + "/water.rrd" 35 counter = last_rrd_count(rrdpath)35 #counter = last_rrd_count(rrdpath) 36 36 puts('Counter restored to: ' + counter.to_s) 37 37 … … 40 40 if trigger_watch == 1 then 41 41 counter = counter + trigger_step 42 42 #system("rrdtool update #{rrdpath} N:#{counter}:#{trigger_step}") 43 43 puts('Counter updated to: ' + counter.to_s) 44 44 timestamp = Time.now.to_i 45 45 trigger_watch = 0 46 46 elsif Time.now.to_i - timestamp > 3600 47 47 # system("rrdtool update #{rrdpath} N:#{counter}:0") 48 48 timestamp = Time.now.to_i 49 49 end
Note:
See TracChangeset
for help on using the changeset viewer.