From: Dirk Koopman Date: Fri, 23 Jan 2015 23:50:03 +0000 (+0000) Subject: add extra per (half) hour stuff X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=eb43e5b8fd8bf93c8bd6a3fb5090eea8299b3368;p=dweather.git add extra per (half) hour stuff --- diff --git a/loop.pl b/loop.pl index 71464fd..ef8a673 100755 --- a/loop.pl +++ b/loop.pl @@ -13,6 +13,7 @@ use JSON; use Debug; use SMGLog; use Math::Round qw(nearest); +use File::Copy; use constant pi => 3.14159265358979; @@ -153,6 +154,14 @@ dbg "after app start"; write_ld(); close $dataf if $dataf; +# move all the files along one +copy "$datafn.oooo", "$datafn.ooooo"; +copy "$datafn.ooo", "$datafn.oooo"; +copy "$datafn.oo", "$datafn.ooo"; +copy "$datafn.o", "$datafn.oo"; +copy $datafn, "$datafn.o"; + + dbg '***'; dbg "*** ending $0"; dbg '***'; @@ -646,7 +655,7 @@ sub read_ld sub write_ld { return unless $dataf; - + seek $dataf, 0, 0; truncate $dataf, 0; $ld->{ts} = time; @@ -707,23 +716,34 @@ __DATA__

+
Time: +Sunrise: +Sunset: +Console Volts: +TX Battery OK: +
Pressure: +Trend: +
Temperature in: Humidity: +
Temperature out: Min: Max: Humidity: Dew Point: +
Wind Direction: -Minute: +Minute Avg: Speed: -Minute: +Minute Avg: +
Rain Hour: Day: @@ -731,5 +751,5 @@ __DATA__ Month: Year:
- +