From eb43e5b8fd8bf93c8bd6a3fb5090eea8299b3368 Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Fri, 23 Jan 2015 23:50:03 +0000 Subject: [PATCH] add extra per (half) hour stuff --- loop.pl | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) 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:
- + -- 2.43.0