mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-12 17:27:54 -06:00
motan: Add support for dumping and analyzing adxl345 data
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
0b4fbc78a8
commit
f11acd8065
3 changed files with 71 additions and 0 deletions
|
@ -150,6 +150,13 @@ class DataLogger:
|
|||
for stepper in motion_report.get("steppers", []):
|
||||
self.send_subscribe("stepq:" + stepper,
|
||||
"motion_report/dump_stepper", {"name": stepper})
|
||||
# Subscribe to additional sensor data
|
||||
config = status["configfile"]["settings"]
|
||||
for cfgname in config.keys():
|
||||
if cfgname == "adxl345" or cfgname.startswith("adxl345 "):
|
||||
aname = cfgname.split()[-1]
|
||||
self.send_subscribe("adxl345:" + aname, "adxl345/dump_adxl345",
|
||||
{"sensor": aname})
|
||||
def handle_dump(self, msg, raw_msg):
|
||||
msg_id = msg["id"]
|
||||
self.db.setdefault("subscriptions", {})[msg_id] = msg["result"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue