Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix G28 debug and sensorless homing with spreadcycle enabled. #16213

Merged
merged 1 commit into from
Dec 15, 2019

Conversation

danym21
Copy link
Contributor

@danym21 danym21 commented Dec 13, 2019

Requirements

There are small bugs in G28. when debug is enabled it can not be compiled.
homing with spreadcycle enabled was not working regarding a typo.

Description

smal Bugfix in G28

Benefits

fix homing with spreadCycle.
fix debug

@boelle
Copy link
Contributor

boelle commented Dec 13, 2019

are there an open issue for this fix?

@danym21
Copy link
Contributor Author

danym21 commented Dec 13, 2019

I have searched for but not found.

@tpruvot
Copy link
Contributor

tpruvot commented Dec 13, 2019

on which platform does that cause issues ? base branch of the PR is wrong, btw...

@boelle boelle changed the base branch from 2.0.x to bugfix-2.0.x December 13, 2019 17:20
@boelle
Copy link
Contributor

boelle commented Dec 13, 2019

not anymore, thanks for spotting that

@danym21
Copy link
Contributor Author

danym21 commented Dec 13, 2019

@boelle many thx for the move, sorry for that.
@tpruvot I think the platform does´n matter I normaly use the Bigtrettech SKR Pro 1.1
but als on the atmega 2560 you can not compile when you have sensoreless homing, home_current and debug_leveling_feature active:

Compiling .pio\build\megaatmega2560\src\src\gcode\calibrate\M852.cpp.o
Compiling .pio\build\megaatmega2560\src\src\gcode\config\M200-M205.cpp.o
Marlin\src\gcode\calibrate\G28.cpp:265:64: error: macro "SERIAL_ECHOLNPGM" passed 4 arguments, but takes just 1
       DEBUG_ECHO(s); DEBUG_ECHOLNPGM(" current: ", a, " -> ", b);
                                                                ^
Compiling .pio\build\megaatmega2560\src\src\gcode\config\M217.cpp.o
Compiling .pio\build\megaatmega2560\src\src\gcode\config\M218.cpp.o
Compiling .pio\build\megaatmega2560\src\src\gcode\config\M220.cpp.o

to reproduce you can do the following changes in the config:
Configuration.h

@ -638,13 +638,13 @@
#endif

// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define X_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // Set to true to invert the logic of the probe.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // Set to true to invert the logic of the probe.

/**
 * Stepper Drivers
@ -661,12 +661,12 @@
 *          TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
 * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
 */
//#define X_DRIVER_TYPE  A4988
//#define Y_DRIVER_TYPE  A4988
//#define Z_DRIVER_TYPE  A4988
#define X_DRIVER_TYPE  TMC5160
#define Y_DRIVER_TYPE  TMC5160
#define Z_DRIVER_TYPE  TMC5160
//#define X2_DRIVER_TYPE A4988
//#define Y2_DRIVER_TYPE A4988
//#define Z2_DRIVER_TYPE A4988
#define Z2_DRIVER_TYPE TMC5160
//#define Z3_DRIVER_TYPE A4988
//#define E0_DRIVER_TYPE A4988
//#define E1_DRIVER_TYPE A4988
@ -1179,7 +1179,7 @@
 * Turn on with the command 'M111 S32'.
 * NOTE: Requires a lot of PROGMEM!
 */
//#define DEBUG_LEVELING_FEATURE
#define DEBUG_LEVELING_FEATURE

#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL)
  // Gradually reduce leveling correction until a set height is reached,

Configuration_adv.h:

@ -1881,7 +1881,7 @@

  #if AXIS_IS_TMC(X)
    #define X_CURRENT       800        // (mA) RMS current. Multiply by 1.414 for peak current.
    #define X_CURRENT_HOME  X_CURRENT  // (mA) RMS current for sensorless homing
    #define X_CURRENT_HOME  400  // (mA) RMS current for sensorless homing
    #define X_MICROSTEPS     16    // 0..256
    #define X_RSENSE          0.11
    #define X_CHAIN_POS      -1    // <=0 : Not chained. 1 : MCU MOSI connected. 2 : Next in chain, ...
