aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/angle.py
Commit message (Collapse)AuthorAgeFilesLines
* bulk_sensor: Rename BulkDataQueue methodsKevin O'Connor2024-04-201-3/+3
| | | | | | | | Rename pull_samples() to pull_queue() and rename clear_sample() to clear_queue(). This avoids confusion between the queue of response messages and the larger list of samples stored within those messages. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_bulk: New C file with helper code for sending bulk sensor measurementsKevin O'Connor2024-01-191-2/+2
| | | | | | | | | | Refactor the low-level "bulk sensor" management code in the mcu. This updates the sensor_adxl345.c, sensor_mpu9250.c, sensor_lis2dw.c, and sensor_angle.c code to use the same "bulk sensor" messages. All of these sensors will now send "sensor_bulk_data" and "sensor_bulk_status" messages. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_angle: No need to send messages when stopping queriesKevin O'Connor2024-01-191-5/+2
| | | | | | Simplify the mcu code as any messages are ignored by the host anyway. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bulk_sensor: Simplify the registration of internal clients in BatchBulkHelperKevin O'Connor2023-12-261-7/+12
| | | | | | | | | | | | | | | 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>
* bulk_sensor: Rework APIDumpHelper() to BatchBulkHelper()Kevin O'Connor2023-12-261-26/+25
| | | | | | | The APIDumpHelper class is mainly intended to help process messages in batches. Rework the class methods to make that more clear. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bulk_sensor: New add_mux_endpoint() helper function in APIDumpHelperKevin O'Connor2023-12-261-7/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bulk_sensor: Move APIDumpHelper() from motion_report.py to bulk_sensor.pyKevin O'Connor2023-12-261-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* angle: Define BYTES_PER_SAMPLE and SAMPLES_PER_BLOCKKevin O'Connor2023-12-261-5/+10
| | | | | | This makes the code a little more readable. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* adxl345: No need to implement is_measuring()Kevin O'Connor2023-12-261-7/+0
| | | | | | | The APIDumpHelper class already ensures that the start/stop callbacks will only be called when needed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bulk_sensor: Add new BulkDataQueue classKevin O'Connor2023-12-261-17/+6
| | | | | | | Move the bulk sample queue collection to a new helper class in bulk_sensor.py. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* angle: Simplify sequence upconversionKevin O'Connor2023-12-101-11/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2240: initial implementationAlex Voinea2023-03-011-1/+2
| | | | | Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* angle: Add support for reading tle5012b chip registers (for debugging)Kevin O'Connor2022-03-291-0/+19
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* angle: Initialize tle5012b chip variants to same configurationKevin O'Connor2022-03-291-1/+27
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* angle: Report tle5012b temperatureKevin O'Connor2022-03-291-0/+9
| | | | | | Export the tle5012b temperature readings when performing measurements. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_angle: Support TLE5012b frame counter for timingKevin O'Connor2022-03-291-7/+89
| | | | | | | Use the tle5012b internal frame counter to calculate the time of each measurement. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* angle: Initial support for angle sensor calibrationKevin O'Connor2022-03-291-2/+256
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_angle: Add support for bulk querying of spi angle sensorsKevin O'Connor2022-03-291-0/+188
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>