From ebd6854e68705d86dbb422aebf5304286ded8779 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Thu, 21 Mar 2019 21:14:25 +0000 Subject: [PATCH] - renamed main.py to brewpi.py git-svn-id: http://moon:8086/svn/projects/HendiControl@124 fda53097-d464-4ada-af97-ba876c37ca34 --- Control/brewpi/brewpi.py | 25 +++++++++++++++++++++++-- Control/brewpi/main.py | 27 --------------------------- 2 files changed, 23 insertions(+), 29 deletions(-) delete mode 100644 Control/brewpi/main.py diff --git a/Control/brewpi/brewpi.py b/Control/brewpi/brewpi.py index fb7d739..4100a4b 100644 --- a/Control/brewpi/brewpi.py +++ b/Control/brewpi/brewpi.py @@ -1,6 +1,27 @@ #!/usr/bin/python3 +import time +import json +import configparser +from pid import Pid +from controller import Controller +from mass import Mass +from stirrer import Stirrer + if __name__ == '__main__': - + + fp = open("brewpi.cfg.json") + configJson = json.load(fp) + + plant = Mass(configJson["WaterSim"]) + ruehrer = Stirrer(configJson["Stirrer"]) + ablauf = Controller(configJson["Controller"], plant, ruehrer) + + fp = open("Rezept-001.json") + recipeJson = json.load(fp) + + ablauf.start(recipeJson) + ablauf.stop() + print ("End of program.") - + diff --git a/Control/brewpi/main.py b/Control/brewpi/main.py deleted file mode 100644 index 4100a4b..0000000 --- a/Control/brewpi/main.py +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/python3 - -import time -import json -import configparser -from pid import Pid -from controller import Controller -from mass import Mass -from stirrer import Stirrer - -if __name__ == '__main__': - - fp = open("brewpi.cfg.json") - configJson = json.load(fp) - - plant = Mass(configJson["WaterSim"]) - ruehrer = Stirrer(configJson["Stirrer"]) - ablauf = Controller(configJson["Controller"], plant, ruehrer) - - fp = open("Rezept-001.json") - recipeJson = json.load(fp) - - ablauf.start(recipeJson) - ablauf.stop() - - print ("End of program.") -