@ -2000,7 +2000,7 @@
   * The default SW SPI pins are defined the respective pins files,
   * but you can override or define them here.
   */
  //#define TMC_USE_SW_SPI
  #define TMC_USE_SW_SPI
  //#define TMC_SW_MOSI       -1
  //#define TMC_SW_MISO       -1
  //#define TMC_SW_SCK        -1
@ -2075,7 +2075,7 @@
   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
   * M122 - Report driver parameters (Requires TMC_DEBUG)
   */
  //#define MONITOR_DRIVER_STATUS
  #define MONITOR_DRIVER_STATUS

  #if ENABLED(MONITOR_DRIVER_STATUS)
    #define CURRENT_STEP_DOWN     50  // [mA]
@ -2131,7 +2131,7 @@
   *
   * TMC2209 requires STEALTHCHOP enabled for SENSORLESS_HOMING
   */
  //#define SENSORLESS_HOMING // StallGuard capable drivers only
  #define SENSORLESS_HOMING // StallGuard capable drivers only

  /**
   * Use StallGuard2 to probe the bed with the nozzle.

regearding this :
G28.cpp Line 291
process_subcommands_now_P(PSTR("M569S0XY"));
G28.cpp Line 520
process_subcommands_now_P(PSTR("M569S1XY"));

I think here the spaces are missing.
do I have missed something?

@thinkyhead
Copy link
Member

It looks like you started from the 2.0.x branch. You should have started with the bugfix-2.0.x branch. Be sure to start with the bugfix-2.0.x branch and be careful to target bugfix-2.0.x when submitting PRs. It may help to set your fork's default branch to bugfix-2.0.x.

See http://marlinfw.org/docs/development/getting_started_pull_requests.html for full instructions.

I'll try to repair this PR by doing a rebase and deleting some commits from your branch.

@thinkyhead
Copy link
Member

thinkyhead commented Dec 15, 2019

Your 2.0.x branch now contains the contents of bugfix-2.0.x plus this PR's commits. After this PR is merged, you might want to restore your 2.0.x branch to match ours. So at that time you will need to use the Git Console and the commands…

git fetch upstream
git checkout 2.0.x
git reset --hard upstream/2.0.x
git push -f origin

@thinkyhead
Copy link
Member

G-code doesn't require spaces between parameters. So if M569S0XY isn't working but M569 S0 X Y is, then we'll need to debug the G-code parser.

@thinkyhead thinkyhead merged commit 6e8dcba into MarlinFirmware:bugfix-2.0.x Dec 15, 2019
LinoBarreca pushed a commit to LinoBarreca/Marlin that referenced this pull request Dec 18, 2019
philippniethammer pushed a commit to philippniethammer/Marlin that referenced this pull request Dec 21, 2019
christran206 pushed a commit to christran206/Marlin2.0-SKR-Mini-E3-1.2 that referenced this pull request Dec 30, 2019
webs1821 added a commit to webs1821/Marlin that referenced this pull request Jan 2, 2020
* [cron] Bump distribution date

* STM32F1 Flash-based EEPROM fixes (MarlinFirmware#16118)

* Disable PRINTCOUNTER in SKR Mini E3 examples (MarlinFirmware#16110)

* Fix compile error with disabled PIDTEMP (MarlinFirmware#16108)

* Wanhao D6 uses TINYBOY2 (MarlinFirmware#16117)

* Improve touch buttons behavior (MarlinFirmware#16109)

* Update AZSMZ LCD link (MarlinFirmware#16106)

* [cron] Bump distribution date

* Update 3DFabXYZ settings (MarlinFirmware#16139)

* [cron] Bump distribution date

* Fix controller and SD on Robin Nano (MarlinFirmware#16187)

* Correct MKS Robin Mini pins (MarlinFirmware#16178)

* Formalize DAC percent strings (MarlinFirmware#16176)

* Update Italian language (MarlinFirmware#16147)

* Update french (objects, retract...)

* Superscript 3 for mm3

* [cron] Bump distribution date

* Add MKS Robin Pro, MKS Robin Lite3 (MarlinFirmware#16163)

* Fix multiple servos with STM32 (MarlinFirmware#16151)

* Use error message !! hints (MarlinFirmware#16145)

* Update BTT comments for USB/SD Composite (MarlinFirmware#16130)

* MKS 12864 OLED pins for SGEN-L (MarlinFirmware#16188)

* Invert E dir of Geeetech A10 (MarlinFirmware#16149)

* Disable SD_CHECK_AND_RETRY in BTT E3 configs (MarlinFirmware#16143)

* Add a CI test for RAMBo + CNC (MarlinFirmware#16126)

* Onboard (always-on) pullups support (MarlinFirmware#16144)

* Tweak ExtUI Probeless Babystepping (MarlinFirmware#16177)

* Fix RAMBo CNC test

* Flsun QQ-S example config (MarlinFirmware#16204)

* Add MKS Robin Mini EEPROM defines (MarlinFirmware#16203)

* Fix compile error (macro substitution typo) (MarlinFirmware#16194)

* Update M503 MBL G29 report (MarlinFirmware#16199)

* Include Z in SCARA steps feedrate (MarlinFirmware#16193)

* Cardreader read/write open methods

* Tweak some config names

* Improve A20M config

* Move status screen defines

* Fix bad #ifdef (MarlinFirmware#16227)

* TOUCH_MI_DEPLOY_XPOS fallback to X_MIN_POS (MarlinFirmware#16226)

* Fix MKS SGen-L SD detect pin (MarlinFirmware#16224)

* Improve ESP32 HAL (EEPROM, watchdog) (MarlinFirmware#16228)

* Fix G28 debug line, M569 calls (MarlinFirmware#16213)

* Add SKR Mini E3 + Zonestar LCD warning (MarlinFirmware#16214)

* STM32 Touch UI timings, Longer onboard pullups (MarlinFirmware#16219)

* Update BTT002 platform (fixing SD init) (MarlinFirmware#16217)

* Define more FAN pins for GT2560 (MarlinFirmware#16235)

* Tweak E180 config

* Update product links

* [cron] Bump distribution date

* Add dev-2.1.x to 'mfinfo' script

* Move AutoBuildMarlin to its own repo

* [cron] Bump distribution date

* Tweak G34, fix a declaration

* Sanity-check Z_STEPPER_AUTO_ALIGN coordinates (MarlinFirmware#16231)

* Improve SKR mini E3 + Ender 3 settings (MarlinFirmware#16247)

* Tweak code formatting

* Allow TMC2209 to save/restore spreadCycle (MarlinFirmware#16153)

Co-Authored-By: teemuatlut <teemu.mantykallio@live.fi>

* Spindle/Laser pins for RADDS (MarlinFirmware#16119)

* Improve pulse timing and step reliability (MarlinFirmware#16128)

* BigTreeTech SKR v1.4 support (MarlinFirmware#16236)

* Followup to TMC2209 spreadcycle patch

* Remove obsolete TMC2209 comment

* HOME_USING_SPREADCYCLE is obsolete

Co-Authored-By: teemuatlut <teemu.mantykallio@live.fi>

* Use MYSERIAL0 (not SerialUSB) for Malyan LCD

* Followup for step timing (MarlinFirmware#16128)

* Fix broken M100_dump_routine

* Tweak sanity checks

* Update test scripts to error on unknown (MarlinFirmware#16229)

* Kossel Clear configuration (MarlinFirmware#16198)

* Move pins debug condition

* Use Github Actions for CI, date bump (MarlinFirmware#16269)

* Fix HAL_STM32 + Arduino IDE SoftwareSerial conflict (MarlinFirmware#16266)

* Improve Anet A6 config (MarlinFirmware#16280)

* Fix G34 with Z_DUAL_STEPPER_DRIVERS compile (MarlinFirmware#16274)

* Fix planner compile error (MarlinFirmware#16272)

* Fix axis CS sanity check (MarlinFirmware#16271)

* Add Tevo Nereus (w/ Robin Nano) config (MarlinFirmware#16207)

* Don't test certain changes

* Reset runout.ran_out on resume (MarlinFirmware#16230)

* Step timing cleanup and rounding fix (MarlinFirmware#16258)

* Add MRR_ESPA/_ESPE (ESP32) boards (MarlinFirmware#16238)

* Add Ender-5 Pro config (MarlinFirmware#16221)

* Add FLYBOARD (STM32F407ZG) (MarlinFirmware#16257)

* Fix STM32 flush of TX (used by UBL) (MarlinFirmware#16197)

* Flash leveling (for some STM32) (MarlinFirmware#16174)

* Some ESP32 patches (MarlinFirmware#16297)

* MKS SGen-L pins EEBF or EFBF scheme (MarlinFirmware#16296)

* Release version 2.0.0

* Add Rumba32 support for PIO (MarlinFirmware#16202)

* MKS Robin 2 (STM32F407ZE) base support (MarlinFirmware#16270)

* Update Czech language (MarlinFirmware#16305)

* Sync SKR E3 configs (MarlinFirmware#16301)

* Add NOZZLE_AS_PROBE (no probe offsets) (MarlinFirmware#15929)

* Version 2.0.1

* Update build status url

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: randellhodges <rhodges@taxfodder.com>
Co-authored-by: Jason Smith <jason.inet@gmail.com>
Co-authored-by: Antti Andreimann <anttix@users.sourceforge.net>
Co-authored-by: thisiskeithb <13375512+thisiskeithb@users.noreply.github.com>
Co-authored-by: Tanguy Pruvot <tpruvot@users.noreply.github.com>
Co-authored-by: Luu Lac <45380455+shitcreek@users.noreply.github.com>
Co-authored-by: Alain Martel <alain74martel@gmail.com>
Co-authored-by: Anders Sahlman <57940217+AndersSahlman@users.noreply.github.com>
Co-authored-by: dagorel <37673727+dagorel@users.noreply.github.com>
Co-authored-by: Giuliano Zaro <3684609+GMagician@users.noreply.github.com>
Co-authored-by: MS1987 <lms228@163.com>
Co-authored-by: MangaValk <patrickvalkmanga@hotmail.com>
Co-authored-by: André Kjellstrup <andre.kjellstrup@gmail.com>
Co-authored-by: Tobias Schürg <tobiasschuerg@gmail.com>
Co-authored-by: Jeff Eberl <jeffeb3@gmail.com>
Co-authored-by: ManuelMcLure <manuel@mclure.org>
Co-authored-by: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com>
Co-authored-by: iain MacDonnell <github@dseven.org>
Co-authored-by: Bo Herrmannsen <bo.herrmannsen@gmail.com>
Co-authored-by: Luc <8822552+luc-github@users.noreply.github.com>
Co-authored-by: danym21 <54744475+danym21@users.noreply.github.com>
Co-authored-by: chzj333 <53591189+chzj333@users.noreply.github.com>
Co-authored-by: Vertabreaker <opyrus@hotmail.com>
Co-authored-by: Moshi Binyamini <MoshiBin@users.noreply.github.com>
Co-authored-by: salami738 <24863070+salami738@users.noreply.github.com>
Co-authored-by: elementfoundry <57408038+elementfoundry@users.noreply.github.com>
Co-authored-by: teemuatlut <teemu.mantykallio@live.fi>
Co-authored-by: Mario Costa <mario.silva.costa@gmail.com>
Co-authored-by: BigTreeTech <38851044+bigtreetech@users.noreply.github.com>
Co-authored-by: Markus Towara <mtowara@gmail.com>
Co-authored-by: FLYmaker <49380822+FLYmaker@users.noreply.github.com>
Co-authored-by: ferengi82 <christian.maurer@gmx.eu>
Co-authored-by: petrzjunior <junior@zahradnik.cz>
webs1821 pushed a commit to webs1821/Marlin that referenced this pull request Jan 2, 2020
griehsler pushed a commit to griehsler/Marlin that referenced this pull request Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants