-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
Encapsulate Stepper, Planner, Endstops in singleton classes #3631
Conversation
a2f8103
to
96093a1
Compare
Travis CI has been showing me the symbols I missed and I've been patching them up. But I have been called away so I will have to pick this up later! |
1d8e07f
to
b38903d
Compare
How can I coax the compiler into inlining the |
b356346
to
6e5963c
Compare
This finally passes all the checks in I have a As usual, please look hard for any accidental typos or logical errors. |
#if HAS_DIGIPOTSS | ||
|
||
// From Arduino DigitalPotControl example | ||
void digitalPotWrite(int address, int value) { | ||
Stepper::void digitalPotWrite(int address, int value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is void Stepper::digitalPotWrite(int address, int value) {
right? (same comment in PR #3643)
535ad78
to
a59d25d
Compare
Follow-up the PR #3631(Encapsulate Stepper, ...
Additional follow-up the PR #3631(Encapsulate S...
* RCBugFix: (251 commits) Fix for PR MarlinFirmware#3526(Configuration.h LCD & SDCard s... Additional follow-up the PR MarlinFirmware#3631(Encapsulate S... Cleanup, debug strings in Planner::adjusted_position Fix BABYSTEPPING, add it to Travis test 8.3-filenames second try Revisited German translation Follow-up the PR MarlinFirmware#3631(Encapsulate Stepper, ... Some clean-up for example configuration files Revert PR 3648 to fix SD printing Include more fans in sensitive pins list Use #undef in AZTEEG_X3_PRO for RAMPS overrides NOOP macro for do-nothing macros Updated comment for THERMAL_PROTECTION_BED Introduce temp watch protection for the bed Updated version header gen script Encapsulate dual Z endstop handling A little extra gcode_T spacing Planner singleton class Localize M119 in Endstops class Stepper and Endstops as singleton objects ... # Conflicts: # Marlin/Configuration.h # Marlin/Configuration_adv.h # README.md
Follow-up the PR MarlinFirmware#3631(Encapsulate Stepper, Planner, Endstops in singleton classes) plan_bed_level_matrix -> planner.bed_level_matrix in multi extruders section of Marlin_main.cpp It probably fix the Issue MarlinFirmware#3658(plan_bed_level_matrix not declarate). movesplanned() -> planner.movesplanned() in ADVANCED_OK section of Marlin_main.cpp It fix compilation error when ADVANCED_OK is enabled
Additional follow-up the PR MarlinFirmware#3631(Encapsulate Stepper, Planner, Endstops in singleton classes) ・Change from abort_on_endstop_hit to stepper.abort_on_endstop_hit in endstop.cpp, Marlin_main.cpp, and ultralcd.cpp ・Add include path to cardreader.h and temperature.h in endstop.cpp(for CardReader class and disable_all_heaters()) It fix compilation error when ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED and SDSUPPORT are enabled. ・Change from digipot_current() to stepper.digipot_current() in Marlin_main.cpp ・Change from digitalPotWrite() to stepper.digitalPotWrite() in Marlin_main.cpp It fix compilation errors when HAS_DIGIPOTSS is enabled. ・Change from microstep_mode() to stepper.microstep_mode() in Marlin_main.cpp ・Change attribute of microstep_mode() from private to public in stepper.h ・Change from microstep_readings() to stepper.microstep_readings() in Marlin_main.cpp ・Change from microstep_ms() to stepper.microstep_ms() in Marlin_main. It fix compilation errors when HAS_MICROSTEPS is enabled.
…i/Marlin into configurations/KosselXL * 'configurations/KosselXL' of https://github.com/nomukaiki/Marlin: (254 commits) Working version with Endstops New settings Fix for PR MarlinFirmware#3526(Configuration.h LCD & SDCard s... Additional follow-up the PR MarlinFirmware#3631(Encapsulate S... Cleanup, debug strings in Planner::adjusted_position Fix BABYSTEPPING, add it to Travis test 8.3-filenames second try Revisited German translation Follow-up the PR MarlinFirmware#3631(Encapsulate Stepper, ... Some clean-up for example configuration files Revert PR 3648 to fix SD printing Settings with BLTouch Include more fans in sensitive pins list Use #undef in AZTEEG_X3_PRO for RAMPS overrides NOOP macro for do-nothing macros Updated comment for THERMAL_PROTECTION_BED Introduce temp watch protection for the bed Updated version header gen script Encapsulate dual Z endstop handling A little extra gcode_T spacing ...
Follow-up the PR MarlinFirmware#3631(Encapsulate Stepper, Planner, Endstops in singleton classes) plan_bed_level_matrix -> planner.bed_level_matrix in multi extruders section of Marlin_main.cpp It probably fix the Issue MarlinFirmware#3658(plan_bed_level_matrix not declarate). movesplanned() -> planner.movesplanned() in ADVANCED_OK section of Marlin_main.cpp It fix compilation error when ADVANCED_OK is enabled
Additional follow-up the PR MarlinFirmware#3631(Encapsulate Stepper, Planner, Endstops in singleton classes) ・Change from abort_on_endstop_hit to stepper.abort_on_endstop_hit in endstop.cpp, Marlin_main.cpp, and ultralcd.cpp ・Add include path to cardreader.h and temperature.h in endstop.cpp(for CardReader class and disable_all_heaters()) It fix compilation error when ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED and SDSUPPORT are enabled. ・Change from digipot_current() to stepper.digipot_current() in Marlin_main.cpp ・Change from digitalPotWrite() to stepper.digitalPotWrite() in Marlin_main.cpp It fix compilation errors when HAS_DIGIPOTSS is enabled. ・Change from microstep_mode() to stepper.microstep_mode() in Marlin_main.cpp ・Change attribute of microstep_mode() from private to public in stepper.h ・Change from microstep_readings() to stepper.microstep_readings() in Marlin_main.cpp ・Change from microstep_ms() to stepper.microstep_ms() in Marlin_main. It fix compilation errors when HAS_MICROSTEPS is enabled.
#3631 broke z dual endstops. Solved by @Nocturnal42 in #5078 (comment)
* configurations/KosselXL: (265 commits) New PID and Z pos Latest settings for nozzle V6 Delta segments per second Decreased delta segments Working version with Endstops New settings Fix for PR MarlinFirmware#3526(Configuration.h LCD & SDCard s... Additional follow-up the PR MarlinFirmware#3631(Encapsulate S... Cleanup, debug strings in Planner::adjusted_position Fix BABYSTEPPING, add it to Travis test 8.3-filenames second try Revisited German translation Follow-up the PR MarlinFirmware#3631(Encapsulate Stepper, ... Some clean-up for example configuration files Revert PR 3648 to fix SD printing Settings with BLTouch Include more fans in sensitive pins list Use #undef in AZTEEG_X3_PRO for RAMPS overrides NOOP macro for do-nothing macros Updated comment for THERMAL_PROTECTION_BED ... # Conflicts: # Marlin/Configuration.h # Marlin/Configuration_adv.h # Marlin/pins_RAMPS.h # Marlin/ultralcd.h
…_documentation_part1 MK3 fix eeprom doxygen documentation
Improving the semantics of the codebase with singletons.
This PR leaves the code "intact", but:
Stepper
.Stepper
namedstepper
.Endstops
.Endstops
namedendstops
.Planner
.Planner
namedplanner
.st_
andplan_
prefixes from the method names.stepper.
,planner.
, andendstops.
objects.Compiles with various options, but we'll see how Travis likes it. The first time I installed this on my machine it just worked. Not too surprising, as this is almost entirely a stylistic change.
It should be noted that a bug is fixed here also in the process:
dock_sled
was disabling the probe when undocked, and enabling it when docked. That is now reversed. I may patch that separately.