Merge branch 'fastsim' into blinka
This commit is contained in:
commit
5df0bc503a
@ -117,6 +117,7 @@ sim_R_o_nocool = 0.5 # K/W thermal resistance oven -> environment
|
|||||||
sim_R_o_cool = 0.05 # K/W " with cooling
|
sim_R_o_cool = 0.05 # K/W " with cooling
|
||||||
sim_R_ho_noair = 0.1 # K/W thermal resistance heat element -> oven
|
sim_R_ho_noair = 0.1 # K/W thermal resistance heat element -> oven
|
||||||
sim_R_ho_air = 0.05 # K/W " with internal air circulation
|
sim_R_ho_air = 0.05 # K/W " with internal air circulation
|
||||||
|
sim_speedup_factor = 1000
|
||||||
|
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
@ -148,7 +149,7 @@ kiln_must_catch_up = True
|
|||||||
# or 100% off because the kiln is too hot. No integral builds up
|
# or 100% off because the kiln is too hot. No integral builds up
|
||||||
# outside the window. The bigger you make the window, the more
|
# outside the window. The bigger you make the window, the more
|
||||||
# integral you will accumulate. This should be a positive integer.
|
# integral you will accumulate. This should be a positive integer.
|
||||||
pid_control_window = 5 #degrees
|
pid_control_window = 50 #degrees
|
||||||
|
|
||||||
# thermocouple offset
|
# thermocouple offset
|
||||||
# If you put your thermocouple in ice water and it reads 36F, you can
|
# If you put your thermocouple in ice water and it reads 36F, you can
|
||||||
|
|||||||
@ -508,7 +508,7 @@ class SimulatedOven(Oven):
|
|||||||
self.R_o_nocool = config.sim_R_o_nocool
|
self.R_o_nocool = config.sim_R_o_nocool
|
||||||
self.R_ho_noair = config.sim_R_ho_noair
|
self.R_ho_noair = config.sim_R_ho_noair
|
||||||
self.R_ho = self.R_ho_noair
|
self.R_ho = self.R_ho_noair
|
||||||
self.speedup_factor = 1000
|
self.speedup_factor = config.sim_speedup_factor
|
||||||
|
|
||||||
# set temps to the temp of the surrounding environment
|
# set temps to the temp of the surrounding environment
|
||||||
self.t = self.t_env # deg C temp of oven
|
self.t = self.t_env # deg C temp of oven
|
||||||
@ -573,7 +573,7 @@ class SimulatedOven(Oven):
|
|||||||
if heat_on > 0:
|
if heat_on > 0:
|
||||||
self.heat = heat_on
|
self.heat = heat_on
|
||||||
|
|
||||||
log.info("simulation: -> %dW heater: %.0f -> %dW oven: %.0f -> %dW env" % (int(self.p_heat * pid),
|
log.info("simulation: -> %dW heater: %.0f -> %dW oven: %.0f -> %dW env" % (int(self.p_heat * pid),
|
||||||
self.t_h,
|
self.t_h,
|
||||||
int(self.p_ho),
|
int(self.p_ho),
|
||||||
self.t,
|
self.t,
|
||||||
|
|||||||
@ -35,12 +35,8 @@ class OvenWatcher(threading.Thread):
|
|||||||
self.recording = False
|
self.recording = False
|
||||||
self.notify_all(oven_state)
|
self.notify_all(oven_state)
|
||||||
|
|
||||||
if config.simulate:
|
time.sleep(0.5)
|
||||||
time.sleep(self.oven.time_step)
|
|
||||||
else:
|
|
||||||
time.sleep(self.oven.time_step)
|
|
||||||
|
|
||||||
|
|
||||||
def lastlog_subset(self,maxpts=50):
|
def lastlog_subset(self,maxpts=50):
|
||||||
'''send about maxpts from lastlog by skipping unwanted data'''
|
'''send about maxpts from lastlog by skipping unwanted data'''
|
||||||
totalpts = len(self.last_log)
|
totalpts = len(self.last_log)
|
||||||
|
|||||||
1
storage/profiles/test-fast.json
Normal file
1
storage/profiles/test-fast.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"data": [[0, 200], [3600, 200], [10800, 2000], [14400, 2250], [16400, 2250], [19400, 70]], "type": "profile", "name": "test-fast"}
|
||||||
Loading…
Reference in New Issue
Block a user