<?
require('startinclude.php');

//$camara=parametro('camara',0); // viene del que llama a este include
$camaras_actual=array();
$camaras=array();
leer_camaras($camaras);
leer_camaras_actual($camaras_actual);

//$k1=(30/0) or die(var_dump($_GET));



	if ($camaras_actual[$camara]["estado_actual"]!="V") {
		leer_temperatura2(&$temp,$camara,$camaras_actual[$camara]["proceso_actual"],555);
	} else {
		leer_temperatura2(&$temp,$camara,0,555);
	}


/*leer_temperatura2(&$temp,$camara);
debug($temp);
*/
?><graph caption='Sensores <? echo $camaras[$camara]["nombre_camara"]; ?>' bgColor='C0C0C0' canvasBorderThickness='1' canvasBorderColor='C0C0C0' canvasBgColor='FFFFFF' showDivLineValues='1'   hovercapbg='FFECAA' hovercapborder='F47E00' formatNumberScale='1' decimalPrecision='1' showvalues='0' numdivlines='4' numVDivLines='30' numDisplaySets='30' showNames='1' showLegend='0' divLineColor='008040' vDivLineColor='008040' chartLeftMargin='5' chartRightMargin='15' baseFontColor='000000' numberSuffix='%BA C' showHoverCap='1' showRealTimeValue='1' dataStreamURL='realtimedato.php?camara=<?php echo $camara; ?>' refreshInterval='5' rotateNames='1' hoverCapBgColor='D0D0D0' hoverCapBorderColor='00dd00'>
<categories>
<category name='     Inicio' />
</categories><?
for ($i=0;$i<$temp["num_temp"];$i++) {
	echo "<dataset seriesName='".$temp[$i]["nombre"]."' showValues='0' alpha='70' showAreaBorder='0'>\n";
	
	$temperatura=$temp[$i]["t"];
	$temperatura=($temperatura<=-55.5)?0:$temperatura;
	echo "<set value='$temperatura' />\n";
	echo "</dataset>\n";
}
?></graph>

