mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-24 15:14:00 -06:00
bulk_sensor: Simplify the registration of internal clients in BatchBulkHelper
Previously, the BatchBulkHelper class was designed primarily to register webhook clients, and internal clients used a wrapper class that emulated a webhooks client. Change BatchBulkHelper to support regular internal callbacks, and introduce a new BatchWebhooksClient class that can translate these internal callback to webhooks client messages. This makes it easier to register internal clients that can process the bulk messages every batch interval. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
3370134593
commit
c716edafe2
5 changed files with 69 additions and 69 deletions
|
@ -97,8 +97,9 @@ class LIS2DW:
|
|||
"(e.g. faulty wiring) or a faulty lis2dw chip." % (
|
||||
reg, val, stored_val))
|
||||
def start_internal_client(self):
|
||||
cconn = self.bulk_batch.add_internal_client()
|
||||
return adxl345.AccelQueryHelper(self.printer, cconn)
|
||||
aqh = adxl345.AccelQueryHelper(self.printer)
|
||||
self.batch_bulk.add_client(aqh.handle_batch)
|
||||
return aqh
|
||||
# Measurement decoding
|
||||
def _extract_samples(self, raw_samples):
|
||||
# Load variables to optimize inner loop below
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue