Skip to content

Commit

Permalink
Anycubic Chiron full feature support (MarlinFirmware#19505)
Browse files Browse the repository at this point in the history
  • Loading branch information
SwiftNick authored and vgadreau committed Dec 9, 2020
1 parent b8429b2 commit 5b4fde4
Show file tree
Hide file tree
Showing 16 changed files with 1,735 additions and 573 deletions.
1 change: 1 addition & 0 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,7 @@
#if ENABLED(POWER_LOSS_RECOVERY)
#define PLR_ENABLED_DEFAULT false // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500)
//#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power loss
//#define POWER_LOSS_RECOVER_ZHOME // Z homing is needed for proper recovery. 99.9% of the time this should be disabled!
//#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss. Set to -1 to disable default pin on boards without module.
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/AVR/pinsDebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS

#if MB(BQ_ZUM_MEGA_3D, MIGHTYBOARD_REVE, MINIRAMBO, SCOOVO_X9H)
#if MB(BQ_ZUM_MEGA_3D, MIGHTYBOARD_REVE, MINIRAMBO, SCOOVO_X9H, TRIGORILLA_14)
#define AVR_ATmega2560_FAMILY_PLUS_70 1
#endif

Expand Down
9 changes: 3 additions & 6 deletions Marlin/src/HAL/AVR/pinsDebug_plus_70.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,12 @@
* Structures for 2560 family boards that use more than 70 pins
*/

#undef NUM_DIGITAL_PINS
#if MB(BQ_ZUM_MEGA_3D)
#if MB(BQ_ZUM_MEGA_3D, MINIRAMBO, SCOOVO_X9H, TRIGORILLA_14)
#undef NUM_DIGITAL_PINS
#define NUM_DIGITAL_PINS 85
#elif MB(MIGHTYBOARD_REVE)
#undef NUM_DIGITAL_PINS
#define NUM_DIGITAL_PINS 80
#elif MB(MINIRAMBO)
#define NUM_DIGITAL_PINS 85
#elif MB(SCOOVO_X9H)
#define NUM_DIGITAL_PINS 85
#endif

#define PA 1
Expand Down
12 changes: 10 additions & 2 deletions Marlin/src/feature/powerloss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,22 @@ void PrintJobRecovery::resume() {

gcode.process_subcommands_now_P(PSTR(
"G28R0" // No raise during G28
TERN_(IS_CARTESIAN, "XY") // Don't home Z on Cartesian
#if IS_CARTESIAN && DISABLED(POWER_LOSS_RECOVER_ZHOME)
"XY" // Don't home Z on Cartesian unless overridden
#endif
));

#endif

// Pretend that all axes are homed
set_all_homed();

#if ENABLED(POWER_LOSS_RECOVER_ZHOME)
// Z has been homed so restore Z to ZsavedPos + POWER_LOSS_ZRAISE
sprintf_P(cmd, PSTR("G1 F500 Z%s"), dtostrf(info.current_position.z + POWER_LOSS_ZRAISE, 1, 3, str_1));
gcode.process_subcommands_now(cmd);
#endif

// Recover volumetric extrusion state
#if DISABLED(NO_VOLUMETRICS)
#if HAS_MULTI_EXTRUDER
Expand Down Expand Up @@ -481,7 +489,7 @@ void PrintJobRecovery::resume() {

// Move back to the saved Z
dtostrf(info.current_position.z, 1, 3, str_1);
#if Z_HOME_DIR > 0
#if Z_HOME_DIR > 0 || ENABLED(POWER_LOSS_RECOVER_ZHOME)
sprintf_P(cmd, PSTR("G1 Z%s F200"), str_1);
#else
gcode.process_subcommands_now_P(PSTR("G1 Z0 F200"));
Expand Down
Loading

0 comments on commit 5b4fde4

Please sign in to comment.