- fixed not exitting executor thread
- fixed PID params
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user