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.") -