radiobert: lower collectd-adsb interval to 1, catch exceptions

This commit is contained in:
Astro 2021-10-14 02:10:46 +02:00
parent a80e15487e
commit 31d24d2b54
1 changed files with 6 additions and 1 deletions

View File

@ -5,7 +5,7 @@ require 'json'
require 'distance'
HOSTNAME = IO::readlines("/proc/sys/kernel/hostname").join.chomp
INTERVAL = 10
INTERVAL = 1
POS = [ 51.08102, 13.72806 ]
loop do
@ -23,5 +23,10 @@ loop do
puts "PUTVAL \"#{HOSTNAME}/dump1090-distance/current-#{flight}\" interval=#{INTERVAL} N:#{dist}"
end
rescue
STDERR.puts $!
ensure
sleep INTERVAL
end