19 * along with ThermFerm; see the file COPYING. If not, write to the Free |
19 * along with ThermFerm; see the file COPYING. If not, write to the Free |
20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
21 *****************************************************************************/ |
21 *****************************************************************************/ |
22 |
22 |
23 #include "thermferm.h" |
23 #include "thermferm.h" |
|
24 #include "delay.h" |
24 #include "simulator.h" |
25 #include "simulator.h" |
25 |
26 |
26 int my_simulator_state = 0; |
27 int my_simulator_state = 0; |
27 |
28 |
28 #ifdef USE_SIMULATOR |
29 #ifdef USE_SIMULATOR |
122 // Cheap trick, just follow slowly the air temp. |
123 // Cheap trick, just follow slowly the air temp. |
123 simulator->beer_temperature += ((simulator->air_temperature - simulator->beer_temperature) / 500.0); |
124 simulator->beer_temperature += ((simulator->air_temperature - simulator->beer_temperature) / 500.0); |
124 simulator->air_temperature += ((simulator->beer_temperature - simulator->air_temperature) / 2500.0); |
125 simulator->air_temperature += ((simulator->beer_temperature - simulator->air_temperature) / 2500.0); |
125 simulator->chiller_temperature = simulator->cooler_temp; // Libk these |
126 simulator->chiller_temperature = simulator->cooler_temp; // Libk these |
126 } |
127 } |
127 usleep(100000); |
128 mDelay(100L); |
128 } |
129 } |
129 usleep(50000); |
130 mDelay(50L); |
130 } |
131 } |
131 |
132 |
132 syslog(LOG_NOTICE, "Thread my_simulator_loop stopped"); |
133 syslog(LOG_NOTICE, "Thread my_simulator_loop stopped"); |
133 my_simulator_state = 0; |
134 my_simulator_state = 0; |
134 return 0; |
135 return 0; |