- fixed not exitting executor thread

- fixed PID params
This commit is contained in:
jens
2020-12-01 19:35:06 +01:00
parent 5c97ac4d5c
commit 19ed110d0b
3 changed files with 11 additions and 6 deletions
+5 -4
View File
@@ -11,6 +11,7 @@ from utils.value import Value, ValueChanged
TC_DT = 0.1
class ATask:
def __init__(self, interval):
self.interval = interval
@@ -67,7 +68,7 @@ class HeaterTask(ATask):
self.heater = heater
def actor(self, y):
self.heater.setPower(max(0, 200 + self.heater.get_power_max() * y))
self.heater.setPower(max(0, 0 + self.heater.get_power_max() * y))
async def recv(self, data):
print(data)
@@ -202,7 +203,7 @@ if __name__ == '__main__':
"dt" : 1.0,
"theta" : 20,
"C" : 4190,
"M" : 10,
"M" : 20,
"L" : 0.02,
"Td" : 12,
"kn" : 0.2
@@ -222,8 +223,8 @@ if __name__ == '__main__':
"dt": 1.0,
"Hold": {
"Pid": {
"kp": 0.4,
"ki": 0.0,
"kp": 0.8,
"ki": 0.000004,
"kd": 0.0,
"rho": 1.0
}