Roll back to 3.0.12 DENL...
...-250k_baud-FR_SENS_24-PID_BED
This commit is contained in:
parent
96c1e5961c
commit
e55a1cdd9f
|
|
@ -48,9 +48,6 @@
|
||||||
#define EEPROM_BOWDEN_LENGTH (EEPROM_TEMP_CAL_ACTIVE - 2*4) //4 x int for bowden lengths for multimaterial
|
#define EEPROM_BOWDEN_LENGTH (EEPROM_TEMP_CAL_ACTIVE - 2*4) //4 x int for bowden lengths for multimaterial
|
||||||
#define EEPROM_CALIBRATION_STATUS_PINDA (EEPROM_BOWDEN_LENGTH - 1) //0 - not calibrated; 1 - calibrated
|
#define EEPROM_CALIBRATION_STATUS_PINDA (EEPROM_BOWDEN_LENGTH - 1) //0 - not calibrated; 1 - calibrated
|
||||||
|
|
||||||
#define EEPROM_FILENAME (EEPROM_CALIBRATION_STATUS_PINDA - 8) //8chars to store filename without extension
|
|
||||||
#define EEPROM_FILE_POSITION (EEPROM_FILENAME - 4) //32 bit for uint32_t file position
|
|
||||||
|
|
||||||
// Currently running firmware, each digit stored as uint16_t.
|
// Currently running firmware, each digit stored as uint16_t.
|
||||||
// The flavor differentiates a dev, alpha, beta, release candidate or a release version.
|
// The flavor differentiates a dev, alpha, beta, release candidate or a release version.
|
||||||
#define EEPROM_FIRMWARE_VERSION_END (FW_PRUSA3D_MAGIC_LEN+8)
|
#define EEPROM_FIRMWARE_VERSION_END (FW_PRUSA3D_MAGIC_LEN+8)
|
||||||
|
|
|
||||||
|
|
@ -265,45 +265,24 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
// extruder advance constant (s2/mm3)
|
||||||
* Implementation of linear pressure control
|
//
|
||||||
*
|
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
|
||||||
* Assumption: advance = k * (delta velocity)
|
//
|
||||||
* K=0 means advance disabled.
|
// Hooke's law says: force = k * distance
|
||||||
* See Marlin documentation for calibration instructions.
|
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
|
||||||
*/
|
// so: v ^ 2 is proportional to number of steps we advance the extruder
|
||||||
#define LIN_ADVANCE
|
//#define ADVANCE
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
#ifdef ADVANCE
|
||||||
#define LIN_ADVANCE_K 0 //Try around 45 for PLA, around 25 for ABS.
|
#define EXTRUDER_ADVANCE_K .006
|
||||||
|
|
||||||
/**
|
#define D_FILAMENT 1.75
|
||||||
* Some Slicers produce Gcode with randomly jumping extrusion widths occasionally.
|
#define STEPS_MM_E 174.6
|
||||||
* For example within a 0.4mm perimeter it may produce a single segment of 0.05mm width.
|
#define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
|
||||||
* While this is harmless for normal printing (the fluid nature of the filament will
|
#define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUSION_AREA)
|
||||||
* close this very, very tiny gap), it throws off the LIN_ADVANCE pressure adaption.
|
|
||||||
*
|
#endif // ADVANCE
|
||||||
* For this case LIN_ADVANCE_E_D_RATIO can be used to set the extrusion:distance ratio
|
|
||||||
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
|
|
||||||
* if the slicer is using variable widths or layer heights within one print!
|
|
||||||
*
|
|
||||||
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
|
|
||||||
*
|
|
||||||
* Example: `M900 W0.4 H0.2 D1.75`, where:
|
|
||||||
* - W is the extrusion width in mm
|
|
||||||
* - H is the layer height in mm
|
|
||||||
* - D is the filament diameter in mm
|
|
||||||
*
|
|
||||||
* Example: `M900 R0.0458` to set the ratio directly.
|
|
||||||
*
|
|
||||||
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
|
|
||||||
*
|
|
||||||
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.
|
|
||||||
* Cura (as of this writing) may produce Gcode incompatible with the automatic mode.
|
|
||||||
*/
|
|
||||||
#define LIN_ADVANCE_E_D_RATIO 0 // The calculated ratio (or 0) according to the formula W * H / ((D / 2) ^ 2 * PI)
|
|
||||||
// Example: 0.4 * 0.2 / ((1.75 / 2) ^ 2 * PI) = 0.033260135
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Arc interpretation settings:
|
// Arc interpretation settings:
|
||||||
#define MM_PER_ARC_SEGMENT 1
|
#define MM_PER_ARC_SEGMENT 1
|
||||||
|
|
|
||||||
|
|
@ -349,7 +349,3 @@ void temp_compensation_apply();
|
||||||
void temp_compensation_start();
|
void temp_compensation_start();
|
||||||
void wait_for_heater(long codenum);
|
void wait_for_heater(long codenum);
|
||||||
void serialecho_temperatures();
|
void serialecho_temperatures();
|
||||||
|
|
||||||
extern void save_print_to_eeprom();
|
|
||||||
extern void restore_print_from_eeprom();
|
|
||||||
extern void position_menu();
|
|
||||||
|
|
@ -199,7 +199,6 @@
|
||||||
// M540 - Use S[0|1] to enable or disable the stop SD card print on endstop hit (requires ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
|
// M540 - Use S[0|1] to enable or disable the stop SD card print on endstop hit (requires ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
|
||||||
// M600 - Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal]
|
// M600 - Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal]
|
||||||
// M605 - Set dual x-carriage movement mode: S<mode> [ X<duplication x-offset> R<duplication temp offset> ]
|
// M605 - Set dual x-carriage movement mode: S<mode> [ X<duplication x-offset> R<duplication temp offset> ]
|
||||||
// M900 - Set LIN_ADVANCE options, if enabled. See Configuration_adv.h for details.
|
|
||||||
// M907 - Set digital trimpot motor current using axis codes.
|
// M907 - Set digital trimpot motor current using axis codes.
|
||||||
// M908 - Control digital trimpot directly.
|
// M908 - Control digital trimpot directly.
|
||||||
// M350 - Set microstepping mode.
|
// M350 - Set microstepping mode.
|
||||||
|
|
@ -1380,6 +1379,7 @@ void get_command()
|
||||||
continue;
|
continue;
|
||||||
if(serial_char == '\n' ||
|
if(serial_char == '\n' ||
|
||||||
serial_char == '\r' ||
|
serial_char == '\r' ||
|
||||||
|
(serial_char == ':' && comment_mode == false) ||
|
||||||
serial_count >= (MAX_CMD_SIZE - 1) )
|
serial_count >= (MAX_CMD_SIZE - 1) )
|
||||||
{
|
{
|
||||||
if(!serial_count) { //if empty line
|
if(!serial_count) { //if empty line
|
||||||
|
|
@ -1610,15 +1610,6 @@ static inline long code_value_long() { return strtol(strchr_pointer+1, NUL
|
||||||
static inline int16_t code_value_short() { return int16_t(strtol(strchr_pointer+1, NULL, 10)); };
|
static inline int16_t code_value_short() { return int16_t(strtol(strchr_pointer+1, NULL, 10)); };
|
||||||
static inline uint8_t code_value_uint8() { return uint8_t(strtol(strchr_pointer+1, NULL, 10)); };
|
static inline uint8_t code_value_uint8() { return uint8_t(strtol(strchr_pointer+1, NULL, 10)); };
|
||||||
|
|
||||||
static inline float code_value_float() {
|
|
||||||
char* e = strchr(strchr_pointer, 'E');
|
|
||||||
if (!e) return strtod(strchr_pointer + 1, NULL);
|
|
||||||
*e = 0;
|
|
||||||
float ret = strtod(strchr_pointer + 1, NULL);
|
|
||||||
*e = 'E';
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define DEFINE_PGM_READ_ANY(type, reader) \
|
#define DEFINE_PGM_READ_ANY(type, reader) \
|
||||||
static inline type pgm_read_any(const type *p) \
|
static inline type pgm_read_any(const type *p) \
|
||||||
{ return pgm_read_##reader##_near(p); }
|
{ return pgm_read_##reader##_near(p); }
|
||||||
|
|
@ -1804,39 +1795,6 @@ static float probe_pt(float x, float y, float z_before) {
|
||||||
|
|
||||||
#endif // #ifdef ENABLE_AUTO_BED_LEVELING
|
#endif // #ifdef ENABLE_AUTO_BED_LEVELING
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
/**
|
|
||||||
* M900: Set and/or Get advance K factor and WH/D ratio
|
|
||||||
*
|
|
||||||
* K<factor> Set advance K factor
|
|
||||||
* R<ratio> Set ratio directly (overrides WH/D)
|
|
||||||
* W<width> H<height> D<diam> Set ratio from WH/D
|
|
||||||
*/
|
|
||||||
inline void gcode_M900() {
|
|
||||||
st_synchronize();
|
|
||||||
|
|
||||||
const float newK = code_seen('K') ? code_value_float() : -1;
|
|
||||||
if (newK >= 0) extruder_advance_k = newK;
|
|
||||||
|
|
||||||
float newR = code_seen('R') ? code_value_float() : -1;
|
|
||||||
if (newR < 0) {
|
|
||||||
const float newD = code_seen('D') ? code_value_float() : -1,
|
|
||||||
newW = code_seen('W') ? code_value_float() : -1,
|
|
||||||
newH = code_seen('H') ? code_value_float() : -1;
|
|
||||||
if (newD >= 0 && newW >= 0 && newH >= 0)
|
|
||||||
newR = newD ? (newW * newH) / (sq(newD * 0.5) * M_PI) : 0;
|
|
||||||
}
|
|
||||||
if (newR >= 0) advance_ed_ratio = newR;
|
|
||||||
|
|
||||||
SERIAL_ECHO_START;
|
|
||||||
SERIAL_ECHOPGM("Advance K=");
|
|
||||||
SERIAL_ECHOLN(extruder_advance_k);
|
|
||||||
SERIAL_ECHOPGM(" E/D=");
|
|
||||||
const float ratio = advance_ed_ratio;
|
|
||||||
if (ratio) SERIAL_ECHOLN(ratio); else SERIAL_ECHOLNPGM("Auto");
|
|
||||||
}
|
|
||||||
#endif // LIN_ADVANCE
|
|
||||||
|
|
||||||
void homeaxis(int axis) {
|
void homeaxis(int axis) {
|
||||||
#define HOMEAXIS_DO(LETTER) \
|
#define HOMEAXIS_DO(LETTER) \
|
||||||
((LETTER##_MIN_PIN > -1 && LETTER##_HOME_DIR==-1) || (LETTER##_MAX_PIN > -1 && LETTER##_HOME_DIR==1))
|
((LETTER##_MIN_PIN > -1 && LETTER##_HOME_DIR==-1) || (LETTER##_MAX_PIN > -1 && LETTER##_HOME_DIR==1))
|
||||||
|
|
@ -3490,7 +3448,6 @@ void process_commands()
|
||||||
starttime=millis();
|
starttime=millis();
|
||||||
break;
|
break;
|
||||||
case 25: //M25 - Pause SD print
|
case 25: //M25 - Pause SD print
|
||||||
save_print_to_eeprom();
|
|
||||||
card.pauseSDPrint();
|
card.pauseSDPrint();
|
||||||
break;
|
break;
|
||||||
case 26: //M26 - Set SD index
|
case 26: //M26 - Set SD index
|
||||||
|
|
@ -4379,12 +4336,6 @@ Sigma_Exit:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 110: // M110 - reset line pos
|
|
||||||
if (code_seen('N'))
|
|
||||||
gcode_LastN = code_value_long();
|
|
||||||
else
|
|
||||||
gcode_LastN = 0;
|
|
||||||
break;
|
|
||||||
case 115: // M115
|
case 115: // M115
|
||||||
if (code_seen('V')) {
|
if (code_seen('V')) {
|
||||||
// Report the Prusa version number.
|
// Report the Prusa version number.
|
||||||
|
|
@ -5399,12 +5350,6 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
case 900: // M900: Set LIN_ADVANCE options.
|
|
||||||
gcode_M900();
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
case 907: // M907 Set digital trimpot motor current using axis codes.
|
case 907: // M907 Set digital trimpot motor current using axis codes.
|
||||||
{
|
{
|
||||||
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
|
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
|
||||||
|
|
@ -5556,11 +5501,6 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
|
||||||
}
|
}
|
||||||
snmm_filaments_used |= (1 << tmp_extruder); //for stop print
|
snmm_filaments_used |= (1 << tmp_extruder); //for stop print
|
||||||
#ifdef SNMM
|
#ifdef SNMM
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
if (snmm_extruder != tmp_extruder)
|
|
||||||
clear_current_adv_vars(); //Check if the selected extruder is not the active one and reset LIN_ADVANCE variables if so.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
snmm_extruder = tmp_extruder;
|
snmm_extruder = tmp_extruder;
|
||||||
|
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
|
|
@ -6659,41 +6599,3 @@ void serialecho_temperatures() {
|
||||||
SERIAL_PROTOCOL_F(degBed(), 1);
|
SERIAL_PROTOCOL_F(degBed(), 1);
|
||||||
SERIAL_PROTOCOLLN("");
|
SERIAL_PROTOCOLLN("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void save_print_to_eeprom() {
|
|
||||||
|
|
||||||
eeprom_update_dword((uint32_t*)(EEPROM_FILE_POSITION), card.get_sdpos());
|
|
||||||
}
|
|
||||||
|
|
||||||
void restore_print_from_eeprom() {
|
|
||||||
char cmd[30];
|
|
||||||
char* c;
|
|
||||||
char filename[13];
|
|
||||||
char str[5] = ".gco";
|
|
||||||
for (int i = 0; i < 8; i++) {
|
|
||||||
filename[i] = eeprom_read_byte((uint8_t*)EEPROM_FILENAME + i);
|
|
||||||
}
|
|
||||||
filename[8] = '\0';
|
|
||||||
MYSERIAL.print(filename);
|
|
||||||
strcat(filename, str);
|
|
||||||
sprintf_P(cmd, PSTR("M23 %s"), filename);
|
|
||||||
for (c = &cmd[4]; *c; c++)
|
|
||||||
*c = tolower(*c);
|
|
||||||
enquecommand(cmd);
|
|
||||||
uint32_t position = eeprom_read_dword((uint32_t*)(EEPROM_FILE_POSITION));
|
|
||||||
SERIAL_ECHOPGM("Position read from eeprom:");
|
|
||||||
MYSERIAL.println(position);
|
|
||||||
|
|
||||||
card.setIndex(position);
|
|
||||||
enquecommand_P(PSTR("M24"));
|
|
||||||
sprintf_P(cmd, PSTR("M26 S%d"), position);
|
|
||||||
enquecommand(cmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
void position_menu() {
|
|
||||||
SERIAL_ECHOPGM("Percent done:");
|
|
||||||
MYSERIAL.println(card.percentDone());
|
|
||||||
SERIAL_ECHOPGM("sdpos:");
|
|
||||||
MYSERIAL.println(card.get_sdpos());
|
|
||||||
}
|
|
||||||
|
|
@ -47,7 +47,6 @@ public:
|
||||||
FORCE_INLINE void setIndex(long index) {sdpos = index;file.seekSet(index);};
|
FORCE_INLINE void setIndex(long index) {sdpos = index;file.seekSet(index);};
|
||||||
FORCE_INLINE uint8_t percentDone(){if(!isFileOpen()) return 0; if(filesize) return sdpos/((filesize+99)/100); else return 0;};
|
FORCE_INLINE uint8_t percentDone(){if(!isFileOpen()) return 0; if(filesize) return sdpos/((filesize+99)/100); else return 0;};
|
||||||
FORCE_INLINE char* getWorkDirName(){workDir.getFilename(filename);return filename;};
|
FORCE_INLINE char* getWorkDirName(){workDir.getFilename(filename);return filename;};
|
||||||
FORCE_INLINE uint32_t get_sdpos() { if (!isFileOpen()) return 0; else return(sdpos); };
|
|
||||||
|
|
||||||
bool ToshibaFlashAir_isEnabled() const { return card.getFlashAirCompatible(); }
|
bool ToshibaFlashAir_isEnabled() const { return card.getFlashAirCompatible(); }
|
||||||
void ToshibaFlashAir_enable(bool enable) { card.setFlashAirCompatible(enable); }
|
void ToshibaFlashAir_enable(bool enable) { card.setFlashAirCompatible(enable); }
|
||||||
|
|
|
||||||
|
|
@ -273,15 +273,9 @@
|
||||||
|
|
||||||
#define MSG_MESH_BED_LEVELING "Mesh Bed Leveling"
|
#define MSG_MESH_BED_LEVELING "Mesh Bed Leveling"
|
||||||
#define MSG_MENU_CALIBRATION "Calibration"
|
#define MSG_MENU_CALIBRATION "Calibration"
|
||||||
<<<<<<< HEAD
|
|
||||||
#define(length=20) MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_OFF "SD card [normal]"
|
#define(length=20) MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_OFF "SD card [normal]"
|
||||||
#define(length=20) MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_ON "SD card [FlshAir]"
|
#define(length=20) MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_ON "SD card [FlshAir]"
|
||||||
#define(length=20) MSG_PRINTER_DISCONNECTED "Printer disconnected"
|
#define(length=20) MSG_PRINTER_DISCONNECTED "Printer disconnected"
|
||||||
=======
|
|
||||||
#define(length=19, lines=1) MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_OFF "SD card [normal]"
|
|
||||||
#define(length=19, lines=1) MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_ON "SD card [FlshAir]"
|
|
||||||
#define(length=20, lines=1) MSG_PRINTER_DISCONNECTED "Printer disconnected"
|
|
||||||
>>>>>>> refs/remotes/prusa3d/MK2
|
|
||||||
#define(length=20, lines=1) MSG_FINISHING_MOVEMENTS "Finishing movements"
|
#define(length=20, lines=1) MSG_FINISHING_MOVEMENTS "Finishing movements"
|
||||||
#define(length=20, lines=1) MSG_PRINT_PAUSED "Print paused"
|
#define(length=20, lines=1) MSG_PRINT_PAUSED "Print paused"
|
||||||
#define(length=20, lines=1) MSG_RESUMING_PRINT "Resuming print"
|
#define(length=20, lines=1) MSG_RESUMING_PRINT "Resuming print"
|
||||||
|
|
|
||||||
|
|
@ -126,12 +126,6 @@ float extrude_min_temp=EXTRUDE_MINTEMP;
|
||||||
static char meas_sample; //temporary variable to hold filament measurement sample
|
static char meas_sample; //temporary variable to hold filament measurement sample
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
float extruder_advance_k = LIN_ADVANCE_K,
|
|
||||||
advance_ed_ratio = LIN_ADVANCE_E_D_RATIO,
|
|
||||||
position_float[NUM_AXIS] = { 0 };
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Returns the index of the next block in the ring buffer
|
// Returns the index of the next block in the ring buffer
|
||||||
// NOTE: Removed modulo (%) operator, which uses an expensive divide and multiplication.
|
// NOTE: Removed modulo (%) operator, which uses an expensive divide and multiplication.
|
||||||
static inline int8_t next_block_index(int8_t block_index) {
|
static inline int8_t next_block_index(int8_t block_index) {
|
||||||
|
|
@ -417,9 +411,6 @@ void plan_init() {
|
||||||
block_buffer_head = 0;
|
block_buffer_head = 0;
|
||||||
block_buffer_tail = 0;
|
block_buffer_tail = 0;
|
||||||
memset(position, 0, sizeof(position)); // clear position
|
memset(position, 0, sizeof(position)); // clear position
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
memset(position_float, 0, sizeof(position)); // clear position
|
|
||||||
#endif
|
|
||||||
previous_speed[0] = 0.0;
|
previous_speed[0] = 0.0;
|
||||||
previous_speed[1] = 0.0;
|
previous_speed[1] = 0.0;
|
||||||
previous_speed[2] = 0.0;
|
previous_speed[2] = 0.0;
|
||||||
|
|
@ -685,22 +676,12 @@ void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate
|
||||||
target[Z_AXIS] = lround(z*axis_steps_per_unit[Z_AXIS]);
|
target[Z_AXIS] = lround(z*axis_steps_per_unit[Z_AXIS]);
|
||||||
#endif // ENABLE_MESH_BED_LEVELING
|
#endif // ENABLE_MESH_BED_LEVELING
|
||||||
target[E_AXIS] = lround(e*axis_steps_per_unit[E_AXIS]);
|
target[E_AXIS] = lround(e*axis_steps_per_unit[E_AXIS]);
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
const float mm_D_float = sqrt(sq(x - position_float[X_AXIS]) + sq(y - position_float[Y_AXIS]));
|
|
||||||
float de_float = e - position_float[E_AXIS];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PREVENT_DANGEROUS_EXTRUDE
|
#ifdef PREVENT_DANGEROUS_EXTRUDE
|
||||||
if(target[E_AXIS]!=position[E_AXIS])
|
if(target[E_AXIS]!=position[E_AXIS])
|
||||||
{
|
{
|
||||||
if(degHotend(active_extruder)<extrude_min_temp)
|
if(degHotend(active_extruder)<extrude_min_temp)
|
||||||
{
|
{
|
||||||
position[E_AXIS]=target[E_AXIS]; //behave as if the move really took place, but ignore E part
|
position[E_AXIS]=target[E_AXIS]; //behave as if the move really took place, but ignore E part
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
position_float[E_AXIS] = e;
|
|
||||||
de_float = 0;
|
|
||||||
#endif
|
|
||||||
SERIAL_ECHO_START;
|
SERIAL_ECHO_START;
|
||||||
SERIAL_ECHOLNRPGM(MSG_ERR_COLD_EXTRUDE_STOP);
|
SERIAL_ECHOLNRPGM(MSG_ERR_COLD_EXTRUDE_STOP);
|
||||||
}
|
}
|
||||||
|
|
@ -709,10 +690,6 @@ void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate
|
||||||
if(labs(target[E_AXIS]-position[E_AXIS])>axis_steps_per_unit[E_AXIS]*EXTRUDE_MAXLENGTH)
|
if(labs(target[E_AXIS]-position[E_AXIS])>axis_steps_per_unit[E_AXIS]*EXTRUDE_MAXLENGTH)
|
||||||
{
|
{
|
||||||
position[E_AXIS]=target[E_AXIS]; //behave as if the move really took place, but ignore E part
|
position[E_AXIS]=target[E_AXIS]; //behave as if the move really took place, but ignore E part
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
position_float[E_AXIS] = e;
|
|
||||||
de_float = 0;
|
|
||||||
#endif
|
|
||||||
SERIAL_ECHO_START;
|
SERIAL_ECHO_START;
|
||||||
SERIAL_ECHOLNRPGM(MSG_ERR_LONG_EXTRUDE_STOP);
|
SERIAL_ECHOLNRPGM(MSG_ERR_LONG_EXTRUDE_STOP);
|
||||||
}
|
}
|
||||||
|
|
@ -1134,38 +1111,6 @@ Having the real displacement of the head, we can calculate the total movement le
|
||||||
memcpy(previous_speed, current_speed, sizeof(previous_speed)); // previous_speed[] = current_speed[]
|
memcpy(previous_speed, current_speed, sizeof(previous_speed)); // previous_speed[] = current_speed[]
|
||||||
previous_nominal_speed = block->nominal_speed;
|
previous_nominal_speed = block->nominal_speed;
|
||||||
previous_safe_speed = safe_speed;
|
previous_safe_speed = safe_speed;
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
|
|
||||||
//
|
|
||||||
// Use LIN_ADVANCE for blocks if all these are true:
|
|
||||||
//
|
|
||||||
// esteps : We have E steps todo (a printing move)
|
|
||||||
//
|
|
||||||
// block->steps[X_AXIS] || block->steps[Y_AXIS] : We have a movement in XY direction (i.e., not retract / prime).
|
|
||||||
//
|
|
||||||
// extruder_advance_k : There is an advance factor set.
|
|
||||||
//
|
|
||||||
// block->steps[E_AXIS] != block->step_event_count : A problem occurs if the move before a retract is too small.
|
|
||||||
// In that case, the retract and move will be executed together.
|
|
||||||
// This leads to too many advance steps due to a huge e_acceleration.
|
|
||||||
// The math is good, but we must avoid retract moves with advance!
|
|
||||||
// de_float > 0.0 : Extruder is running forward (e.g., for "Wipe while retracting" (Slic3r) or "Combing" (Cura) moves)
|
|
||||||
//
|
|
||||||
block->use_advance_lead = block->steps_e
|
|
||||||
&& (block->steps_x || block->steps_y)
|
|
||||||
&& extruder_advance_k
|
|
||||||
&& (uint32_t)block->steps_e != block->step_event_count
|
|
||||||
&& de_float > 0.0;
|
|
||||||
if (block->use_advance_lead)
|
|
||||||
block->abs_adv_steps_multiplier8 = lround(
|
|
||||||
extruder_advance_k
|
|
||||||
* ((advance_ed_ratio < 0.000001) ? de_float / mm_D_float : advance_ed_ratio) // Use the fixed ratio, if set
|
|
||||||
* (block->nominal_speed / (float)block->nominal_rate)
|
|
||||||
* axis_steps_per_unit[E_AXIS] * 256.0
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Precalculate the division, so when all the trapezoids in the planner queue get recalculated, the division is not repeated.
|
// Precalculate the division, so when all the trapezoids in the planner queue get recalculated, the division is not repeated.
|
||||||
block->speed_factor = block->nominal_rate / block->nominal_speed;
|
block->speed_factor = block->nominal_rate / block->nominal_speed;
|
||||||
calculate_trapezoid_for_block(block, block->entry_speed, safe_speed);
|
calculate_trapezoid_for_block(block, block->entry_speed, safe_speed);
|
||||||
|
|
@ -1175,12 +1120,6 @@ Having the real displacement of the head, we can calculate the total movement le
|
||||||
|
|
||||||
// Update position
|
// Update position
|
||||||
memcpy(position, target, sizeof(target)); // position[] = target[]
|
memcpy(position, target, sizeof(target)); // position[] = target[]
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
position_float[X_AXIS] = x;
|
|
||||||
position_float[Y_AXIS] = y;
|
|
||||||
position_float[Z_AXIS] = z;
|
|
||||||
position_float[E_AXIS] = e;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Recalculate the trapezoids to maximize speed at the segment transitions while respecting
|
// Recalculate the trapezoids to maximize speed at the segment transitions while respecting
|
||||||
// the machine limits (maximum acceleration and maximum jerk).
|
// the machine limits (maximum acceleration and maximum jerk).
|
||||||
|
|
@ -1239,12 +1178,6 @@ void plan_set_position(float x, float y, float z, const float &e)
|
||||||
position[Z_AXIS] = lround(z*axis_steps_per_unit[Z_AXIS]);
|
position[Z_AXIS] = lround(z*axis_steps_per_unit[Z_AXIS]);
|
||||||
#endif // ENABLE_MESH_BED_LEVELING
|
#endif // ENABLE_MESH_BED_LEVELING
|
||||||
position[E_AXIS] = lround(e*axis_steps_per_unit[E_AXIS]);
|
position[E_AXIS] = lround(e*axis_steps_per_unit[E_AXIS]);
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
position_float[X_AXIS] = x;
|
|
||||||
position_float[Y_AXIS] = y;
|
|
||||||
position_float[Z_AXIS] = z;
|
|
||||||
position_float[E_AXIS] = e;
|
|
||||||
#endif
|
|
||||||
st_set_position(position[X_AXIS], position[Y_AXIS], position[Z_AXIS], position[E_AXIS]);
|
st_set_position(position[X_AXIS], position[Y_AXIS], position[Z_AXIS], position[E_AXIS]);
|
||||||
previous_nominal_speed = 0.0; // Resets planner junction speeds. Assumes start from rest.
|
previous_nominal_speed = 0.0; // Resets planner junction speeds. Assumes start from rest.
|
||||||
previous_speed[0] = 0.0;
|
previous_speed[0] = 0.0;
|
||||||
|
|
|
||||||
|
|
@ -88,17 +88,8 @@ typedef struct {
|
||||||
|
|
||||||
// Pre-calculated division for the calculate_trapezoid_for_block() routine to run faster.
|
// Pre-calculated division for the calculate_trapezoid_for_block() routine to run faster.
|
||||||
float speed_factor;
|
float speed_factor;
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
bool use_advance_lead;
|
|
||||||
unsigned long abs_adv_steps_multiplier8; // Factorised by 2^8 to avoid float
|
|
||||||
#endif
|
|
||||||
} block_t;
|
} block_t;
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
extern float extruder_advance_k, advance_ed_ratio;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
#ifdef ENABLE_AUTO_BED_LEVELING
|
||||||
// this holds the required transform to compensate for bed level
|
// this holds the required transform to compensate for bed level
|
||||||
extern matrix_3x3 plan_bed_level_matrix;
|
extern matrix_3x3 plan_bed_level_matrix;
|
||||||
|
|
|
||||||
|
|
@ -88,26 +88,6 @@ int8_t SilentMode;
|
||||||
volatile long count_position[NUM_AXIS] = { 0, 0, 0, 0};
|
volatile long count_position[NUM_AXIS] = { 0, 0, 0, 0};
|
||||||
volatile signed char count_direction[NUM_AXIS] = { 1, 1, 1, 1};
|
volatile signed char count_direction[NUM_AXIS] = { 1, 1, 1, 1};
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
|
|
||||||
uint16_t ADV_NEVER = 65535;
|
|
||||||
|
|
||||||
static uint16_t nextMainISR = 0;
|
|
||||||
static uint16_t nextAdvanceISR = ADV_NEVER;
|
|
||||||
static uint16_t eISR_Rate = ADV_NEVER;
|
|
||||||
|
|
||||||
static volatile int e_steps; //Extrusion steps to be executed by the stepper
|
|
||||||
static int final_estep_rate; //Speed of extruder at cruising speed
|
|
||||||
static int current_estep_rate; //The current speed of the extruder
|
|
||||||
static int current_adv_steps; //The current pretension of filament expressed in steps
|
|
||||||
|
|
||||||
#define ADV_RATE(T, L) (e_steps ? (T) * (L) / abs(e_steps) : ADV_NEVER)
|
|
||||||
#define _NEXT_ISR(T) nextMainISR = T
|
|
||||||
|
|
||||||
#else
|
|
||||||
#define _NEXT_ISR(T) OCR1A = T
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
//=============================functions ============================
|
//=============================functions ============================
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
@ -328,27 +308,24 @@ FORCE_INLINE void trapezoid_generator_reset() {
|
||||||
step_loops_nominal = step_loops;
|
step_loops_nominal = step_loops;
|
||||||
acc_step_rate = current_block->initial_rate;
|
acc_step_rate = current_block->initial_rate;
|
||||||
acceleration_time = calc_timer(acc_step_rate);
|
acceleration_time = calc_timer(acc_step_rate);
|
||||||
_NEXT_ISR(acceleration_time);
|
OCR1A = acceleration_time;
|
||||||
|
|
||||||
|
// SERIAL_ECHO_START;
|
||||||
|
// SERIAL_ECHOPGM("advance :");
|
||||||
|
// SERIAL_ECHO(current_block->advance/256.0);
|
||||||
|
// SERIAL_ECHOPGM("advance rate :");
|
||||||
|
// SERIAL_ECHO(current_block->advance_rate/256.0);
|
||||||
|
// SERIAL_ECHOPGM("initial advance :");
|
||||||
|
// SERIAL_ECHO(current_block->initial_advance/256.0);
|
||||||
|
// SERIAL_ECHOPGM("final advance :");
|
||||||
|
// SERIAL_ECHOLN(current_block->final_advance/256.0);
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
if (current_block->use_advance_lead) {
|
|
||||||
current_estep_rate = ((unsigned long)acc_step_rate * current_block->abs_adv_steps_multiplier8) >> 17;
|
|
||||||
final_estep_rate = (current_block->nominal_rate * current_block->abs_adv_steps_multiplier8) >> 17;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// "The Stepper Driver Interrupt" - This timer interrupt is the workhorse.
|
// "The Stepper Driver Interrupt" - This timer interrupt is the workhorse.
|
||||||
// It pops blocks from the block_buffer and executes them by pulsing the stepper pins appropriately.
|
// It pops blocks from the block_buffer and executes them by pulsing the stepper pins appropriately.
|
||||||
ISR(TIMER1_COMPA_vect) {
|
ISR(TIMER1_COMPA_vect)
|
||||||
#ifdef LIN_ADVANCE
|
{
|
||||||
advance_isr_scheduler();
|
|
||||||
#else
|
|
||||||
isr();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void isr() {
|
|
||||||
// If there is no current block, attempt to pop one from the buffer
|
// If there is no current block, attempt to pop one from the buffer
|
||||||
if (current_block == NULL) {
|
if (current_block == NULL) {
|
||||||
// Anything in the buffer?
|
// Anything in the buffer?
|
||||||
|
|
@ -366,13 +343,13 @@ void isr() {
|
||||||
#ifdef Z_LATE_ENABLE
|
#ifdef Z_LATE_ENABLE
|
||||||
if(current_block->steps_z > 0) {
|
if(current_block->steps_z > 0) {
|
||||||
enable_z();
|
enable_z();
|
||||||
_NEXT_ISR(2000); //1ms wait
|
OCR1A = 2000; //1ms wait
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_NEXT_ISR(2000); // 1kHz.
|
OCR1A=2000; // 1kHz.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -577,15 +554,6 @@ void isr() {
|
||||||
MSerial.checkRx(); // Check for serial chars.
|
MSerial.checkRx(); // Check for serial chars.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
counter_e += current_block->steps_e;
|
|
||||||
if (counter_e > 0) {
|
|
||||||
counter_e -= current_block->step_event_count;
|
|
||||||
count_position[E_AXIS] += count_direction[E_AXIS];
|
|
||||||
((out_bits&(1<<E_AXIS))!=0) ? --e_steps : ++e_steps;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
counter_x += current_block->steps_x;
|
counter_x += current_block->steps_x;
|
||||||
if (counter_x > 0) {
|
if (counter_x > 0) {
|
||||||
WRITE(X_STEP_PIN, !INVERT_X_STEP_PIN);
|
WRITE(X_STEP_PIN, !INVERT_X_STEP_PIN);
|
||||||
|
|
@ -628,7 +596,6 @@ void isr() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIN_ADVANCE
|
|
||||||
counter_e += current_block->steps_e;
|
counter_e += current_block->steps_e;
|
||||||
if (counter_e > 0) {
|
if (counter_e > 0) {
|
||||||
WRITE_E_STEP(!INVERT_E_STEP_PIN);
|
WRITE_E_STEP(!INVERT_E_STEP_PIN);
|
||||||
|
|
@ -636,21 +603,9 @@ void isr() {
|
||||||
count_position[E_AXIS]+=count_direction[E_AXIS];
|
count_position[E_AXIS]+=count_direction[E_AXIS];
|
||||||
WRITE_E_STEP(INVERT_E_STEP_PIN);
|
WRITE_E_STEP(INVERT_E_STEP_PIN);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
step_events_completed += 1;
|
step_events_completed += 1;
|
||||||
if(step_events_completed >= current_block->step_event_count) break;
|
if(step_events_completed >= current_block->step_event_count) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
if (current_block->use_advance_lead) {
|
|
||||||
const int delta_adv_steps = current_estep_rate - current_adv_steps;
|
|
||||||
current_adv_steps += delta_adv_steps;
|
|
||||||
e_steps += delta_adv_steps;
|
|
||||||
}
|
|
||||||
// If we have esteps to execute, fire the next advance_isr "now"
|
|
||||||
if (e_steps) nextAdvanceISR = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Calculare new timer value
|
// Calculare new timer value
|
||||||
unsigned short timer;
|
unsigned short timer;
|
||||||
unsigned short step_rate;
|
unsigned short step_rate;
|
||||||
|
|
@ -665,15 +620,8 @@ void isr() {
|
||||||
|
|
||||||
// step_rate to timer interval
|
// step_rate to timer interval
|
||||||
timer = calc_timer(acc_step_rate);
|
timer = calc_timer(acc_step_rate);
|
||||||
_NEXT_ISR(timer);
|
OCR1A = timer;
|
||||||
acceleration_time += timer;
|
acceleration_time += timer;
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
if (current_block->use_advance_lead) {
|
|
||||||
current_estep_rate = ((uint32_t)acc_step_rate * current_block->abs_adv_steps_multiplier8) >> 17;
|
|
||||||
}
|
|
||||||
eISR_Rate = ADV_RATE(timer, step_loops);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else if (step_events_completed > (unsigned long int)current_block->decelerate_after) {
|
else if (step_events_completed > (unsigned long int)current_block->decelerate_after) {
|
||||||
MultiU24X24toH16(step_rate, deceleration_time, current_block->acceleration_rate);
|
MultiU24X24toH16(step_rate, deceleration_time, current_block->acceleration_rate);
|
||||||
|
|
@ -691,25 +639,11 @@ void isr() {
|
||||||
|
|
||||||
// step_rate to timer interval
|
// step_rate to timer interval
|
||||||
timer = calc_timer(step_rate);
|
timer = calc_timer(step_rate);
|
||||||
_NEXT_ISR(timer);
|
OCR1A = timer;
|
||||||
deceleration_time += timer;
|
deceleration_time += timer;
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
if (current_block->use_advance_lead) {
|
|
||||||
current_estep_rate = ((uint32_t)step_rate * current_block->abs_adv_steps_multiplier8) >> 17;
|
|
||||||
}
|
|
||||||
eISR_Rate = ADV_RATE(timer, step_loops);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#ifdef LIN_ADVANCE
|
OCR1A = OCR1A_nominal;
|
||||||
if (current_block->use_advance_lead)
|
|
||||||
current_estep_rate = final_estep_rate;
|
|
||||||
|
|
||||||
eISR_Rate = ADV_RATE(OCR1A_nominal, step_loops_nominal);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_NEXT_ISR(OCR1A_nominal);
|
|
||||||
// ensure we're running at the correct step rate, even if we just came off an acceleration
|
// ensure we're running at the correct step rate, even if we just came off an acceleration
|
||||||
step_loops = step_loops_nominal;
|
step_loops = step_loops_nominal;
|
||||||
}
|
}
|
||||||
|
|
@ -722,69 +656,6 @@ void isr() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
|
|
||||||
// Timer interrupt for E. e_steps is set in the main routine.
|
|
||||||
|
|
||||||
void advance_isr() {
|
|
||||||
|
|
||||||
nextAdvanceISR = eISR_Rate;
|
|
||||||
|
|
||||||
if (e_steps) {
|
|
||||||
bool dir =
|
|
||||||
#ifdef SNMM
|
|
||||||
((e_steps < 0) == (snmm_extruder & 1))
|
|
||||||
#else
|
|
||||||
(e_steps < 0)
|
|
||||||
#endif
|
|
||||||
? INVERT_E0_DIR : !INVERT_E0_DIR; //If we have SNMM, reverse every second extruder.
|
|
||||||
WRITE(E0_DIR_PIN, dir);
|
|
||||||
|
|
||||||
for (uint8_t i = step_loops; e_steps && i--;) {
|
|
||||||
WRITE(E0_STEP_PIN, !INVERT_E_STEP_PIN);
|
|
||||||
e_steps < 0 ? ++e_steps : --e_steps;
|
|
||||||
WRITE(E0_STEP_PIN, INVERT_E_STEP_PIN);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void advance_isr_scheduler() {
|
|
||||||
// Run main stepping ISR if flagged
|
|
||||||
if (!nextMainISR) isr();
|
|
||||||
|
|
||||||
// Run Advance stepping ISR if flagged
|
|
||||||
if (!nextAdvanceISR) advance_isr();
|
|
||||||
|
|
||||||
// Is the next advance ISR scheduled before the next main ISR?
|
|
||||||
if (nextAdvanceISR <= nextMainISR) {
|
|
||||||
// Set up the next interrupt
|
|
||||||
OCR1A = nextAdvanceISR;
|
|
||||||
// New interval for the next main ISR
|
|
||||||
if (nextMainISR) nextMainISR -= nextAdvanceISR;
|
|
||||||
// Will call Stepper::advance_isr on the next interrupt
|
|
||||||
nextAdvanceISR = 0;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// The next main ISR comes first
|
|
||||||
OCR1A = nextMainISR;
|
|
||||||
// New interval for the next advance ISR, if any
|
|
||||||
if (nextAdvanceISR && nextAdvanceISR != ADV_NEVER)
|
|
||||||
nextAdvanceISR -= nextMainISR;
|
|
||||||
// Will call Stepper::isr on the next interrupt
|
|
||||||
nextMainISR = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Don't run the ISR faster than possible
|
|
||||||
if (OCR1A < TCNT1 + 16) OCR1A = TCNT1 + 16;
|
|
||||||
}
|
|
||||||
|
|
||||||
void clear_current_adv_vars() {
|
|
||||||
e_steps = 0; //Should be already 0 at an filament change event, but just to be sure..
|
|
||||||
current_adv_steps = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // LIN_ADVANCE
|
|
||||||
|
|
||||||
void st_init()
|
void st_init()
|
||||||
{
|
{
|
||||||
digipot_init(); //Initialize Digipot Motor Current
|
digipot_init(); //Initialize Digipot Motor Current
|
||||||
|
|
@ -973,12 +844,6 @@ void st_init()
|
||||||
TCNT1 = 0;
|
TCNT1 = 0;
|
||||||
ENABLE_STEPPER_DRIVER_INTERRUPT();
|
ENABLE_STEPPER_DRIVER_INTERRUPT();
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
e_steps = 0;
|
|
||||||
current_adv_steps = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
enable_endstops(true); // Start with endstops active. After homing they can be disabled
|
enable_endstops(true); // Start with endstops active. After homing they can be disabled
|
||||||
sei();
|
sei();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,16 +44,6 @@ extern bool abort_on_endstop_hit;
|
||||||
// Initialize and start the stepper motor subsystem
|
// Initialize and start the stepper motor subsystem
|
||||||
void st_init();
|
void st_init();
|
||||||
|
|
||||||
// Interrupt Service Routines
|
|
||||||
|
|
||||||
void isr();
|
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
|
||||||
void advance_isr();
|
|
||||||
void advance_isr_scheduler();
|
|
||||||
void clear_current_adv_vars(); //Used to reset the built up pretension and remaining esteps on filament change.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Block until all buffered steps are executed
|
// Block until all buffered steps are executed
|
||||||
void st_synchronize();
|
void st_synchronize();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4051,7 +4051,6 @@ void lcd_sdcard_stop()
|
||||||
|
|
||||||
lcd_return_to_status();
|
lcd_return_to_status();
|
||||||
lcd_ignore_click(true);
|
lcd_ignore_click(true);
|
||||||
|
|
||||||
lcd_commands_type = LCD_COMMAND_STOP_PRINT;
|
lcd_commands_type = LCD_COMMAND_STOP_PRINT;
|
||||||
|
|
||||||
// Turn off the print fan
|
// Turn off the print fan
|
||||||
|
|
@ -4902,9 +4901,6 @@ static void menu_action_sdfile(const char* filename, char* longFilename)
|
||||||
for (c = &cmd[4]; *c; c++)
|
for (c = &cmd[4]; *c; c++)
|
||||||
*c = tolower(*c);
|
*c = tolower(*c);
|
||||||
enquecommand(cmd);
|
enquecommand(cmd);
|
||||||
for (int i = 0; i < 8; i++) {
|
|
||||||
eeprom_write_byte((uint8_t*)EEPROM_FILENAME+i, filename[i]);
|
|
||||||
}
|
|
||||||
enquecommand_P(PSTR("M24"));
|
enquecommand_P(PSTR("M24"));
|
||||||
lcd_return_to_status();
|
lcd_return_to_status();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -742,7 +742,6 @@ static void lcd_implementation_status_screen()
|
||||||
if (IS_SD_PRINTING)
|
if (IS_SD_PRINTING)
|
||||||
{
|
{
|
||||||
lcd.print(itostr3(card.percentDone()));
|
lcd.print(itostr3(card.percentDone()));
|
||||||
card.get_sdpos();
|
|
||||||
lcd.print('%');
|
lcd.print('%');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue