- added brewpi
git-svn-id: http://moon:8086/svn/projects/HendiControl@46 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
[Global]
|
||||
samplerate = 1 Hz
|
||||
|
||||
[Controller]
|
||||
cont_ctrl = True
|
||||
P_min = 0 W
|
||||
P_max = 3000 W
|
||||
P_q = 100 W
|
||||
theta_lock = 0.5 °C
|
||||
kp = 2
|
||||
ki = 0.02
|
||||
kd = 400
|
||||
pid_rho = 0.999
|
||||
heatrate = 0.5 °C/min
|
||||
|
||||
[Simulation]
|
||||
theta_amb = 20 °C
|
||||
C = 4190 J/(kg*K)
|
||||
M = 20 kg
|
||||
mass_kleak = 0.5
|
||||
mass_delay = 60 s
|
||||
Td = 10 s
|
||||
k_noise = 0
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"Global" :
|
||||
{
|
||||
"samplerate_Hz" : 1.0
|
||||
},
|
||||
|
||||
"Controller" :
|
||||
{
|
||||
"cont_ctrl" : true,
|
||||
"P_min_W" : 0,
|
||||
"P_max_W" : 3000,
|
||||
"P_q_W" : 100,
|
||||
"theta_lock_K" : 0.5,
|
||||
"kp" : 2,
|
||||
"ki" : 0.02,
|
||||
"kd" : 400,
|
||||
"pid_rho" : 0.999,
|
||||
"heatrate_KPerMin" : 0.5
|
||||
},
|
||||
|
||||
"Simulation" :
|
||||
{
|
||||
"theta_amb_degC" : 20,
|
||||
"C_joulePerKperkg" : 4190,
|
||||
"M_kg" : 20,
|
||||
"mass_kleak" : 0.5,
|
||||
"mass_delay_s" : 60,
|
||||
"Td_s" : 10,
|
||||
"k_noise" : 0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
print ("End of program.")
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import time
|
||||
import json
|
||||
import configparser
|
||||
|
||||
def getValue(s):
|
||||
|
||||
v = s.split(' ')[0]
|
||||
|
||||
return v
|
||||
|
||||
def getUnit(s):
|
||||
|
||||
u = s.split(' ')[1]
|
||||
|
||||
return u
|
||||
|
||||
if __name__ == '__main__':
|
||||
config = configparser.RawConfigParser()
|
||||
config.read('brewpi.cfg')
|
||||
print (getValue(config.get('Global', 'samplerate')))
|
||||
print (getValue(config.get('Controller', 'cont_ctrl')))
|
||||
print (getValue(config.get('Controller', 'heatrate')))
|
||||
|
||||
fp = open("brewpi.cfg.json")
|
||||
configJson = json.load(fp)
|
||||
print (json.dumps({'config' : configJson}, indent=4, sort_keys=True))
|
||||
|
||||
print ("End of program.")
|
||||
|
||||
Reference in New Issue
Block a user