Commit 1c48ec93 authored by MagoKimbra's avatar MagoKimbra

Fix filrunout

parent 02616fd5
...@@ -348,15 +348,15 @@ ...@@ -348,15 +348,15 @@
#define SERVO_LEVELING_DELAY (SERVO_LEVELING && PROBE_SERVO_DEACTIVATION_DELAY > 0) #define SERVO_LEVELING_DELAY (SERVO_LEVELING && PROBE_SERVO_DEACTIVATION_DELAY > 0)
/** /**
* MAX_STEP_FREQUENCY differs for TOSHIBA * MAX_STEP_FREQUENCY differs for TOSHIBA OR ARDUINO DUE OR ARDUINO MEGA
*/ */
#ifdef __SAM3X8E__ #ifdef __SAM3X8E__
#ifdef CONFIG_STEPPERS_TOSHIBA #ifdef CONFIG_STEPPERS_TOSHIBA
#define MAX_STEP_FREQUENCY 120000 // Max step frequency for Toshiba Stepper Controllers #define MAX_STEP_FREQUENCY 120000 // Max step frequency for Toshiba Stepper Controllers
#define DOUBLE_STEP_FREQUENCY MAX_STEP_FREQUENCY #define DOUBLE_STEP_FREQUENCY MAX_STEP_FREQUENCY
#else #else
#define MAX_STEP_FREQUENCY 480000 #define MAX_STEP_FREQUENCY 320000 // Max step frequency for the Due is approx. 330kHz
#define DOUBLE_STEP_FREQUENCY 120000 //96kHz is close to maximum for an Arduino Due #define DOUBLE_STEP_FREQUENCY 100000 //96kHz is close to maximum for an Arduino Due
#endif #endif
#else #else
#ifdef CONFIG_STEPPERS_TOSHIBA #ifdef CONFIG_STEPPERS_TOSHIBA
...@@ -513,7 +513,7 @@ ...@@ -513,7 +513,7 @@
#define HAS_SERVO_3 (PIN_EXISTS(SERVO3)) #define HAS_SERVO_3 (PIN_EXISTS(SERVO3))
#define HAS_FILAMENT_SENSOR (defined(FILAMENT_SENSOR) && PIN_EXISTS(FILWIDTH)) #define HAS_FILAMENT_SENSOR (defined(FILAMENT_SENSOR) && PIN_EXISTS(FILWIDTH))
#define HAS_POWER_CONSUMPTION_SENSOR (defined(POWER_CONSUMPTION) && PIN_EXISTS(POWER_CONSUMPTION)) #define HAS_POWER_CONSUMPTION_SENSOR (defined(POWER_CONSUMPTION) && PIN_EXISTS(POWER_CONSUMPTION))
#define HAS_FILRUNOUT (PIN_EXISTS(FILRUNOUT)) #define HAS_FILRUNOUT (defined(FILAMENT_RUNOUT_SENSOR) && PIN_EXISTS(FILRUNOUT))
#define HAS_HOME (PIN_EXISTS(HOME)) #define HAS_HOME (PIN_EXISTS(HOME))
#define HAS_KILL (PIN_EXISTS(KILL)) #define HAS_KILL (PIN_EXISTS(KILL))
#define HAS_SUICIDE (PIN_EXISTS(SUICIDE)) #define HAS_SUICIDE (PIN_EXISTS(SUICIDE))
......
...@@ -877,7 +877,7 @@ float junction_deviation = 0.1; ...@@ -877,7 +877,7 @@ float junction_deviation = 0.1;
xsteps = axis_steps_per_sqr_second[X_AXIS], xsteps = axis_steps_per_sqr_second[X_AXIS],
ysteps = axis_steps_per_sqr_second[Y_AXIS], ysteps = axis_steps_per_sqr_second[Y_AXIS],
zsteps = axis_steps_per_sqr_second[Z_AXIS], zsteps = axis_steps_per_sqr_second[Z_AXIS],
esteps = axis_steps_per_sqr_second[E_AXIS]; esteps = axis_steps_per_sqr_second[E_AXIS + active_extruder];
if ((float)acc_st * bsx / block->step_event_count > xsteps) acc_st = xsteps; if ((float)acc_st * bsx / block->step_event_count > xsteps) acc_st = xsteps;
if ((float)acc_st * bsy / block->step_event_count > ysteps) acc_st = ysteps; if ((float)acc_st * bsy / block->step_event_count > ysteps) acc_st = ysteps;
if ((float)acc_st * bsz / block->step_event_count > zsteps) acc_st = zsteps; if ((float)acc_st * bsz / block->step_event_count > zsteps) acc_st = zsteps;
...@@ -887,7 +887,7 @@ float junction_deviation = 0.1; ...@@ -887,7 +887,7 @@ float junction_deviation = 0.1;
block->acceleration = acc_st / steps_per_mm; block->acceleration = acc_st / steps_per_mm;
#ifdef __SAM3X8E__ #ifdef __SAM3X8E__
block->acceleration_rate = (long)(acc_st * ( 4294967296.0 / (float)HAL_TIMER_RATE)); block->acceleration_rate = (long)(acc_st * ( 4294967296.0 / HAL_TIMER_RATE));
#else #else
block->acceleration_rate = (long)(acc_st * 16777216.0 / (F_CPU / 8.0)); block->acceleration_rate = (long)(acc_st * 16777216.0 / (F_CPU / 8.0));
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment