Files
pi-control/resources/cron/5-coretemp.php
Gregor Schulte c464f9e3a3 Umbau der Statistik Ausgabe (each enfernt)
Optimierungen
2021-11-29 15:23:19 +01:00

16 lines
593 B
PHP

<?php
if (PHP_SAPI != 'cli') exit();
const PICONTROL = true;
$doNotCheckForAuthentification = true;
(include_once realpath(dirname(__FILE__)).'/../init.php') or die('Error: 0x0000');
(include_once LIBRARY_PATH.'main/main.function.php') or die('Error: 0x0001');
(include_once LIBRARY_PATH.'statistic/statistic.class.php') or die('Error: 0x0002');
(include_once LIBRARY_PATH.'main/rpi.function.php') or die('Error: 0x0003');
$log = new LogStatistic();
$log->setFile(LOG_PATH.'statistic/coretemp.csv');
$log->setLimit(2016);
$log->add(array(time(), rpi_getCoreTemprature()));
$log->close();