Skip to content

Commit

Permalink
Revert "G60/G61 Position Save/Restore (MarlinFirmware#16557)"
Browse files Browse the repository at this point in the history
This reverts commit e2eef12.
  • Loading branch information
stockcube committed Jan 27, 2020
1 parent 43915c0 commit 74f967c
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 183 deletions.
5 changes: 0 additions & 5 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1576,11 +1576,6 @@

// @section extras

//
// G60/G61 Position Save and Return
//
//#define SAVED_POSITIONS 1 // Each saved position slot costs 12 bytes

//
// G2/G3 Arc Support
//
Expand Down
10 changes: 6 additions & 4 deletions Marlin/src/HAL/HAL_STM32/timers.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@

#define HAL_TIMER_RATE (F_CPU / 2) // frequency of timer peripherals

// STM32F401 only has timers 1-5 & 9-11 with timers 4 & 5 usually assigned to TIMER_SERVO and TIMER_TONE

#ifndef STEP_TIMER
#define STEP_TIMER 9
#endif
Expand All @@ -74,19 +76,19 @@
#define HAL_TIMER_RATE (F_CPU / 2) // frequency of timer peripherals

#ifndef STEP_TIMER
#define STEP_TIMER 6 // STM32F401 has no TIM6, TIM7, or TIM8
#define STEP_TIMER 6
#endif

#ifndef TEMP_TIMER
#define TEMP_TIMER 14 // TIM7 is consumed by Software Serial if used.
#define TEMP_TIMER 14
#endif

#elif defined(STM32F7xx)

#define HAL_TIMER_RATE (F_CPU / 2) // frequency of timer peripherals
#define HAL_TIMER_RATE (F_CPU/2) // frequency of timer peripherals

#ifndef STEP_TIMER
#define STEP_TIMER 6 // the RIGHT timer!
#define STEP_TIMER 6
#endif

#ifndef TEMP_TIMER
Expand Down
4 changes: 0 additions & 4 deletions Marlin/src/core/language.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,6 @@
#define MSG_SOFT_MIN " Min: "
#define MSG_SOFT_MAX " Max: "

#define MSG_SAVED_POS "Position saved"
#define MSG_RESTORING_POS "Restoring position"
#define MSG_INVALID_POS_SLOT "Invalid slot. Total: "

#define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir "
#define MSG_SD_INIT_FAIL "SD init fail"
#define MSG_SD_VOL_INIT_FAIL "volume.init failed"
Expand Down
59 changes: 0 additions & 59 deletions Marlin/src/gcode/feature/pause/G60.cpp

This file was deleted.

71 changes: 0 additions & 71 deletions Marlin/src/gcode/feature/pause/G61.cpp

This file was deleted.

22 changes: 7 additions & 15 deletions Marlin/src/gcode/gcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,27 +314,19 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
#endif

#if ENABLED(CNC_COORDINATE_SYSTEMS)
case 53: G53(); break; // G53: (prefix) Apply native workspace
case 54: G54(); break; // G54: Switch to Workspace 1
case 55: G55(); break; // G55: Switch to Workspace 2
case 56: G56(); break; // G56: Switch to Workspace 3
case 57: G57(); break; // G57: Switch to Workspace 4
case 58: G58(); break; // G58: Switch to Workspace 5
case 59: G59(); break; // G59.0 - G59.3: Switch to Workspace 6-9
#endif

#if SAVED_POSITIONS
case 60: G60(); break; // G60: save current position
case 61: G61(); break; // G61: Apply/restore saved coordinates.
case 53: G53(); break;
case 54: G54(); break;
case 55: G55(); break;
case 56: G56(); break;
case 57: G57(); break;
case 58: G58(); break;
case 59: G59(); break;
#endif

#if ENABLED(PROBE_TEMP_COMPENSATION)
case 76: G76(); break; // G76: Calibrate first layer compensation values
#endif

case 60: G60(); break; // G60: save current position
case 61: G61(); break; // G61: Apply/restore saved coordinates.

#if ENABLED(GCODE_MOTION_MODES)
case 80: G80(); break; // G80: Reset the current motion mode
#endif
Expand Down
7 changes: 0 additions & 7 deletions Marlin/src/gcode/gcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@
* G34 - Z Stepper automatic alignment using probe: I<iterations> T<accuracy> A<amplification> (Requires Z_STEPPER_AUTO_ALIGN)
* G38 - Probe in any direction using the Z_MIN_PROBE (Requires G38_PROBE_TARGET)
* G42 - Coordinated move to a mesh point (Requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BLINEAR, or AUTO_BED_LEVELING_UBL)
* G60 - Save current position. (Requires SAVED_POSITIONS)
* G61 - Apply/restore saved coordinates. (Requires SAVED_POSITIONS)
* G76 - Calibrate first layer temperature offsets. (Requires PROBE_TEMP_COMPENSATION)
* G80 - Cancel current motion mode (Requires GCODE_MOTION_MODES)
* G90 - Use Absolute Coordinates
Expand Down Expand Up @@ -473,11 +471,6 @@ class GcodeSuite {
static void G76();
#endif

#if SAVED_POSITIONS
static void G60();
static void G61();
#endif

#if ENABLED(GCODE_MOTION_MODES)
static void G80();
#endif
Expand Down
5 changes: 0 additions & 5 deletions Marlin/src/inc/Conditionals_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,3 @@
#if ENABLED(JOYSTICK)
#define POLL_JOG
#endif

// G60/G61 Position Save
#if SAVED_POSITIONS > 256
#error "SAVED_POSITIONS must be an integer from 0 to 256."
#endif
8 changes: 1 addition & 7 deletions Marlin/src/module/motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,9 @@ xyze_pos_t current_position = { X_HOME_POS, Y_HOME_POS, Z_HOME_POS };
*/
xyze_pos_t destination; // {0}

// G60/G61 Position Save and Return
#if SAVED_POSITIONS
uint8_t saved_slots;
xyz_pos_t stored_position[SAVED_POSITIONS];
#endif

// The active extruder (tool). Set with T<extruder> command.
#if EXTRUDERS > 1
uint8_t active_extruder = 0; // = 0
uint8_t active_extruder; // = 0
#endif

#if ENABLED(LCD_SHOW_E_TOTAL)
Expand Down
6 changes: 0 additions & 6 deletions Marlin/src/module/motion.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@ extern bool relative_mode;
extern xyze_pos_t current_position, // High-level current tool position
destination; // Destination for a move

// G60/G61 Position Save and Return
#if SAVED_POSITIONS
extern uint8_t saved_slots;
extern xyz_pos_t stored_position[SAVED_POSITIONS];
#endif

// Scratch space for a cartesian result
extern xyz_pos_t cartes;

Expand Down

0 comments on commit 74f967c

Please sign in to comment.