Mon, 05 Oct 2015 15:21:46 +0200
Make sure that a DS2413 device used as input has the output latch turned off.
357 | 1 | <?php |
2 | /***************************************************************************** | |
3 | * Copyright (C) 2015 | |
4 | * | |
5 | * Michiel Broek <mbroek at mbse dot eu> | |
6 | * | |
7 | * This file is part of ThermFerm | |
8 | * | |
9 | * This is free software; you can redistribute it and/or modify it | |
10 | * under the terms of the GNU General Public License as published by the | |
11 | * Free Software Foundation; either version 2, or (at your option) any | |
12 | * later version. | |
13 | * | |
14 | * ThermFerm is distributed in the hope that it will be useful, but | |
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
17 | * General Public License for more details. | |
18 | * | |
19 | * You should have received a copy of the GNU General Public License | |
20 | * along with ThermFerm; see the file COPYING. If not, write to the Free | |
21 | * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | |
22 | *****************************************************************************/ | |
23 | ||
24 | require_once('utilities.php'); | |
25 | ||
26 | ||
27 | $answer = send_cmd("ARCHIVE LOG ".$_GET["name"]); | |
28 | $arr = explode("\r\n", $answer); | |
29 | ||
30 | ||
31 | $row = '['; | |
32 | ||
33 | /* We don't use json_encode because it doesn't work for our purpose */ | |
34 | if (startsWith($arr[0], "212")) { | |
35 | $j = 1; | |
36 | while (1) { | |
37 | if (strcmp($arr[$j], ".") == 0) | |
38 | break; | |
39 | if ($j > 1) | |
40 | $row .= ','; | |
41 | $f = explode(",", $arr[$j]); | |
42 | $heater = $f[5] / 100; | |
43 | $cooler = $f[6] / 100; | |
397
00ca08f5a6f8
Fermentation profiles now have a low and high temperature setting so that you can use a temperture window. Each profile step can now set for beer or air temperature reference. The logfiles have an extra temperature field for this. Bumped to version 0.4.2.
Michiel Broek <mbroek@mbse.eu>
parents:
357
diff
changeset
|
44 | $row .= '{"Date":"'.$f[0].'","Mode":"'.$f[1].'","Air":"'.$f[2].'","Beer":"'.$f[3].'","Target_lo":"'.$f[4].'",'; |
00ca08f5a6f8
Fermentation profiles now have a low and high temperature setting so that you can use a temperture window. Each profile step can now set for beer or air temperature reference. The logfiles have an extra temperature field for this. Bumped to version 0.4.2.
Michiel Broek <mbroek@mbse.eu>
parents:
357
diff
changeset
|
45 | $row .= '"Heater":'.$heater.',"Cooler":'.$cooler.',"HeatUse":'.$f[7].',"CoolUse":"'.$f[8].'","Room":"'.$f[9].'","Target_hi":"'.$f[10].'"}'; |
357 | 46 | $j++; |
47 | } | |
48 | } | |
49 | ||
50 | $row .= ']'; | |
51 | echo $row; | |
52 | ||
53 | ?> |