mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-27 13:56:24 +00:00
Fix G60/G61 slots > 8 and compile error (#16715)
This commit is contained in:
parent
e6a675e6ec
commit
99b6a132bc
@ -45,7 +45,7 @@ void GcodeSuite::G60() {
|
||||
}
|
||||
|
||||
stored_position[slot] = current_position;
|
||||
SBI(saved_slots, slot);
|
||||
SBI(saved_slots[slot >> 3], slot & 0b00000111);
|
||||
|
||||
#if ENABLED(SAVED_POSITIONS_DEBUG)
|
||||
const xyze_pos_t &pos = stored_position[slot];
|
||||
|
@ -25,7 +25,7 @@
|
||||
#if SAVED_POSITIONS
|
||||
|
||||
#include "../../../core/language.h"
|
||||
#include "../../module/planner.h"
|
||||
#include "../../../module/planner.h"
|
||||
#include "../../gcode.h"
|
||||
#include "../../../module/motion.h"
|
||||
|
||||
@ -48,7 +48,7 @@ void GcodeSuite::G61(void) {
|
||||
#endif
|
||||
|
||||
// No saved position? No axes being restored?
|
||||
if (!TEST(saved_slots, slot) || !parser.seen("XYZ")) return;
|
||||
if (!TEST(saved_slots[slot >> 3], slot & 0b00000111) || !parser.seen("XYZ")) return;
|
||||
|
||||
// Apply any given feedrate over 0.0
|
||||
const float fr = parser.linearval('F');
|
||||
|
@ -111,7 +111,7 @@ xyze_pos_t destination; // {0}
|
||||
|
||||
// G60/G61 Position Save and Return
|
||||
#if SAVED_POSITIONS
|
||||
uint8_t saved_slots;
|
||||
uint8_t saved_slots[(SAVED_POSITIONS + 7) >> 3];
|
||||
xyz_pos_t stored_position[SAVED_POSITIONS];
|
||||
#endif
|
||||
|
||||
|
@ -67,7 +67,7 @@ extern xyze_pos_t current_position, // High-level current tool position
|
||||
|
||||
// G60/G61 Position Save and Return
|
||||
#if SAVED_POSITIONS
|
||||
extern uint8_t saved_slots;
|
||||
extern uint8_t saved_slots[(SAVED_POSITIONS + 7) >> 3];
|
||||
extern xyz_pos_t stored_position[SAVED_POSITIONS];
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user