use Debug;
use SMGLog;
use Math::Round qw(nearest);
+use File::Copy;
use constant pi => 3.14159265358979;
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 '***';
sub write_ld
{
return unless $dataf;
-
+
seek $dataf, 0, 0;
truncate $dataf, 0;
$ld->{ts} = time;
<br><br>
<table border=1 width=80%>
+<tr>
<th>Time:<td><span id="tm"> </span>
+<th>Sunrise:<td><span id="Sunrise"> </span>
+<th>Sunset:<td><span id="Sunset"> </span>
+<th>Console Volts:<td><span id="Batt_Console"> </span>
+<th>TX Battery OK:<td><span id="Batt_TX_OK"> </span>
+
<tr>
<th>Pressure:<td><span id="Pressure"> </span>
+<th>Trend:<td><span id="Pressure_Trend_txt"> </span>
+
<tr>
<th>Temperature in:<td> <span id="Temp_In"> </span>
<th>Humidity:<td> <span id="Humidity_In"> </span>
+
<tr>
<th>Temperature out:<td> <span id="Temp_Out"> </span>
<th>Min:<td> <span id="Temp_Out_Min"> </span>
<th>Max:<td> <span id="Temp_Out_Max"> </span>
<th>Humidity:<td> <span id="Humidity_Out"> </span>
<th>Dew Point:<td> <span id="Dew_Point"> </span>
+
<tr>
<th>Wind Direction:<td> <span id="Dir"> </span>
-<th>Minute:<td> <span id="Dir_1m"> </span>
+<th>Minute Avg:<td> <span id="Dir_1m"> </span>
<th>Speed:<td> <span id="Wind"> </span>
-<th>Minute:<td> <span id="Wind_1m"> </span>
+<th>Minute Avg:<td> <span id="Wind_1m"> </span>
+
<tr>
<th>Rain Hour:<td> <span id="Rain_1h"> </span>
<th>Day:<td> <span id="Rain_Day"> </span>
<th>Month:<td> <span id="Rain_Month"> </span>
<th>Year:<td> <span id="Rain_Year"> </span>
</table>
- </body>
+</body>
</html>