My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SAMD51_grandcentral_m4.py 560B

123456789101112131415161718192021
  1. #
  2. # SAMD51_grandcentral_m4.py
  3. # Customizations for env:SAMD51_grandcentral_m4
  4. #
  5. import pioutil
  6. if pioutil.is_pio_build():
  7. from os.path import join, isfile
  8. import shutil
  9. from pprint import pprint
  10. Import("env")
  11. mf = env["MARLIN_FEATURES"]
  12. rxBuf = mf["RX_BUFFER_SIZE"] if "RX_BUFFER_SIZE" in mf else "0"
  13. txBuf = mf["TX_BUFFER_SIZE"] if "TX_BUFFER_SIZE" in mf else "0"
  14. serialBuf = str(max(int(rxBuf), int(txBuf), 350))
  15. build_flags = env.get('BUILD_FLAGS')
  16. build_flags.append("-DSERIAL_BUFFER_SIZE=" + serialBuf)
  17. env.Replace(BUILD_FLAGS=build_flags)