Skip to content

Commit

Permalink
reverted and optimized the ADXL changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Frix-x authored Jun 16, 2023
1 parent 55757a7 commit b664689
Show file tree
Hide file tree
Showing 17 changed files with 45 additions and 54 deletions.
8 changes: 8 additions & 0 deletions config/hardware/accelerometers/adxl345_BTT_SB22xx.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[include generics/adxl345_software_spi.cfg]

# As it's a toolhead ADXL, we add some default pins overrides from here
[adxl345]
cs_pin: toolhead:ADXL_CS
spi_software_sclk_pin: toolhead:ADXL_SCLK
spi_software_mosi_pin: toolhead:ADXL_MOSI
spi_software_miso_pin: toolhead:ADXL_MISO
8 changes: 8 additions & 0 deletions config/hardware/accelerometers/adxl345_ebb.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[include generics/adxl345_software_spi.cfg]

# As it's a toolhead ADXL, we add some default pins overrides from here
[adxl345]
cs_pin: toolhead:ADXL_CS
spi_software_sclk_pin: toolhead:ADXL_SCLK
spi_software_mosi_pin: toolhead:ADXL_MOSI
spi_software_miso_pin: toolhead:ADXL_MISO
8 changes: 8 additions & 0 deletions config/hardware/accelerometers/adxl345_sb2040.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[include generics/adxl345_software_spi.cfg]

# As it's a toolhead ADXL, we add some default pins overrides from here
[adxl345]
cs_pin: toolhead:ADXL_CS
spi_software_sclk_pin: toolhead:ADXL_SCLK
spi_software_mosi_pin: toolhead:ADXL_MOSI
spi_software_miso_pin: toolhead:ADXL_MISO
5 changes: 5 additions & 0 deletions config/hardware/accelerometers/adxl345_sht.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[include generics/adxl345_hardware_spi1.cfg]

# As it's a toolhead ADXL, we add some default pins overrides from here
[adxl345]
cs_pin: toolhead:ADXL_CS
1 change: 1 addition & 0 deletions config/hardware/accelerometers/adxl345_skr.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[include generics/adxl345_hardware_ssp1.cfg]
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ probe_points:

# Include the IS calibration macros to unlock them when
# an accelerometer is installed on the machine
[include ../../../macros/helpers/resonance_override.cfg]
[include ../../../macros/calibration/IS_shaper_calibrate.cfg]
[include ../../../macros/calibration/IS_vibrations_measurement.cfg]
[include ../../../../macros/helpers/resonance_override.cfg]
[include ../../../../macros/calibration/IS_shaper_calibrate.cfg]
[include ../../../../macros/calibration/IS_vibrations_measurement.cfg]
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ probe_points:

# Include the IS calibration macros to unlock them when
# an accelerometer is installed on the machine
[include ../../../macros/helpers/resonance_override.cfg]
[include ../../../macros/calibration/IS_shaper_calibrate.cfg]
[include ../../../macros/calibration/IS_vibrations_measurement.cfg]
[include ../../../../macros/helpers/resonance_override.cfg]
[include ../../../../macros/calibration/IS_shaper_calibrate.cfg]
[include ../../../../macros/calibration/IS_vibrations_measurement.cfg]
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ probe_points:

# Include the IS calibration macros to unlock them when
# an accelerometer is installed on the machine
[include ../../../macros/helpers/resonance_override.cfg]
[include ../../../macros/calibration/IS_shaper_calibrate.cfg]
[include ../../../macros/calibration/IS_vibrations_measurement.cfg]
[include ../../../../macros/helpers/resonance_override.cfg]
[include ../../../../macros/calibration/IS_shaper_calibrate.cfg]
[include ../../../../macros/calibration/IS_vibrations_measurement.cfg]
6 changes: 0 additions & 6 deletions user_templates/mcu_defaults/toolhead/BTT_EBB36-42_v1.0.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,3 @@ pin: toolhead:STATUS_NEOPIXEL
[tmc2209 extruder]
uart_pin: toolhead:E_TMCUART

[adxl345]
cs_pin: toolhead:ADXL_CS
spi_software_sclk_pin: toolhead:ADXL_SCLK
spi_software_mosi_pin: toolhead:ADXL_MOSI
spi_software_miso_pin: toolhead:ADXL_MISO

6 changes: 0 additions & 6 deletions user_templates/mcu_defaults/toolhead/BTT_EBB36-42_v1.1.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,3 @@ pin: toolhead:STATUS_NEOPIXEL
[tmc2209 extruder]
uart_pin: toolhead:E_TMCUART

