- refactored
git-svn-id: http://moon:8086/svn/projects/HendiControl@119 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
@@ -29,9 +29,9 @@ class Controller():
|
||||
self.power_v = np.empty(0)
|
||||
self.error_v = np.empty(0)
|
||||
self.time = 0
|
||||
self.sim_warp_factor = 10000
|
||||
self.log_report_interval = 1.0
|
||||
self.log_last_time = 0
|
||||
self.sim_warp_factor = 10
|
||||
self.report_interval = 1.0
|
||||
self.report_last_time = 0
|
||||
|
||||
def log(self, s):
|
||||
now = time.time()
|
||||
@@ -39,13 +39,13 @@ class Controller():
|
||||
|
||||
def report(self):
|
||||
now = time.time()
|
||||
if (now - self.log_last_time) >= self.log_report_interval:
|
||||
if (now - self.report_last_time) >= self.report_interval:
|
||||
|
||||
self.log("Temp IST = {:0.2f} °C".format(self.theta_ist))
|
||||
self.log("Heatrate IST = {:0.2f} °C/min.".format(self.heatrate_ist))
|
||||
self.log("Power = {:0.2f} W".format(self.plant.getPower()))
|
||||
# self.log("theta_err = {:0.2f} °C".format(theta_err))
|
||||
self.log_last_time = now
|
||||
self.report_last_time = now
|
||||
|
||||
def start(self, recipe):
|
||||
print(json.dumps({recipe['Name'] : recipe}, indent=4, sort_keys=True))
|
||||
|
||||
Reference in New Issue
Block a user