Fix Python 3.10+/websockets compatibility, add CLI args and .gitignore
- ws/message.py, ws/server/ws_server_multi_user.py: drop the loop= kwarg and replace asyncio.wait(coroutines) with asyncio.gather(), both of which were removed/forbidden in Python 3.10+. - brewpi/requirements.txt: pin websockets==10.4, the latest version that still supports this code's serve()/handler API. - config.json.sim: move Model to the top level and add the missing gain field so it matches the schema brewpi.py and config.json.templ expect. - brewpi/brewpi.py: add -c/-m/-s/-d CLI args for selecting config/model files, simulation mode, and debug. - .gitignore: exclude __pycache__, logs, the local config.json, and editor/venv directories. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+11
-9
@@ -9,14 +9,6 @@
|
||||
"pid_type": "Smith"
|
||||
},
|
||||
"TempCtrl": {
|
||||
"Model": {
|
||||
"theta": 20,
|
||||
"C": 4190,
|
||||
"M": 25,
|
||||
"L": 0.05,
|
||||
"Td": 80,
|
||||
"kn": 0.2
|
||||
},
|
||||
"Kalman": {
|
||||
"var_P" : 1.0,
|
||||
"var_Q" : 0.0001,
|
||||
@@ -35,13 +27,23 @@
|
||||
"kt": 1.5
|
||||
}
|
||||
},
|
||||
"Model": {
|
||||
"theta": 20,
|
||||
"C": 4190,
|
||||
"M": 25,
|
||||
"L": 0.05,
|
||||
"Td": 80,
|
||||
"kn": 0.2,
|
||||
"gain": 0.8
|
||||
},
|
||||
"Plant": {
|
||||
"theta": 20,
|
||||
"C": 4190,
|
||||
"M": 22,
|
||||
"L": 0.05,
|
||||
"Td": 80,
|
||||
"kn": 0.2
|
||||
"kn": 0.2,
|
||||
"gain": 0.8
|
||||
},
|
||||
"Heater": {
|
||||
"port": "/dev/ttyUSB0",
|
||||
|
||||
Reference in New Issue
Block a user