mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-18 20:28:10 -06:00
ads1220: Add ADS1220 bulk sensor to load_cell
Add support for the ADS1220 as an alternative to HX71x that supports SPI and higher sample rates. Signed-off-by: Gareth Farrington <gareth@waves.ky>
This commit is contained in:
parent
c0095812ff
commit
055f07c638
9 changed files with 411 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
|||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
from . import hx71x
|
||||
from . import ads1220
|
||||
|
||||
# Printer class that controls a load cell
|
||||
class LoadCell:
|
||||
|
@ -29,6 +30,7 @@ def load_config(config):
|
|||
# Sensor types
|
||||
sensors = {}
|
||||
sensors.update(hx71x.HX71X_SENSOR_TYPES)
|
||||
sensors.update(ads1220.ADS1220_SENSOR_TYPE)
|
||||
sensor_class = config.getchoice('sensor_type', sensors)
|
||||
return LoadCell(config, sensor_class(config))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue