- removed dbug prints
- PID: added Anti Windup code
This commit is contained in:
@@ -31,11 +31,10 @@ class TempSensorTask(ATask):
|
||||
self.kalman = kalman
|
||||
|
||||
def on_temp_changed(self, value):
|
||||
print("Sensor temp {}".format(value))
|
||||
asyncio.create_task(self.send({'Temp': value}))
|
||||
|
||||
def on_temp_changed_kalman(self, value):
|
||||
print("Kalman temp {}".format(value))
|
||||
pass
|
||||
|
||||
async def recv(self, data):
|
||||
print(data)
|
||||
@@ -120,11 +119,9 @@ class PotTask(ATask):
|
||||
plant_temp.set(round(self.plant.getTemperature(), 1))
|
||||
|
||||
if plant_power.is_changed():
|
||||
print("Plant Power {}".format(plant_power.get()))
|
||||
await self.send({'Power': plant_power.get()})
|
||||
|
||||
if plant_temp.is_changed():
|
||||
print("Plant Temp {}".format(plant_temp.get()))
|
||||
await self.send({'Temp': plant_temp.get()})
|
||||
|
||||
await asyncio.sleep(self.interval)
|
||||
@@ -230,9 +227,9 @@ if __name__ == '__main__':
|
||||
"Hold": {
|
||||
"Pid": {
|
||||
"kp": 0.8,
|
||||
"ki": 0.000004,
|
||||
"ki": 0.00001,
|
||||
"kd": 0.0,
|
||||
"rho": 1.0
|
||||
"rho": 0.0
|
||||
}
|
||||
},
|
||||
"Heat": {
|
||||
|
||||
Reference in New Issue
Block a user