Merge pull request #10479 from thinkyhead/bf2_creality_power_loss_resume

[2.0.x] Creality3D Power-Loss Recovery
This commit is contained in:
Scott Lahteine
2018-04-22 00:17:44 -05:00
committed by GitHub
64 changed files with 1031 additions and 43 deletions

View File

@ -152,7 +152,9 @@
* None Home to all axes with no parameters.
* With QUICK_HOME enabled XY will home together, then Z.
*
* Cartesian parameters
* Rn Raise by n mm/inches before homing
*
* Cartesian/SCARA parameters
*
* X Home to the X endstop
* Y Home to the Y endstop
@ -226,12 +228,13 @@ void GcodeSuite::G28(const bool always_home_all) {
#endif
#if ENABLED(UNKNOWN_Z_NO_RAISE)
const float z_homing_height = axis_known_position[Z_AXIS] ? Z_HOMING_HEIGHT : 0;
#else
constexpr float z_homing_height = Z_HOMING_HEIGHT;
#endif
const float z_homing_height = (
#if ENABLED(UNKNOWN_Z_NO_RAISE)
!axis_known_position[Z_AXIS] ? 0 :
#endif
(parser.seenval('R') ? parser.value_linear_units() : Z_HOMING_HEIGHT)
);
if (z_homing_height && (home_all || homeX || homeY)) {
// Raise Z before homing any other axes and z is not already high enough (never lower z)
destination[Z_AXIS] = z_homing_height;

View File

@ -25,6 +25,7 @@
#if ENABLED(M100_FREE_MEMORY_WATCHER)
#include "../gcode.h"
#include "../queue.h"
#include "../../libs/hex_print_routines.h"
#include "../../Marlin.h" // for idle()
@ -59,8 +60,6 @@
#define TEST_BYTE ((char) 0xE5)
extern char command_queue[BUFSIZE][MAX_CMD_SIZE];
extern char* __brkval;
extern size_t __heap_start, __heap_end, __flp;
extern char __bss_end;