X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=loop.pl;fp=loop.pl;h=ef8a6734c64ef6ebf14418cf978e71964a86b885;hb=eb43e5b8fd8bf93c8bd6a3fb5090eea8299b3368;hp=71464fd208d81390b2fa588a348855c484adaf83;hpb=729468e0480bc5a382f61b29e0c4ae27866536d4;p=dweather.git
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: |