Dr. Arne JachensDr. Arne Jachens

Heizungssteuerung Web-Interface

HV_TempCal

Keine Erläuterungen gefunden.

<?php
/*
function HV_TempCal1(){
  $fid = fopen("HV_TemperatureCalibration.dat","r");
  $cal = fgets($fid,1024);
  while(!feof($fid)){
    $cal.= fgets($fid,1024);
  }
  fclose($fid);
  $cal = htmlspecialchars($cal);
  $content = "<h2>Temperatur Eichung</h2>\n";
  $content.= "<p>Die erste Spalte enthält jeweils den ADC-Wert, die zweite Spalte die entsprechende Tempratur. <br>Die Namen zwischen den <strong> #</strong> verwendet die SW, um auf die entsprechende Kennlinie zuzugreifen, wenn du ihn änderst, musst du die SW anpassen!</p>\n";
  $content.= "<form  action='?what2do=TempCal2' method='POST'>\n";
  $content.= "<textarea name='newTempCal' cols='42' rows='32'>".$cal."</textarea><br>\n";
  $content.= "<input type='submit' name='' value='submit'>\n";
  $content.= "</form>\n";
  return $content;
}

function HV_TempCal2(){
  if(isset($_POST['newTempCal'])){
    $TempCal = $_POST['newTempCal'];
    $cmd = "cp HV_TemperatureCalibration.dat HV_TemperatureCalibration.bak";
    exec($cmd);
    $fid = fopen('HV_TemperatureCalibration.dat',"w");
    fputs($fid,$TempCal);
    fclose($fid);
    $content = "<p>Temperatur Kalibrierung geschrieben.</p>";
  }else{
    $content = "<b>no data found</b>";
  }
  return $content;
}
*/

function HV_HeatCal1(){
    $fname = "Configuration/HvcCalibration.dat";
    if (file_exists($fname)) {
    $fid = fopen($fname,"r");
  $cal = fgets($fid,1024);
  while(!feof($fid)){
    $cal.= fgets($fid,1024);
  }
  fclose($fid);
    }else{
        echo "FILE NOT fOUND: ".$fname;
    }
  $cal = htmlspecialchars($cal);
  $content = "<h2>Application of heating control</h2>\n";
  $content.= "<p>Die erste Spalte enthält jeweils die Steuergröße, die zweite Spalte die entsprechende Reaktion. <br>Die Namen zwischen den <strong> #</strong> verwendet die SW, um auf die entsprechende Kennlinie zuzugreifen, wenn du ihn änderst, musst du die SW anpassen!</p>\n";
  $content.= "<form  action='?what2do=HeatCal2' method='POST'>\n";
  $content.= "<textarea name='newHeatCal' cols='42' rows='32'>".$cal."</textarea><br>\n";
  $content.= "<input type='submit' name='' value='submit'>\n";
  $content.= "</form>\n";
  return $content;
}

function HV_HeatCal2(){
  if(isset($_POST['newHeatCal'])){
    $HeatCal = $_POST['newHeatCal'];
    $cmd = "cp HV_heatingControl.dat HV_heatingControl.bak";
    exec($cmd);
    $fid = fopen('HV_heatingControl.dat',"w");
    fputs($fid,$HeatCal);
    fclose($fid);
    $content = "<p>Kalibrierung geschrieben.</p>";
  }else{
    $content = "<b>no data found</b>";
  }
  return $content;
}
?>

Index of Library

1EM_editParameter.php
2EM_handleJSON.php
3EM_plot.php
4HV_Admin_Login.php
5HV_colorMap.php
6HV_composeH2Oplot.php
7HV_config.php
8HV_H2Olevel.php
9HV_readOperationState.php
10HV_restart.php
11HV_serviceLog.php
12HV_setParameters.php
13HV_showHouse.php
14HV_showLog.php
15HV_showWeatherForecast.php
16HV_TempCal.php
17index.php
18readFilenames.php
19readNamedData.php

Der gesamte Sourcecode darf gemäß GNU General Public License weiterverbreitet werden.