diff --git a/FluidNC/src/Configuration/ParserHandler.h b/FluidNC/src/Configuration/ParserHandler.h index 6e50920c4..787e00b51 100644 --- a/FluidNC/src/Configuration/ParserHandler.h +++ b/FluidNC/src/Configuration/ParserHandler.h @@ -68,7 +68,7 @@ namespace Configuration { } if (_parser.token_.state == TokenState::Matching) { - log_error("Ignored key " << _parser.key().str()); + log_warn("Ignored key " << _parser.key().str()); } #ifdef DEBUG_CHATTY_YAML_PARSER if (_parser.token_.state == Configuration::TokenState::Matched) { diff --git a/FluidNC/src/Machine/MachineConfig.cpp b/FluidNC/src/Machine/MachineConfig.cpp index a3111b9d2..253aeedd5 100644 --- a/FluidNC/src/Machine/MachineConfig.cpp +++ b/FluidNC/src/Machine/MachineConfig.cpp @@ -36,6 +36,7 @@ namespace Machine { handler.section("axes", _axes); handler.section("i2so", _i2so); handler.section("spi", _spi); + handler.section("sdcard", _sdCard); handler.section("control", _control); handler.section("coolant", _coolant); handler.section("probe", _probe); @@ -43,7 +44,6 @@ namespace Machine { handler.section("macros", _macros); handler.section("user_outputs", _userOutputs); - handler.section("sdcard", _sdCard); handler.item("software_debounce_ms", _softwareDebounceMs); // TODO: Consider putting these under a gcode: hierarchy level? Or motion control? handler.item("laser_mode", _laserMode); diff --git a/FluidNC/src/Machine/SPIBus.cpp b/FluidNC/src/Machine/SPIBus.cpp index a7b352de6..d6d2951f3 100644 --- a/FluidNC/src/Machine/SPIBus.cpp +++ b/FluidNC/src/Machine/SPIBus.cpp @@ -1,5 +1,6 @@ // Copyright (c) 2021 - Stefan de Bruijn // Copyright (c) 2021 - Mitch Bradley +// Copyright (c) 2021 - Bart Dring // Use of this source code is governed by a GPLv3 license that can be found in the LICENSE file. #include "SPIBus.h" @@ -8,8 +9,7 @@ namespace Machine { void SPIBus::validate() const { - if (_cs.defined() || _miso.defined() || _mosi.defined() || _sck.defined()) { - Assert(_cs.defined(), "SPI CS pin should be configured once"); + if (_miso.defined() || _mosi.defined() || _sck.defined()) { Assert(_miso.defined(), "SPI MISO pin should be configured once"); Assert(_mosi.defined(), "SPI MOSI pin should be configured once"); Assert(_sck.defined(), "SPI SCK pin should be configured once"); @@ -17,12 +17,9 @@ namespace Machine { } void SPIBus::init() { - if (_cs.defined()) { // validation ensures the rest is also defined. - log_info("SPI SCK:" << _sck.name() << " MOSI:" << _mosi.name() << " MISO:" << _miso.name() << " CS:" << _cs.name()); + if (_miso.defined() || _mosi.defined() || _sck.defined()) { // validation ensures the rest is also defined. + log_info("SPI SCK:" << _sck.name() << " MOSI:" << _mosi.name() << " MISO:" << _miso.name()); - _cs.setAttr(Pin::Attr::Output); - - auto csPin = _cs.getNative(Pin::Capabilities::Output | Pin::Capabilities::Native); auto mosiPin = _mosi.getNative(Pin::Capabilities::Output | Pin::Capabilities::Native); auto sckPin = _sck.getNative(Pin::Capabilities::Output | Pin::Capabilities::Native); auto misoPin = _miso.getNative(Pin::Capabilities::Input | Pin::Capabilities::Native); @@ -30,12 +27,15 @@ namespace Machine { // Start the SPI bus with the pins defined here. Once it has been started, // those pins "stick" and subsequent attempts to restart it with defaults // for the miso, mosi, and sck pins are ignored - SPI.begin(sckPin, misoPin, mosiPin, csPin); + SPI.begin(sckPin, misoPin, mosiPin); // CS is defined by each device + _defined = true; + } else { + _defined = false; + log_info("SPI not defined"); } } void SPIBus::group(Configuration::HandlerBase& handler) { - handler.item("cs", _cs); handler.item("miso", _miso); handler.item("mosi", _mosi); handler.item("sck", _sck); @@ -43,17 +43,16 @@ namespace Machine { // XXX it would be nice to have some way to turn off SPI entirely void SPIBus::afterParse() { - if (_cs.undefined()) { - _cs = Pin::create("gpio.5"); - } - if (_miso.undefined()) { - _miso = Pin::create("gpio.19"); - } - if (_mosi.undefined()) { - _mosi = Pin::create("gpio.23"); - } - if (_sck.undefined()) { - _sck = Pin::create("gpio.18"); - } + // if (_miso.undefined()) { + // _miso = Pin::create("gpio.19"); + // } + // if (_mosi.undefined()) { + // _mosi = Pin::create("gpio.23"); + // } + // if (_sck.undefined()) { + // _sck = Pin::create("gpio.18"); + // } } + + bool SPIBus::defined() { return _defined; } } diff --git a/FluidNC/src/Machine/SPIBus.h b/FluidNC/src/Machine/SPIBus.h index cbb8d186f..9b388fca1 100644 --- a/FluidNC/src/Machine/SPIBus.h +++ b/FluidNC/src/Machine/SPIBus.h @@ -11,7 +11,6 @@ namespace Machine { public: SPIBus() = default; - Pin _cs; Pin _miso; Pin _mosi; Pin _sck; @@ -22,6 +21,10 @@ namespace Machine { void init(); + bool defined(); + ~SPIBus() = default; + private: + bool _defined = false; }; } diff --git a/FluidNC/src/Main.cpp b/FluidNC/src/Main.cpp index 61ea155d5..f3fecbf2b 100644 --- a/FluidNC/src/Main.cpp +++ b/FluidNC/src/Main.cpp @@ -133,7 +133,7 @@ void setup() { WebUI::inputBuffer.begin(); } catch (const AssertionFailed& ex) { // This means something is terribly broken: - log_info("Critical error in main_init: " << ex.what()); + log_error("Critical error in main_init: " << ex.what()); sys.state = State::ConfigAlarm; } } diff --git a/FluidNC/src/Motors/TrinamicDriver.cpp b/FluidNC/src/Motors/TrinamicSpiDriver.cpp similarity index 91% rename from FluidNC/src/Motors/TrinamicDriver.cpp rename to FluidNC/src/Motors/TrinamicSpiDriver.cpp index 5932a8348..ad2cb8116 100644 --- a/FluidNC/src/Motors/TrinamicDriver.cpp +++ b/FluidNC/src/Motors/TrinamicSpiDriver.cpp @@ -5,7 +5,7 @@ This is used for Trinamic SPI controlled stepper motor drivers. */ -#include "TrinamicDriver.h" +#include "TrinamicSpiDriver.h" #include "../Machine/MachineConfig.h" @@ -13,13 +13,16 @@ #include namespace MotorDrivers { - TrinamicDriver::TrinamicDriver(uint16_t driver_part_number, int8_t spi_index) : + TrinamicSpiDriver::TrinamicSpiDriver(uint16_t driver_part_number, int8_t spi_index) : TrinamicBase(driver_part_number), _spi_index(spi_index) {} uint8_t daisy_chain_cs = -1; - void TrinamicDriver::init() { - _has_errors = false; + void TrinamicSpiDriver::init() { + _has_errors = false; + auto spiConfig = config->_spi; + + Assert(spiConfig->defined(), "SPI bus is not configured. Cannot initialize TMC driver."); _cs_pin.setAttr(Pin::Attr::Output | Pin::Attr::InitialOn); _cs_mapping = PinMapper(_cs_pin); @@ -57,8 +60,7 @@ namespace MotorDrivers { config_message(); - auto spiConfig = config->_spi; - if (spiConfig != nullptr) { + if (spiConfig != nullptr || !spiConfig->defined()) { auto csPin = _cs_pin.getNative(Pin::Capabilities::Output); auto mosiPin = spiConfig->_mosi.getNative(Pin::Capabilities::Output | Pin::Capabilities::Native); auto sckPin = spiConfig->_sck.getNative(Pin::Capabilities::Output | Pin::Capabilities::Native); @@ -95,13 +97,12 @@ namespace MotorDrivers { /* This is the startup message showing the basic definition */ - void TrinamicDriver::config_message() { - log_info(" Trinamic TMC" << _driver_part_number << " Step:" << _step_pin.name() << " Dir:" << _dir_pin.name() - << " CS:" << _cs_pin.name() << " Disable:" << _disable_pin.name() << " Index:" << _spi_index - << " R:" << _r_sense); + void TrinamicSpiDriver::config_message() { + log_info(" Trinamic TMC" << _driver_part_number << " Step:" << _step_pin.name() << " Dir:" << _dir_pin.name() << " CS:" + << _cs_pin.name() << " Disable:" << _disable_pin.name() << " Index:" << _spi_index << " R:" << _r_sense); } - bool TrinamicDriver::test() { + bool TrinamicSpiDriver::test() { if (_has_errors) { return false; } @@ -151,7 +152,7 @@ namespace MotorDrivers { uint16_t run (mA) float hold (as a percentage of run) */ - void TrinamicDriver::read_settings() { + void TrinamicSpiDriver::read_settings() { if (_has_errors) { return; } @@ -172,7 +173,7 @@ namespace MotorDrivers { tmcstepper->rms_current(run_i_ma, hold_i_percent); } - bool TrinamicDriver::set_homing_mode(bool isHoming) { + bool TrinamicSpiDriver::set_homing_mode(bool isHoming) { set_mode(isHoming); return true; } @@ -182,7 +183,7 @@ namespace MotorDrivers { Many people will want quiet and stallguard homing. Stallguard only run in Coolstep mode, so it will need to switch to Coolstep when homing */ - void TrinamicDriver::set_mode(bool isHoming) { + void TrinamicSpiDriver::set_mode(bool isHoming) { if (_has_errors) { return; } @@ -231,7 +232,7 @@ namespace MotorDrivers { /* This is the stallguard tuning info. It is call debug, so it could be generic across all classes. */ - void TrinamicDriver::debug_message() { + void TrinamicSpiDriver::debug_message() { if (_has_errors) { return; } @@ -262,7 +263,7 @@ namespace MotorDrivers { // this can use the enable feature over SPI. The dedicated pin must be in the enable mode, // but that can be hardwired that way. - void IRAM_ATTR TrinamicDriver::set_disable(bool disable) { + void IRAM_ATTR TrinamicSpiDriver::set_disable(bool disable) { if (_has_errors) { return; } diff --git a/FluidNC/src/Motors/TrinamicDriver.h b/FluidNC/src/Motors/TrinamicSpiDriver.h similarity index 84% rename from FluidNC/src/Motors/TrinamicDriver.h rename to FluidNC/src/Motors/TrinamicSpiDriver.h index 5125a97ad..ee77bfc32 100644 --- a/FluidNC/src/Motors/TrinamicDriver.h +++ b/FluidNC/src/Motors/TrinamicSpiDriver.h @@ -19,7 +19,7 @@ class TMC2130Stepper; // Forward declaration namespace MotorDrivers { - class TrinamicDriver : public TrinamicBase { + class TrinamicSpiDriver : public TrinamicBase { private: const int _spi_freq = 100000; @@ -39,9 +39,9 @@ namespace MotorDrivers { void config_message() override; public: - TrinamicDriver(uint16_t driver_part_number) : TrinamicDriver(driver_part_number, -1) {} + TrinamicSpiDriver(uint16_t driver_part_number) : TrinamicSpiDriver(driver_part_number, -1) {} - TrinamicDriver(uint16_t driver_part_number, int8_t spi_index); + TrinamicSpiDriver(uint16_t driver_part_number, int8_t spi_index); // Overrides for inherited methods void init() override; @@ -67,17 +67,17 @@ namespace MotorDrivers { const char* name() const override { return "trinamic_spi"; } }; - class TMC2130 : public TrinamicDriver { + class TMC2130 : public TrinamicSpiDriver { public: - TMC2130() : TrinamicDriver(2130) {} + TMC2130() : TrinamicSpiDriver(2130) {} // Name of the configurable. Must match the name registered in the cpp file. const char* name() const override { return "tmc_2130"; } }; - class TMC5160 : public TrinamicDriver { + class TMC5160 : public TrinamicSpiDriver { public: - TMC5160() : TrinamicDriver(5160) {} + TMC5160() : TrinamicSpiDriver(5160) {} // Name of the configurable. Must match the name registered in the cpp file. const char* name() const override { return "tmc_5160"; } diff --git a/FluidNC/src/Report.cpp b/FluidNC/src/Report.cpp index ee8129dd9..200da7f54 100644 --- a/FluidNC/src/Report.cpp +++ b/FluidNC/src/Report.cpp @@ -206,7 +206,21 @@ void report_feedback_message(Message message) { // ok to send to all clients #include "Uart.h" // Welcome message void report_init_message(Print& client) { - client << "\r\nGrbl " << GRBL_VERSION << " [FluidNC " << GIT_TAG << GIT_REV << " '$' for help]\n"; + client << "\r\nGrbl " << GRBL_VERSION << " [FluidNC " << GIT_TAG << GIT_REV << " ("; + +#if defined(ENABLE_WIFI) || defined(ENABLE_BLUETOOTH) +# ifdef ENABLE_WIFI + client << "wifi"; +# endif + +# ifdef ENABLE_BLUETOOTH + client << "bt"; +# endif +#else + client << "noradio"; +#endif + + client << ") '$' for help]\n"; } // Prints current probe parameters. Upon a probe command, these parameters are updated upon a diff --git a/FluidNC/src/SDCard.cpp b/FluidNC/src/SDCard.cpp index 9945a3ea9..1cd60cb3c 100644 --- a/FluidNC/src/SDCard.cpp +++ b/FluidNC/src/SDCard.cpp @@ -123,14 +123,18 @@ uint32_t SDCard::lineNumber() { SDCard::State SDCard::test_or_open(bool refresh) { auto spiConfig = config->_spi; - if (spiConfig == nullptr) { + if (spiConfig == nullptr || !spiConfig->defined()) { + //log_debug("SPI not defined"); return SDCard::State::NotPresent; } - auto csPin = spiConfig->_cs.getNative(Pin::Capabilities::Output | Pin::Capabilities::Native); + if (spiConfig == nullptr || _cs.undefined()) { + //log_debug("SD cs not defined"); + return SDCard::State::NotPresent; + } //no need to go further if SD detect is not correct - if (config->_sdCard->_cardDetect.defined() && !config->_sdCard->_cardDetect.read()) { + if (_cardDetect.defined() && !_cardDetect.read()) { _state = SDCard::State::NotPresent; return _state; } @@ -149,6 +153,8 @@ SDCard::State SDCard::test_or_open(bool refresh) { _state = SDCard::State::NotPresent; + auto csPin = _cs.getNative(Pin::Capabilities::Output | Pin::Capabilities::Native); + //refresh content if card was removed if (SD.begin(csPin, SPI, SPIfreq, "/sd", 2)) { if (SD.cardSize() > 0) { @@ -182,14 +188,28 @@ const char* SDCard::filename() { void SDCard::init() { static bool init_message = true; // used to show messages only once. - if (init_message) { - _cardDetect.report("SD Card Detect"); - init_message = false; + if (_cs.defined()) { + if (!config->_spi->defined()) { + log_error("SD needs SPI defined"); + } else { + if (init_message) { + _cardDetect.report("SD Card Detect"); + init_message = false; + } + log_info("SD Card cs:" << _cs.name() << " dectect:" << _cardDetect.name()); + } } + _cs.setAttr(Pin::Attr::Output); _cardDetect.setAttr(Pin::Attr::Output); } +void SDCard::afterParse() { + // if (_cs.undefined()) { + // _cs = Pin::create("gpio.5"); + // } +} + SDCard::~SDCard() { delete _pImpl; } diff --git a/FluidNC/src/SDCard.h b/FluidNC/src/SDCard.h index 5b1215931..b7085de5c 100644 --- a/FluidNC/src/SDCard.h +++ b/FluidNC/src/SDCard.h @@ -57,6 +57,7 @@ class SDCard : public Configuration::Configurable { State _state; Pin _cardDetect; + Pin _cs; SDCard::State test_or_open(bool refresh); Print& _client; WebUI::AuthenticationLevel _auth_level; @@ -78,6 +79,7 @@ class SDCard : public Configuration::Configurable { Error readFileLine(char* line, int len); float report_perc_complete(); uint32_t lineNumber(); + void afterParse() override; Print& getClient() { return _client; } WebUI::AuthenticationLevel getAuthLevel() { return _auth_level; } @@ -88,7 +90,10 @@ class SDCard : public Configuration::Configurable { void init(); // Configuration handlers. - void group(Configuration::HandlerBase& handler) override { handler.item("card_detect", _cardDetect); } + void group(Configuration::HandlerBase& handler) override { + handler.item("cs", _cs); + handler.item("card_detect", _cardDetect); + } ~SDCard(); }; diff --git a/example_configs/3axis_DAC.yaml b/example_configs/3axis_DAC.yaml deleted file mode 100644 index 67701d2a7..000000000 --- a/example_configs/3axis_DAC.yaml +++ /dev/null @@ -1,111 +0,0 @@ -name: "ESP32 Dev Controller V4" -board: "ESP32 Dev Controller V4" - -stepping: - engine: RMT - idle_ms: 250 - dir_delay_us: 1 - pulse_us: 2 - disable_delay_us: 0 - -axes: - shared_stepper_disable: gpio.13:low - - x: - steps_per_mm: 800 - max_rate: 2000 - acceleration: 25 - max_travel: 1000 - steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 - soft_limits: false - homing: - cycle: 2 - positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 - debounce_ms: 500 - seek_scaler: 1.100 - feed_scaler: 1.100 - - motor0: - limit_all: gpio.17:low:pu - stepstick: - direction: gpio.14 - step: gpio.12 - motor1: - null_motor: - - y: - steps_per_mm: 800 - max_rate: 2000 - acceleration: 25 - max_travel: 1000 - steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 - soft_limits: false - homing: - cycle: 2 - positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 - debounce_ms: 500 - seek_scaler: 1.100 - feed_scaler: 1.100 - - motor0: - limit_all: gpio.4:low:pu - stepstick: - direction: gpio.15 - step: gpio.26 - motor1: - null_motor: - - z: - steps_per_mm: 800 - max_rate: 2000 - acceleration: 25 - max_travel: 1000 - steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 - soft_limits: false - homing: - cycle: 1 - positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 - debounce_ms: 500 - seek_scaler: 1.100 - feed_scaler: 1.100 - - motor0: - limit_all: gpio.16:low:pu - stepstick: - direction: gpio.33 - step: gpio.27 - motor1: - null_motor: - -coolant: - flood: NO_PIN - mist: NO_PIN - -comms: - wifi_ap: - ip_address: "192.168.0.1" - ssid: FluidNC - -probe: - pin: gpio.32:low:pu - -DAC: - output_pin: gpio.25 diff --git a/example_configs/3axis_v4.yaml b/example_configs/3axis_v4.yaml index 2e3b4b4fa..b6d7f80b6 100644 --- a/example_configs/3axis_v4.yaml +++ b/example_configs/3axis_v4.yaml @@ -1,16 +1,14 @@ name: "ESP32 Dev Controller V4" board: "ESP32 Dev Controller V4" -yaml_wiki: "https://github.com/bdring/FluidNC/wiki/YAML-Config-File" -idle_time: 250 -step_type: rmt -dir_delay_microseconds: 1 -pulse_microseconds: 2 -disable_delay_us: 0 -homing_init_lock: false +stepping: + engine: RMT + idle_ms: 250 + dir_delay_us: 1 + pulse_us: 2 + disable_delay_us: 0 axes: - number_axis: 3 shared_stepper_disable: gpio.13:low x: @@ -19,6 +17,7 @@ axes: acceleration: 25 max_travel: 1000 homing: + cycle: 2 mpos: 10 positive_direction: false @@ -36,6 +35,7 @@ axes: acceleration: 25 max_travel: 1000 homing: + cycle: 2 mpos: 10 positive_direction: false @@ -53,6 +53,7 @@ axes: acceleration: 25 max_travel: 1000 homing: + cycle: 1 mpos: 10 positive_direction: true @@ -64,27 +65,44 @@ axes: motor1: null_motor: +spi: + miso: gpio.19 + mosi: gpio.23 + sck: gpio.18 + +sdcard: + cs: gpio.5 + card_detect: NO_PIN coolant: flood: gpio.25 mist: gpio.21 comms: - wifi_sta: - ssid: Barts-WLAN - - wifi_ap: - ip_address: "192.168.0.1" - ssid: FluidNC + telnet_enable: true + telnet_port: 23 + http_enable: true + http_port: 80 + hostname: fluidnc + wifi_ap: + ssid: FluidNC + ip_address: 10.0.0.1 + gateway: 10.0.0.1 + netmask: 255.255.0.0 + dhcp: true + channel: 1 probe: - pin: gpio.32:low:pu + pin: gpio.32:low:pu -pwm: +PWM: + pwm_freq: 5000 output_pin: gpio.2 enable_pin: gpio.22 - pwm_off: 0.0 - pwm_min: 0.0 - pwm_max: 100.0 - min_rpm: 0 - max_rpm: 1000 + direction_pin: NO_PIN + disable_with_zero_speed: false + zero_speed_with_disable: true + spinup_ms: 0 + spindown_ms: 0 + tool: 0 + speeds: 0=0% 10000=100% diff --git a/example_configs/6_pack_TMC2130.yaml b/example_configs/6_pack_TMC2130.yaml index c25f5b05b..c6ff13d1e 100644 --- a/example_configs/6_pack_TMC2130.yaml +++ b/example_configs/6_pack_TMC2130.yaml @@ -135,11 +135,14 @@ i2so: ws: gpio.17 spi: - cs: gpio.5 miso: gpio.19 mosi: gpio.23 sck: gpio.18 +sdcard: + card_detect: NO_PIN + cs: gpio.5 + control: safety_door: NO_PIN reset: NO_PIN @@ -196,9 +199,6 @@ user_outputs: digital2: NO_PIN digital3: NO_PIN -sdcard: - card_detect: NO_PIN - software_debounce_ms: 0 laser_mode: false arc_tolerance: 0.002 diff --git a/example_configs/6_pack_TMC5160.yaml b/example_configs/6_pack_TMC5160.yaml index 898cd5e02..bdb9ebfa6 100644 --- a/example_configs/6_pack_TMC5160.yaml +++ b/example_configs/6_pack_TMC5160.yaml @@ -135,11 +135,14 @@ i2so: ws: gpio.17 spi: - cs: gpio.5 miso: gpio.19 mosi: gpio.23 sck: gpio.18 +sdcard: + cs: gpio.5 + card_detect: NO_PIN + control: safety_door: NO_PIN reset: NO_PIN @@ -196,9 +199,6 @@ user_outputs: digital2: NO_PIN digital3: NO_PIN -sdcard: - card_detect: NO_PIN - software_debounce_ms: 0 laser_mode: false arc_tolerance: 0.002 diff --git a/example_configs/TMC2130_pen.yaml b/example_configs/TMC2130_pen.yaml index 0c1162e09..ca7621f6b 100644 --- a/example_configs/TMC2130_pen.yaml +++ b/example_configs/TMC2130_pen.yaml @@ -107,6 +107,15 @@ axes: output_pin: gpio.27 min_pulse_us: 2100 max_pulse_us: 1000 + +spi: + miso: gpio.19 + mosi: gpio.23 + sck: gpio.18 + +sdcard: + cs: gpio.5 + card_detect: NO_PIN coolant: flood: NO_PIN diff --git a/example_configs/TMC2209.yaml b/example_configs/TMC2209.yaml index 3b2a1bb73..33dbec4b4 100644 --- a/example_configs/TMC2209.yaml +++ b/example_configs/TMC2209.yaml @@ -114,11 +114,14 @@ a: direction: gpio.15 spi: - cs: gpio.5 miso: gpio.19 mosi: gpio.23 sck: gpio.18 +sdcard: + cs: gpio.5 + card_detect: NO_PIN + control: safety_door: NO_PIN reset: NO_PIN @@ -175,9 +178,6 @@ user_outputs: digital2: NO_PIN digital3: NO_PIN -sdcard: - card_detect: NO_PIN - software_debounce_ms: 0 laser_mode: false arc_tolerance: 0.002 diff --git a/example_configs/dac.yaml b/example_configs/dac.yaml deleted file mode 100644 index a58c5c98d..000000000 --- a/example_configs/dac.yaml +++ /dev/null @@ -1,119 +0,0 @@ -name: "ESP32 Dev Controller V4" -board: "ESP32 Dev Controller V4" - -stepping: - engine: RMT - idle_ms: 250 - dir_delay_us: 1 - pulse_us: 2 - disable_delay_us: 0 - -axes: - shared_stepper_disable: gpio.13:low - - x: - steps_per_mm: 800 - max_rate: 2000 - acceleration: 25 - max_travel: 1000 - steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 - soft_limits: false - homing: - cycle: 2 - positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 - debounce_ms: 500 - seek_scaler: 1.100 - feed_scaler: 1.100 - - motor0: - limit_all: gpio.17:low:pu - stepstick: - direction: gpio.14 - step: gpio.12 - motor1: - null_motor: - - y: - steps_per_mm: 800 - max_rate: 2000 - acceleration: 25 - max_travel: 1000 - steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 - soft_limits: false - homing: - cycle: 2 - positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 - debounce_ms: 500 - seek_scaler: 1.100 - feed_scaler: 1.100 - - motor0: - limit_all: gpio.4:low:pu - stepstick: - direction: gpio.15 - step: gpio.26 - motor1: - null_motor: - - z: - steps_per_mm: 800 - max_rate: 2000 - acceleration: 25 - max_travel: 1000 - steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 - soft_limits: false - homing: - cycle: 1 - positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 - debounce_ms: 500 - seek_scaler: 1.100 - feed_scaler: 1.100 - - motor0: - limit_all: gpio.16:low:pu - stepstick: - direction: gpio.33 - step: gpio.27 - motor1: - null_motor: - -coolant: - flood: NO_PIN - mist: NO_PIN - -comms: - wifi_ap: - ip_address: "192.168.0.1" - ssid: FluidNC - -probe: - pin: gpio.32:low:pu - -DAC: - output_pin: gpio.25 - enable_pin: NO_PIN - direction_pin: NO_PIN - disable_with_zero_speed: false - zero_speed_with_disable: true - spinup_ms: 0 - spindown_ms: 0 - tool: 100 - speeds: 0=0.000% 10000=100.000% diff --git a/example_configs/test_drive_SD.yaml b/example_configs/test_drive_SD.yaml new file mode 100644 index 000000000..ae020744f --- /dev/null +++ b/example_configs/test_drive_SD.yaml @@ -0,0 +1,98 @@ +board: None +name: Default (Test Drive) +stepping: + engine: RMT + idle_ms: 255 + pulse_us: 4 + dir_delay_us: 0 + disable_delay_us: 0 + +axes: + shared_stepper_disable: NO_PIN + x: + steps_per_mm: 320.000 + max_rate: 1000.000 + acceleration: 25.000 + max_travel: 200.000 + soft_limits: false + + y: + steps_per_mm: 320.000 + max_rate: 1000.000 + acceleration: 25.000 + max_travel: 200.000 + soft_limits: false + + z: + steps_per_mm: 320.000 + max_rate: 1000.000 + acceleration: 25.000 + max_travel: 200.000 + soft_limits: false + +spi: + miso: NO_PIN + mosi: NO_PIN + sck: NO_PIN + +control: + safety_door: NO_PIN + reset: NO_PIN + feed_hold: NO_PIN + cycle_start: NO_PIN + macro0: NO_PIN + macro1: NO_PIN + macro2: NO_PIN + macro3: NO_PIN + +coolant: + flood: NO_PIN + mist: NO_PIN + delay_ms: 0 + +probe: + pin: NO_PIN + check_mode_start: true + +comms: + +macros: + n0: + n1: + macro0: + macro1: + macro2: + macro3: + +user_outputs: + analog0: NO_PIN + analog1: NO_PIN + analog2: NO_PIN + analog3: NO_PIN + analog_frequency0: 5000 + analog_frequency1: 5000 + analog_frequency2: 5000 + analog_frequency3: 5000 + digital0: NO_PIN + digital1: NO_PIN + digital2: NO_PIN + digital3: NO_PIN + +sdcard: + card_detect: NO_PIN + cs: gpio.5 + +software_debounce_ms: 0 +laser_mode: false +arc_tolerance: 0.002 +junction_deviation: 0.010 +verbose_errors: false +report_inches: false +homing_init_lock: true +enable_parking_override_control: false +deactivate_parking_upon_init: false +check_limits_at_init: true +limits_two_switches_on_axis: false +disable_laser_during_hold: true +use_line_numbers: false +NoSpindle: diff --git a/example_configs/tmc2209_10V.yaml b/example_configs/tmc2209_10V.yaml index 7529a6937..2bfaed7f4 100644 --- a/example_configs/tmc2209_10V.yaml +++ b/example_configs/tmc2209_10V.yaml @@ -141,6 +141,15 @@ axes: motor1: null_motor: + +spi: + miso: gpio.19 + mosi: gpio.23 + sck: gpio.18 + +sdcard: + cs: gpio.5 + card_detect: NO_PIN comms: wifi_ap: diff --git a/example_configs/tmc2209_BESC.yaml b/example_configs/tmc2209_BESC.yaml index 4b069bee8..405c9bc20 100644 --- a/example_configs/tmc2209_BESC.yaml +++ b/example_configs/tmc2209_BESC.yaml @@ -141,6 +141,15 @@ axes: motor1: null_motor: + +spi: + miso: gpio.19 + mosi: gpio.23 + sck: gpio.18 + +sdcard: + cs: gpio.5 + card_detect: NO_PIN comms: wifi_ap: diff --git a/example_configs/tmc2209_huanyang.yml b/example_configs/tmc2209_huanyang.yml index dd84a7577..8fe49e0c4 100644 --- a/example_configs/tmc2209_huanyang.yml +++ b/example_configs/tmc2209_huanyang.yml @@ -140,6 +140,15 @@ axes: motor1: null_motor: + +spi: + miso: gpio.19 + mosi: gpio.23 + sck: gpio.18 + +sdcard: + cs: gpio.5 + card_detect: NO_PIN comms: wifi_ap: diff --git a/example_configs/tmc2209_laser.yaml b/example_configs/tmc2209_laser.yaml index 115e63363..a5b1652b5 100644 --- a/example_configs/tmc2209_laser.yaml +++ b/example_configs/tmc2209_laser.yaml @@ -141,6 +141,15 @@ axes: motor1: null_motor: + +spi: + miso: gpio.19 + mosi: gpio.23 + sck: gpio.18 + +sdcard: + card_detect: NO_PIN + cs: gpio.5 comms: wifi_ap: diff --git a/example_configs/tmc2209_relay.yaml b/example_configs/tmc2209_relay.yaml index 7457f1a67..f70e1a772 100644 --- a/example_configs/tmc2209_relay.yaml +++ b/example_configs/tmc2209_relay.yaml @@ -141,6 +141,15 @@ axes: motor1: null_motor: + +spi: + miso: gpio.19 + mosi: gpio.23 + sck: gpio.18 + +sdcard: + cs: gpio.5 + card_detect: NO_PIN comms: wifi_ap: