Apply esenapaj 3479 and delta/scara position bugfix
This commit is contained in:
parent
525d8256d4
commit
a781a6f955
@ -485,6 +485,20 @@ void serial_echopair_P(const char* s_P, unsigned long v) { serialprintPGM(s_P);
|
|||||||
|
|
||||||
void gcode_M114();
|
void gcode_M114();
|
||||||
|
|
||||||
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
|
void print_xyz(const char* prefix, const float x, const float y, const float z) {
|
||||||
|
SERIAL_ECHO(prefix);
|
||||||
|
SERIAL_ECHOPAIR(": (", x);
|
||||||
|
SERIAL_ECHOPAIR(", ", y);
|
||||||
|
SERIAL_ECHOPAIR(", ", z);
|
||||||
|
SERIAL_ECHOLNPGM(")");
|
||||||
|
}
|
||||||
|
void print_xyz(const char* prefix, const float xyz[]) {
|
||||||
|
print_xyz(prefix, xyz[X_AXIS], xyz[Y_AXIS], xyz[Z_AXIS]);
|
||||||
|
}
|
||||||
|
#define DEBUG_POS(PREFIX,VAR) do{ SERIAL_ECHOPGM(PREFIX); print_xyz(" > " STRINGIFY(VAR), VAR); }while(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(DELTA) || ENABLED(SCARA)
|
#if ENABLED(DELTA) || ENABLED(SCARA)
|
||||||
inline void sync_plan_position_delta() {
|
inline void sync_plan_position_delta() {
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
@ -715,11 +729,6 @@ void servo_init() {
|
|||||||
*/
|
*/
|
||||||
void setup() {
|
void setup() {
|
||||||
|
|
||||||
#if ENABLED(DELTA) || ENABLED(SCARA)
|
|
||||||
// Vital to init kinematic equivalent for X0 Y0 Z0
|
|
||||||
sync_plan_position_delta();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DISABLE_JTAG
|
#ifdef DISABLE_JTAG
|
||||||
// Disable JTAG on AT90USB chips to free up pins for IO
|
// Disable JTAG on AT90USB chips to free up pins for IO
|
||||||
MCUCR = 0x80;
|
MCUCR = 0x80;
|
||||||
@ -779,6 +788,11 @@ void setup() {
|
|||||||
tp_init(); // Initialize temperature loop
|
tp_init(); // Initialize temperature loop
|
||||||
plan_init(); // Initialize planner;
|
plan_init(); // Initialize planner;
|
||||||
|
|
||||||
|
#if ENABLED(DELTA) || ENABLED(SCARA)
|
||||||
|
// Vital to init kinematic equivalent for X0 Y0 Z0
|
||||||
|
sync_plan_position_delta();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(USE_WATCHDOG)
|
#if ENABLED(USE_WATCHDOG)
|
||||||
watchdog_init();
|
watchdog_init();
|
||||||
#endif
|
#endif
|
||||||
@ -1176,20 +1190,6 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
|
|||||||
|
|
||||||
#endif //DUAL_X_CARRIAGE
|
#endif //DUAL_X_CARRIAGE
|
||||||
|
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
||||||
void print_xyz(const char* prefix, const float x, const float y, const float z) {
|
|
||||||
SERIAL_ECHO(prefix);
|
|
||||||
SERIAL_ECHOPAIR(": (", x);
|
|
||||||
SERIAL_ECHOPAIR(", ", y);
|
|
||||||
SERIAL_ECHOPAIR(", ", z);
|
|
||||||
SERIAL_ECHOLNPGM(")");
|
|
||||||
}
|
|
||||||
void print_xyz(const char* prefix, const float xyz[]) {
|
|
||||||
print_xyz(prefix, xyz[X_AXIS], xyz[Y_AXIS], xyz[Z_AXIS]);
|
|
||||||
}
|
|
||||||
#define DEBUG_POS(PREFIX,VAR) do{ SERIAL_ECHOPGM(PREFIX); print_xyz(" > " STRINGIFY(VAR), VAR); }while(0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void set_axis_is_at_home(AxisEnum axis) {
|
static void set_axis_is_at_home(AxisEnum axis) {
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
if (DEBUGGING(LEVELING)) {
|
if (DEBUGGING(LEVELING)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user