kopia lustrzana https://github.com/Schildkroet/GRBL-Advanced
Small bugfixes and changes
rodzic
a582356f58
commit
e74b5ccacd
|
@ -21,9 +21,9 @@
|
|||
<Cursor1 position="1639" topLine="32" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="grbl\Config.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="grbl\Config.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="8686" topLine="135" />
|
||||
<Cursor1 position="39003" topLine="548" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="grbl\CoolantControl.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
|
@ -38,7 +38,7 @@
|
|||
</File>
|
||||
<File name="grbl\defaults.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2491" topLine="30" />
|
||||
<Cursor1 position="2407" topLine="29" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="grbl\GCode.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
|
@ -76,7 +76,7 @@
|
|||
<Cursor1 position="858" topLine="15" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="grbl\MotionControl.c" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="grbl\MotionControl.c" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1311" topLine="18" />
|
||||
</Cursor>
|
||||
|
@ -108,7 +108,7 @@
|
|||
</File>
|
||||
<File name="grbl\Protocol.c" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4480" topLine="105" />
|
||||
<Cursor1 position="3983" topLine="84" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="grbl\Protocol.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
|
@ -116,14 +116,14 @@
|
|||
<Cursor1 position="842" topLine="3" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="grbl\Report.c" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="grbl\Report.c" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7133" topLine="223" />
|
||||
<Cursor1 position="7135" topLine="235" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="grbl\Report.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="grbl\Report.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1255" topLine="9" />
|
||||
<Cursor1 position="1483" topLine="9" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="grbl\Settings.c" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
|
@ -138,7 +138,7 @@
|
|||
</File>
|
||||
<File name="grbl\SpindleControl.c" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2495" topLine="41" />
|
||||
<Cursor1 position="2119" topLine="23" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="grbl\SpindleControl.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
|
@ -146,9 +146,9 @@
|
|||
<Cursor1 position="1411" topLine="12" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="grbl\Stepper.c" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="grbl\Stepper.c" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="46208" topLine="1051" />
|
||||
<Cursor1 position="46208" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="grbl\Stepper.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
|
@ -208,7 +208,7 @@
|
|||
</File>
|
||||
<File name="HAL\SPI\SPI.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="279" topLine="0" />
|
||||
<Cursor1 position="638" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="HAL\STM32\startup_stm32f4xx.S" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
|
@ -286,9 +286,9 @@
|
|||
<Cursor1 position="781" topLine="12" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="main.c" open="1" top="1" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="main.c" open="1" top="1" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2755" topLine="52" />
|
||||
<Cursor1 position="1035" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="SPL\inc\stm32f4xx_cryp.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#define CONFIG_H
|
||||
|
||||
|
||||
#define GRBL_VERSION "0.1"
|
||||
#define GRBL_VERSION "1.1"
|
||||
#define GRBL_VERSION_BUILD __DATE__
|
||||
|
||||
|
||||
|
@ -305,7 +305,7 @@
|
|||
// step rate is strictly limited by the CPU speed and will change if something other than an AVR running
|
||||
// at 16MHz is used.
|
||||
// NOTE: For now disabled, will enable if flash space permits.
|
||||
#define MAX_STEP_RATE_HZ 50000 // Hz
|
||||
#define MAX_STEP_RATE_HZ 80000 // Hz
|
||||
|
||||
|
||||
// By default, Grbl sets all input pins to normal-high operation with their internal pull-up resistors
|
||||
|
|
10
grbl/GCode.c
10
grbl/GCode.c
|
@ -128,10 +128,10 @@ uint8_t GC_ExecuteLine(char *line)
|
|||
perform initial error-checks for command word modal group violations, for any repeated
|
||||
words, and for negative values set for the value words F, N, P, T, and S. */
|
||||
|
||||
uint8_t word_bit; // Bit-value for assigning tracking variables
|
||||
uint8_t char_counter;
|
||||
char letter;
|
||||
float value;
|
||||
uint8_t word_bit = 0; // Bit-value for assigning tracking variables
|
||||
uint8_t char_counter = 0;
|
||||
char letter = 0;
|
||||
float value = 0.0;
|
||||
uint8_t int_value = 0;
|
||||
uint16_t mantissa = 0;
|
||||
float old_xyz[N_AXIS] = {0.0};
|
||||
|
@ -1497,7 +1497,7 @@ uint8_t GC_ExecuteLine(char *line)
|
|||
// [17. Set distance mode ]:
|
||||
gc_state.modal.distance = gc_block.modal.distance;
|
||||
|
||||
// [18. Set retract mode ]: NOT SUPPORTED
|
||||
// [18. Set retract mode ]:
|
||||
gc_state.modal.retract = gc_block.modal.retract;
|
||||
|
||||
// [19. Go to predefined position, Set G10, or Set axis offsets ]:
|
||||
|
|
|
@ -232,7 +232,7 @@ void Limits_GoHome(uint8_t cycle_mask)
|
|||
if(axislock & step_pin[idx]) {
|
||||
if(limit_state & (1 << idx)) {
|
||||
#ifdef COREXY
|
||||
if(idx==Z_AXIS) {
|
||||
if(idx == Z_AXIS) {
|
||||
axislock &= ~(step_pin[Z_AXIS]);
|
||||
}
|
||||
else {
|
||||
|
@ -345,6 +345,10 @@ void Limits_GoHome(uint8_t cycle_mask)
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
// Necessary for backlash compensation
|
||||
MC_Init();
|
||||
|
||||
sys.step_control = STEP_CONTROL_NORMAL_OP; // Return step control to normal operation.
|
||||
}
|
||||
|
||||
|
|
|
@ -35,20 +35,27 @@
|
|||
#include "defaults.h"
|
||||
|
||||
|
||||
#define DIR_POSITIV 0
|
||||
#define DIR_NEGATIV 1
|
||||
|
||||
|
||||
static float target_prev[N_AXIS] = {0.0};
|
||||
static uint8_t dir_negative[N_AXIS] = {0};
|
||||
static uint8_t dir_negative[N_AXIS] = {DIR_NEGATIV};
|
||||
|
||||
|
||||
void MC_Init(void)
|
||||
{
|
||||
int32_t current_position[N_AXIS]; // Copy current state of the system position variable
|
||||
int32_t current_position[N_AXIS] = {0};
|
||||
|
||||
for(uint8_t i = 0; i < N_AXIS; i++)
|
||||
{
|
||||
dir_negative[i] = 0;
|
||||
dir_negative[i] = DIR_NEGATIV ^ (settings.homing_dir_mask & (1<<i));
|
||||
}
|
||||
|
||||
// Copy current state of the system position variable
|
||||
memcpy(current_position, sys_position, sizeof(sys_position));
|
||||
|
||||
// Update target_prev
|
||||
System_ConvertArraySteps2Mpos(target_prev, current_position);
|
||||
}
|
||||
|
||||
|
@ -130,9 +137,9 @@ void MC_Line(float *target, Planner_LineData_t *pl_data)
|
|||
if(target[i] > target_prev[i])
|
||||
{
|
||||
// Last move negative?
|
||||
if(dir_negative[i] == 1)
|
||||
if(dir_negative[i] == DIR_NEGATIV)
|
||||
{
|
||||
dir_negative[i] = 0;
|
||||
dir_negative[i] = DIR_POSITIV;
|
||||
target_prev[i] += settings.backlash[i];
|
||||
|
||||
backlash_update = 1;
|
||||
|
@ -142,9 +149,9 @@ void MC_Line(float *target, Planner_LineData_t *pl_data)
|
|||
else if(target[i] < target_prev[i])
|
||||
{
|
||||
// Last move positive?
|
||||
if(dir_negative[i] == 0)
|
||||
if(dir_negative[i] == DIR_POSITIV)
|
||||
{
|
||||
dir_negative[i] = 1;
|
||||
dir_negative[i] = DIR_NEGATIV;
|
||||
target_prev[i] -= settings.backlash[i];
|
||||
|
||||
backlash_update = 1;
|
||||
|
|
|
@ -481,9 +481,9 @@ void Report_BuildInfo(char *line)
|
|||
Printf("[OPT:"); // Generate compile-time build option list
|
||||
Putc('V');
|
||||
|
||||
#ifdef USE_LINE_NUMBERS
|
||||
//#ifdef USE_LINE_NUMBERS
|
||||
Putc('N');
|
||||
#endif
|
||||
//#endif
|
||||
#ifdef ENABLE_M7
|
||||
Putc('M');
|
||||
#endif
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
#ifdef MAX_STEP_RATE_HZ
|
||||
#define STEP_TIMER_MIN (uint16_t)(F_TIMER_STEPPER / MAX_STEP_RATE_HZ)
|
||||
#else
|
||||
#define STEP_TIMER_MIN (uint16_t)(50000)
|
||||
#define STEP_TIMER_MIN (uint16_t)((F_TIMER_STEPPER / 60000))
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -33,17 +33,17 @@
|
|||
#define DEFAULT_X_STEPS_PER_MM 400.0
|
||||
#define DEFAULT_Y_STEPS_PER_MM 400.0
|
||||
#define DEFAULT_Z_STEPS_PER_MM 400.0
|
||||
#define DEFAULT_X_MAX_RATE 2000.0 // mm/min
|
||||
#define DEFAULT_Y_MAX_RATE 2000.0 // mm/min
|
||||
#define DEFAULT_Z_MAX_RATE 2000.0 // mm/min
|
||||
#define DEFAULT_X_MAX_RATE 1000.0 // mm/min
|
||||
#define DEFAULT_Y_MAX_RATE 1000.0 // mm/min
|
||||
#define DEFAULT_Z_MAX_RATE 1000.0 // mm/min
|
||||
#define DEFAULT_X_ACCELERATION (30.0*60*60) // 30*60*60 mm/min^2 = 30 mm/sec^2
|
||||
#define DEFAULT_Y_ACCELERATION (30.0*60*60) // 30*60*60 mm/min^2 = 30 mm/sec^2
|
||||
#define DEFAULT_Z_ACCELERATION (30.0*60*60) // 30*60*60 mm/min^2 = 30 mm/sec^2
|
||||
#define DEFAULT_X_MAX_TRAVEL 600.0 // mm NOTE: Must be a positive value.
|
||||
#define DEFAULT_Y_MAX_TRAVEL 400.0 // mm NOTE: Must be a positive value.
|
||||
#define DEFAULT_Z_MAX_TRAVEL 600.0 // mm NOTE: Must be a positive value.
|
||||
#define DEFAULT_SPINDLE_RPM_MAX 3000.0 // rpm
|
||||
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
||||
#define DEFAULT_X_MAX_TRAVEL 400.0 // mm NOTE: Must be a positive value.
|
||||
#define DEFAULT_Y_MAX_TRAVEL 300.0 // mm NOTE: Must be a positive value.
|
||||
#define DEFAULT_Z_MAX_TRAVEL 500.0 // mm NOTE: Must be a positive value.
|
||||
#define DEFAULT_SPINDLE_RPM_MAX 3000.0 // rpm
|
||||
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
||||
|
||||
#define DEFAULT_X_BACKLASH 0.01 // mm
|
||||
#define DEFAULT_Y_BACKLASH 0.01 // mm
|
||||
|
@ -51,7 +51,7 @@
|
|||
|
||||
#define DEFAULT_SYSTEM_INVERT_MASK 0
|
||||
#define DEFAULT_STEPPING_INVERT_MASK 0
|
||||
#define DEFAULT_DIRECTION_INVERT_MASK 4 // Invert Z-Axis
|
||||
#define DEFAULT_DIRECTION_INVERT_MASK 0
|
||||
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 50 // msec (0-254, 255 keeps steppers enabled)
|
||||
#define DEFAULT_STATUS_REPORT_MASK 1 // MPos enabled
|
||||
#define DEFAULT_JUNCTION_DEVIATION 0.01 // mm
|
||||
|
|
Ładowanie…
Reference in New Issue