1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-08-30 01:30:05 +02:00

ABC Bresenham counter init fix

This commit is contained in:
bdring
2020-11-22 16:50:01 -06:00
parent 42c37bbfe8
commit 6d2c609ad3
2 changed files with 13 additions and 15 deletions

View File

@@ -23,7 +23,7 @@
// Grbl versioning system // Grbl versioning system
const char* const GRBL_VERSION = "1.3a"; const char* const GRBL_VERSION = "1.3a";
const char* const GRBL_VERSION_BUILD = "20201121"; const char* const GRBL_VERSION_BUILD = "20201122";
//#include <sdkconfig.h> //#include <sdkconfig.h>
#include <Arduino.h> #include <Arduino.h>

View File

@@ -245,11 +245,9 @@ static void stepper_pulse_func() {
st.exec_block_index = st.exec_segment->st_block_index; st.exec_block_index = st.exec_segment->st_block_index;
st.exec_block = &st_block_buffer[st.exec_block_index]; st.exec_block = &st_block_buffer[st.exec_block_index];
// Initialize Bresenham line and distance counters // Initialize Bresenham line and distance counters
// XXX the original code only inits X, Y, Z here, instead of n_axis. Is that correct? for (int axis = 0; axis < n_axis; axis++) {
for (int axis = 0; axis < 3; axis++) {
st.counter[axis] = (st.exec_block->step_event_count >> 1); st.counter[axis] = (st.exec_block->step_event_count >> 1);
} }
// TODO ABC
} }
st.dir_outbits = st.exec_block->direction_bits; st.dir_outbits = st.exec_block->direction_bits;
// Adjust Bresenham axis increment counters according to AMASS level. // Adjust Bresenham axis increment counters according to AMASS level.