get Stirrer and Plant implementation from config
git-svn-id: http://moon:8086/svn/projects/HendiControl@143 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
@@ -5,6 +5,8 @@ import json
|
|||||||
from controller import Controller
|
from controller import Controller
|
||||||
from mass import Mass
|
from mass import Mass
|
||||||
from stirrer import Stirrer
|
from stirrer import Stirrer
|
||||||
|
from pololu1376 import Pololu1376
|
||||||
|
|
||||||
from matplotlib.pyplot import figure, clf, plot, xlabel, ylabel, xlim, ylim, title, grid, axes, show, subplot
|
from matplotlib.pyplot import figure, clf, plot, xlabel, ylabel, xlim, ylim, title, grid, axes, show, subplot
|
||||||
|
|
||||||
def results_plot(self):
|
def results_plot(self):
|
||||||
@@ -36,11 +38,13 @@ def results_plot(self):
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
fp = open("brewpi.cfg.json")
|
fp = open("brewpi.json")
|
||||||
configJson = json.load(fp)
|
configJson = json.load(fp)
|
||||||
|
|
||||||
plant = Mass(configJson["WaterSim"])
|
plant_class = globals()[configJson["Controller"]['plant_name']]
|
||||||
ruehrer = Stirrer(configJson["Controller"]['dt'])
|
plant = plant_class(configJson["WaterSim"])
|
||||||
|
ruehrer_class = globals()[configJson["Controller"]['stirrer_name']]
|
||||||
|
ruehrer = ruehrer_class(configJson["Controller"]['dt'])
|
||||||
|
|
||||||
ablauf = Controller(configJson["Controller"], plant, ruehrer)
|
ablauf = Controller(configJson["Controller"], plant, ruehrer)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user