[adxl345]
cs_pin: toolhead:ADXL_CS
spi_software_sclk_pin: toolhead:ADXL_SCLK
spi_software_mosi_pin: toolhead:ADXL_MOSI
spi_software_miso_pin: toolhead:ADXL_MISO

6 changes: 0 additions & 6 deletions user_templates/mcu_defaults/toolhead/BTT_EBB36-42_v1.2.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,3 @@ pin: toolhead:STATUS_NEOPIXEL
[tmc2209 extruder]
uart_pin: toolhead:E_TMCUART

[adxl345]
cs_pin: toolhead:ADXL_CS
spi_software_sclk_pin: toolhead:ADXL_SCLK
spi_software_mosi_pin: toolhead:ADXL_MOSI
spi_software_miso_pin: toolhead:ADXL_MISO

6 changes: 0 additions & 6 deletions user_templates/mcu_defaults/toolhead/BTT_SB2209_v1.0.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,3 @@ pin: toolhead:STATUS_NEOPIXEL
[tmc2209 extruder]
uart_pin: toolhead:E_TMCUART

[adxl345]
cs_pin: toolhead:ADXL_CS
spi_software_sclk_pin: toolhead:ADXL_SCLK
spi_software_mosi_pin: toolhead:ADXL_MOSI
spi_software_miso_pin: toolhead:ADXL_MISO

6 changes: 0 additions & 6 deletions user_templates/mcu_defaults/toolhead/BTT_SB2240_v1.0.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,3 @@ driver_SGT: 30
driver_SEMIN: 2
driver_SEMAX: 8

[adxl345]
cs_pin: toolhead:ADXL_CS
spi_software_sclk_pin: toolhead:ADXL_SCLK
spi_software_mosi_pin: toolhead:ADXL_MOSI
spi_software_miso_pin: toolhead:ADXL_MISO

6 changes: 0 additions & 6 deletions user_templates/mcu_defaults/toolhead/Mellow_SB2040_v1.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,3 @@ pin: toolhead:STATUS_NEOPIXEL
[tmc2209 extruder]
uart_pin: toolhead:E_TMCUART

[adxl345]
cs_pin: toolhead:ADXL_CS
spi_software_sclk_pin: toolhead:ADXL_SCLK
spi_software_mosi_pin: toolhead:ADXL_MOSI
spi_software_miso_pin: toolhead:ADXL_MISO

3 changes: 0 additions & 3 deletions user_templates/mcu_defaults/toolhead/Mellow_SHT36-42_v1.x.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,3 @@ pin: toolhead:STATUS_NEOPIXEL
[tmc2209 extruder]
uart_pin: toolhead:E_TMCUART

[adxl345]
cs_pin: toolhead:ADXL_CS

3 changes: 0 additions & 3 deletions user_templates/mcu_defaults/toolhead/Mellow_SHT36_v2.x.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,3 @@ pin: toolhead:STATUS_NEOPIXEL
[tmc2209 extruder]
uart_pin: toolhead:E_TMCUART

[adxl345]
cs_pin: toolhead:ADXL_CS

9 changes: 6 additions & 3 deletions user_templates/printer.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,13 @@
# --------------------------------------------------------------------- ACCELEROMETER ----> Select only one line
### --------------------------------------------------------------------------------------
# [include config/hardware/accelerometers/adxl345_rpi.cfg] # For ADXL plugged directly on the Pi (official and recommended way)
# [include config/hardware/accelerometers/adxl345_software_spi.cfg] # For ADXL plugged in boards such as BTT EBB, SB2209, SB2240, or Mellow Fly-SB2040, ...
# [include config/hardware/accelerometers/adxl345_hardware_spi1.cfg] # For ADXL plugged in Mellow SHT, Octopus, ...
# [include config/hardware/accelerometers/adxl345_hardware_ssp1.cfg] # For ADXL plugged in SKRv1.4, ...
# [include config/hardware/accelerometers/adxl345_usb.cfg] # For KUBSA, ...
# [include config/hardware/accelerometers/adxl345_skr.cfg] # For ADXL plugged in SKRv1.4 (not a conventional way)

# [include config/hardware/accelerometers/adxl345_sb2040.cfg] # For ADXL plugged in Mellow Fly-SB2040 boards
# [include config/hardware/accelerometers/adxl345_ebb.cfg] # For ADXL plugged in BTT EBB36 or EBB42 boards
# [include config/hardware/accelerometers/adxl345_sht.cfg] # For ADXL plugged in Mellow SHT36 or SHT42 boards
# [include config/hardware/accelerometers/adxl345_BTT_SB22xx.cfg] # For ADXL plugged in BTT SB2209 or SB2240 boards
# ----------------------------------------------------------------------------------------


Expand Down

0 comments on commit b664689

Please sign in to comment.