Fri, 22 Aug 2014 17:12:42 +0200
Added framework for a simulation of a fridge with heater to use as controlled fermentor
/***************************************************************************** * Copyright (C) 2008-2014 * * Michiel Broek <mbroek at mbse dot eu> * * This file is part of the mbsePi-apps * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2, or (at your option) any * later version. * * mbsePi-apps is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with ThermFerm; see the file COPYING. If not, write to the Free * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *****************************************************************************/ #include "thermferm.h" #include "simulator.h" #ifdef USE_SIMULATOR extern int my_shutdown; extern int debug; #ifdef HAVE_WIRINGPI_H PI_THREAD (my_simulator_loop) #else void *my_simulator_loop(void *threadid) #endif { syslog(LOG_NOTICE, "Thread my_simulator_loop started"); if (debug) fprintf(stdout, "Thread my_simulator_loop started\n"); for (;;) { if (my_shutdown) break; usleep(100000); } syslog(LOG_NOTICE, "Thread my_simulator_loop stopped"); if (debug) fprintf(stdout, "Thread my_simulator_loop stopped\n"); return 0; } #endif