initial version - merging from DEV multicolor

This commit is contained in:
PavelSindler 2017-01-09 13:12:39 +01:00
parent 2c0e83a785
commit fcce374a14
15 changed files with 1441 additions and 122 deletions

View File

@ -5,7 +5,7 @@
#include "Configuration_prusa.h"
// Firmware version
#define FW_version "3.0.10-alpha"
#define FW_version "3.0.10-alpha-2"
#define FW_PRUSA3D_MAGIC "PRUSA3DFW"
#define FW_PRUSA3D_MAGIC_LEN 10
@ -43,15 +43,18 @@
#define EEPROM_BED_CORRECTION_FRONT (EEPROM_BED_CORRECTION_RIGHT-1)
#define EEPROM_BED_CORRECTION_REAR (EEPROM_BED_CORRECTION_FRONT-1)
#define EEPROM_TOSHIBA_FLASH_AIR_COMPATIBLITY (EEPROM_BED_CORRECTION_REAR-1)
#define EEPROM_STEPS_PER_UNIT_E (EEPROM_TOSHIBA_FLASH_AIR_COMPATIBLITY-4)
// Currently running firmware, each digit stored as uint16_t.
// 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_FLAVOR (FW_PRUSA3D_MAGIC_LEN+6)
#define EEPROM_FIRMWARE_VERSION_REVISION (FW_PRUSA3D_MAGIC_LEN+4)
#define EEPROM_FIRMWARE_VERSION_MINOR (FW_PRUSA3D_MAGIC_LEN+2)
#define EEPROM_FIRMWARE_VERSION_MAJOR FW_PRUSA3D_MAGIC_LEN
// Magic string, indicating that the current or the previous firmware running was the Prusa3D firmware.
#define EEPROM_FIRMWARE_PRUSA_MAGIC
#define EEPROM_FIRMWARE_PRUSA_MAGIC 0
// This configuration file contains the basic settings.
// Advanced settings can be found in Configuration_adv.h

View File

@ -34,7 +34,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size)
#define EEPROM_OFFSET 100
#define EEPROM_OFFSET 20
// IMPORTANT: Whenever there are changes made to the variables stored in EEPROM
@ -43,7 +43,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size)
// wrong data being written to the variables.
// ALSO: always make sure the variables in the Store and retrieve sections are in the same order.
#define EEPROM_VERSION "V13"
#define EEPROM_VERSION "V0"
#ifdef EEPROM_SETTINGS
void Config_StoreSettings()
@ -59,9 +59,10 @@ void Config_StoreSettings()
EEPROM_WRITE_VAR(i,minimumfeedrate);
EEPROM_WRITE_VAR(i,mintravelfeedrate);
EEPROM_WRITE_VAR(i,minsegmenttime);
EEPROM_WRITE_VAR(i,max_xy_jerk);
EEPROM_WRITE_VAR(i,max_z_jerk);
EEPROM_WRITE_VAR(i,max_e_jerk);
EEPROM_WRITE_VAR(i,max_jerk[X_AXIS]);
EEPROM_WRITE_VAR(i,max_jerk[Y_AXIS]);
EEPROM_WRITE_VAR(i,max_jerk[Z_AXIS]);
EEPROM_WRITE_VAR(i,max_jerk[E_AXIS]);
EEPROM_WRITE_VAR(i,add_homing);
#ifndef ULTIPANEL
int plaPreheatHotendTemp = PLA_PREHEAT_HOTEND_TEMP, plaPreheatHPBTemp = PLA_PREHEAT_HPB_TEMP, plaPreheatFanSpeed = PLA_PREHEAT_FAN_SPEED;
@ -70,12 +71,13 @@ void Config_StoreSettings()
#endif
EEPROM_WRITE_VAR(i,plaPreheatHotendTemp);
/* EEPROM_WRITE_VAR(i,plaPreheatHotendTemp);
EEPROM_WRITE_VAR(i,plaPreheatHPBTemp);
EEPROM_WRITE_VAR(i,plaPreheatFanSpeed);
EEPROM_WRITE_VAR(i,absPreheatHotendTemp);
EEPROM_WRITE_VAR(i,absPreheatHPBTemp);
EEPROM_WRITE_VAR(i,absPreheatFanSpeed);
*/
EEPROM_WRITE_VAR(i,zprobe_zoffset);
#ifdef PIDTEMP
@ -267,22 +269,24 @@ void Config_RetrieveSettings()
EEPROM_READ_VAR(i,minimumfeedrate);
EEPROM_READ_VAR(i,mintravelfeedrate);
EEPROM_READ_VAR(i,minsegmenttime);
EEPROM_READ_VAR(i,max_xy_jerk);
EEPROM_READ_VAR(i,max_z_jerk);
EEPROM_READ_VAR(i,max_e_jerk);
EEPROM_READ_VAR(i,max_jerk[X_AXIS]);
EEPROM_READ_VAR(i,max_jerk[Y_AXIS]);
EEPROM_READ_VAR(i,max_jerk[Z_AXIS]);
EEPROM_READ_VAR(i,max_jerk[E_AXIS]);
EEPROM_READ_VAR(i,add_homing);
#ifndef ULTIPANEL
int plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed;
int absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed;
#endif
/*
EEPROM_READ_VAR(i,plaPreheatHotendTemp);
EEPROM_READ_VAR(i,plaPreheatHPBTemp);
EEPROM_READ_VAR(i,plaPreheatFanSpeed);
EEPROM_READ_VAR(i,absPreheatHotendTemp);
EEPROM_READ_VAR(i,absPreheatHPBTemp);
EEPROM_READ_VAR(i,absPreheatFanSpeed);
*/
EEPROM_READ_VAR(i,zprobe_zoffset);

View File

@ -1,5 +1,6 @@
#ifndef CONFIG_STORE_H
#define CONFIG_STORE_H
#define EEPROM_SETTINGS
#include "Configuration.h"

View File

@ -111,6 +111,7 @@ FORCE_INLINE void serialprintPGM(const char *str)
void get_command();
void process_commands();
void ramming();
void manage_inactivity(bool ignore_stepper_queue=false);
@ -282,6 +283,7 @@ extern float retract_recover_length, retract_recover_length_swap, retract_recove
extern unsigned long starttime;
extern unsigned long stoptime;
extern bool is_usb_printing;
extern bool homing_flag;
extern unsigned int usb_printing_counter;
extern unsigned long kicktime;

View File

@ -100,6 +100,7 @@
// PRUSA CODES
// P F - Returns FW versions
// P R - Returns revision of printer
// P Y - Starts filament allignment process for multicolor
// G0 -> G1
// G1 - Coordinated Movement X Y Z E
@ -254,6 +255,7 @@ int extruder_multiply[EXTRUDERS] = {100
};
bool is_usb_printing = false;
bool homing_flag = false;
unsigned long kicktime = millis()+100000;
@ -881,58 +883,35 @@ static void lcd_language_menu();
// Quiet parameter masks all waitings for user interact.
int er_progress = 0;
void factory_reset(char level, bool quiet)
{
{
lcd_implementation_clear();
switch (level) {
// Level 0: erase everything, whole EEPROM will be set to 0xFF
// Level 0: Language reset
case 0:
lcd_print_at_PGM(1,2,PSTR("ERASING all data"));
WRITE(BEEPER, HIGH);
_delay_ms(100);
WRITE(BEEPER, LOW);
_delay_ms(100);
WRITE(BEEPER, HIGH);
_delay_ms(100);
WRITE(BEEPER, LOW);
_delay_ms(200);
er_progress = 0;
lcd_print_at_PGM(3,3,PSTR(" "));
lcd_implementation_print_at(3,3, er_progress);
// Erase EEPROM
for (int i = 0; i < 4096; i++) {
eeprom_write_byte((uint8_t*)i, 0xFF);
if (i % 41 == 0) {
er_progress++;
lcd_print_at_PGM(3,3,PSTR(" "));
lcd_implementation_print_at(3,3, er_progress);
lcd_printPGM(PSTR("%"));
}
}
break;
// Level 1: Language reset
case 1:
WRITE(BEEPER, HIGH);
_delay_ms(100);
WRITE(BEEPER, LOW);
lcd_force_language_selection();
break;
//Level 1: Reset statistics
case 1:
WRITE(BEEPER, HIGH);
_delay_ms(100);
WRITE(BEEPER, LOW);
eeprom_update_dword((uint32_t *)EEPROM_TOTALTIME, 0);
eeprom_update_dword((uint32_t *)EEPROM_FILAMENTUSED, 0);
lcd_menu_statistics();
break;
// Level 2: Prepare for shipping
case 2:
lcd_print_at_PGM(1,2,PSTR("Shipping prep"));
//lcd_printPGM(PSTR("Factory RESET"));
//lcd_print_at_PGM(1,2,PSTR("Shipping prep"));
// Force language selection at the next boot up.
lcd_force_language_selection();
@ -945,8 +924,38 @@ void factory_reset(char level, bool quiet)
WRITE(BEEPER, HIGH);
_delay_ms(100);
WRITE(BEEPER, LOW);
//_delay_ms(2000);
break;
// Level 3: erase everything, whole EEPROM will be set to 0xFF
case 3:
lcd_printPGM(PSTR("Factory RESET"));
lcd_print_at_PGM(1, 2, PSTR("ERASING all data"));
WRITE(BEEPER, HIGH);
_delay_ms(100);
WRITE(BEEPER, LOW);
er_progress = 0;
lcd_print_at_PGM(3, 3, PSTR(" "));
lcd_implementation_print_at(3, 3, er_progress);
// Erase EEPROM
for (int i = 0; i < 4096; i++) {
eeprom_write_byte((uint8_t*)i, 0xFF);
if (i % 41 == 0) {
er_progress++;
lcd_print_at_PGM(3, 3, PSTR(" "));
lcd_implementation_print_at(3, 3, er_progress);
lcd_printPGM(PSTR("%"));
}
}
break;
default:
break;
@ -1013,7 +1022,7 @@ void setup()
// loads data from EEPROM if available else uses defaults (and resets step acceleration rate)
Config_RetrieveSettings();
SdFatUtil::set_stack_guard(); //writes magic number at the end of static variables to protect against overwriting static memory by stack
tp_init(); // Initialize temperature loop
plan_init(); // Initialize planner;
watchdog_init();
@ -1031,7 +1040,10 @@ void setup()
if (!READ(BTN_ENC))
{
lcd_implementation_clear();
lcd_printPGM(PSTR("Factory RESET"));
lcd_printPGM(PSTR("Factory RESET"));
SET_OUTPUT(BEEPER);
WRITE(BEEPER, HIGH);
@ -1043,19 +1055,17 @@ void setup()
_delay_ms(2000);
if (!READ(BTN_ENC))
{
factory_reset(0,false);
}
else
{
factory_reset(2,false);
}
_delay_ms(2000);
char level = reset_menu();
factory_reset(level, false);
switch (level) {
case 0: _delay_ms(0); break;
case 1: _delay_ms(0); break;
case 2: _delay_ms(0); break;
case 3: _delay_ms(0); break;
}
// _delay_ms(100);
/*
#ifdef MESH_BED_LEVELING
_delay_ms(2000);
@ -1245,6 +1255,7 @@ int serial_read_stream() {
// Before loop(), the setup() function is called by the main() routine.
void loop()
{
bool stack_integrity = true;
if (usb_printing_counter > 0 && millis()-_usb_timer > 1000)
{
@ -1832,6 +1843,89 @@ void trace() {
delay(20);
}
void ramming() {
// float tmp[4] = DEFAULT_MAX_FEEDRATE;
if (current_temperature[0] < 230) {
//PLA
max_feedrate[E_AXIS] = 50;
//current_position[E_AXIS] -= 8;
//plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 2100 / 60, active_extruder);
//current_position[E_AXIS] += 8;
//plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 2100 / 60, active_extruder);
current_position[E_AXIS] += 5.4;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 2800 / 60, active_extruder);
current_position[E_AXIS] += 3.2;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 3000 / 60, active_extruder);
current_position[E_AXIS] += 3;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 3400 / 60, active_extruder);
st_synchronize();
max_feedrate[E_AXIS] = 80;
current_position[E_AXIS] -= 82;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 9500 / 60, active_extruder);
max_feedrate[E_AXIS] = 50;//tmp[E_AXIS];
current_position[E_AXIS] -= 20;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 1200 / 60, active_extruder);
current_position[E_AXIS] += 5;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 400 / 60, active_extruder);
current_position[E_AXIS] += 5;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600 / 60, active_extruder);
current_position[E_AXIS] -= 10;
st_synchronize();
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600 / 60, active_extruder);
current_position[E_AXIS] += 10;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600 / 60, active_extruder);
current_position[E_AXIS] -= 10;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 800 / 60, active_extruder);
current_position[E_AXIS] += 10;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 800 / 60, active_extruder);
current_position[E_AXIS] -= 10;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 800 / 60, active_extruder);
st_synchronize();
}
else {
//ABS
max_feedrate[E_AXIS] = 50;
//current_position[E_AXIS] -= 8;
//plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 2100 / 60, active_extruder);
//current_position[E_AXIS] += 8;
//plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 2100 / 60, active_extruder);
current_position[E_AXIS] += 3.1;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 2000 / 60, active_extruder);
current_position[E_AXIS] += 3.1;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 2500 / 60, active_extruder);
current_position[E_AXIS] += 4;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 3000 / 60, active_extruder);
st_synchronize();
/*current_position[X_AXIS] += 23; //delay
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600/60, active_extruder); //delay
current_position[X_AXIS] -= 23; //delay
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600/60, active_extruder); //delay*/
delay(4700);
max_feedrate[E_AXIS] = 80;
current_position[E_AXIS] -= 92;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 9900 / 60, active_extruder);
max_feedrate[E_AXIS] = 50;//tmp[E_AXIS];
current_position[E_AXIS] -= 5;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 800 / 60, active_extruder);
current_position[E_AXIS] += 5;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 400 / 60, active_extruder);
current_position[E_AXIS] -= 5;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600 / 60, active_extruder);
st_synchronize();
current_position[E_AXIS] += 5;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600 / 60, active_extruder);
current_position[E_AXIS] -= 5;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600 / 60, active_extruder);
current_position[E_AXIS] += 5;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600 / 60, active_extruder);
current_position[E_AXIS] -= 5;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600 / 60, active_extruder);
st_synchronize();
}
}
void process_commands()
{
#ifdef FILAMENT_RUNOUT_SUPPORT
@ -1855,6 +1949,11 @@ void process_commands()
// PRUSA GCODES
#ifdef SNMM
float tmp_motor[3] = DEFAULT_PWM_MOTOR_CURRENT;
float tmp_motor_loud[3] = DEFAULT_PWM_MOTOR_CURRENT_LOUD;
int8_t SilentMode;
#endif
if(code_seen("PRUSA")){
if (code_seen("fv")) {
// get file version
@ -1904,7 +2003,54 @@ void process_commands()
// Factory full reset
factory_reset(0,true);
}
}else if(code_seen("Y")) { //filaments adjustment at the beginning of print (for SNMM)
#ifdef SNMM
int extr;
SilentMode = eeprom_read_byte((uint8_t*)EEPROM_SILENT); //is silent mode or loud mode set
lcd_implementation_clear();
lcd_display_message_fullscreen_P(MSG_FIL_ADJUSTING);
current_position[Z_AXIS] = 100;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 500, active_extruder);
digipot_current(2, E_MOTOR_HIGH_CURRENT);
for (extr = 1; extr < 4; extr++) { //we dont know which filament is in nozzle, but we want to load filament0, so all other filaments must unloaded
change_extr(extr);
ramming();
}
change_extr(0);
current_position[E_AXIS] += FIL_LOAD_LENGTH; //loading filament0 into the nozzle
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 500, active_extruder);
st_synchronize();
for (extr = 1; extr < 4; extr++) {
digipot_current(2, E_MOTOR_LOW_CURRENT); //set lower current for extruder motors
change_extr(extr);
current_position[E_AXIS] += (FIL_LOAD_LENGTH + 3 * FIL_RETURN_LENGTH); //adjusting filaments
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 5000, active_extruder);
st_synchronize();
digipot_current(2, tmp_motor_loud[2]); //set back to normal operation currents
current_position[E_AXIS] -= FIL_RETURN_LENGTH;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 500, active_extruder);
st_synchronize();
}
change_extr(0);
current_position[E_AXIS] += 25;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 10, active_extruder);
digipot_current(2, E_MOTOR_HIGH_CURRENT);
ramming();
if (SilentMode == 1) digipot_current(2, tmp_motor[2]); //set back to normal operation currents
else digipot_current(2, tmp_motor_loud[2]);
st_synchronize();
lcd_show_fullscreen_message_and_wait_P(MSG_CONFIRM_NOZZLE_CLEAN_FIL_ADJ);
lcd_implementation_clear();
lcd_printPGM(MSG_PLEASE_WAIT);
current_position[Z_AXIS] = 0;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 500, active_extruder);
st_synchronize();
lcd_update_enable(true);
#endif
}
//else if (code_seen('Cal')) {
// lcd_calibration();
// }
@ -2095,8 +2241,9 @@ void process_commands()
get_coordinates(); // For X Y Z E F
total_filament_used = total_filament_used + ((destination[E_AXIS] - current_position[E_AXIS])*100);
if (total_filament_used > ((current_position[E_AXIS] - destination[E_AXIS]) * 100)) { //protection against total_filament_used overflow
total_filament_used = total_filament_used + ((destination[E_AXIS] - current_position[E_AXIS]) * 100);
}
#ifdef FWRETRACT
if(autoretract_enabled)
if( !(code_seen('X') || code_seen('Y') || code_seen('Z')) && code_seen('E')) {
@ -2161,6 +2308,7 @@ void process_commands()
break;
#endif //FWRETRACT
case 28: //G28 Home all Axis one at a time
homing_flag = true;
#ifdef ENABLE_AUTO_BED_LEVELING
plan_bed_level_matrix.set_to_identity(); //Reset the plane ("erase" all leveling data)
@ -2381,6 +2529,8 @@ void process_commands()
if (farm_mode) { prusa_statistics(20); };
homing_flag = false;
break;
#ifdef ENABLE_AUTO_BED_LEVELING
@ -2721,7 +2871,7 @@ void process_commands()
if (correction == 0)
continue;
float offset = float(correction) * 0.001f;
if (fabs(offset) > 0.101f) {
if (fabs(offset) > 0.101f) {
SERIAL_ERROR_START;
SERIAL_ECHOPGM("Excessive bed leveling correction: ");
SERIAL_ECHO(offset);
@ -3148,6 +3298,12 @@ void process_commands()
case 45: // M45: Prusa3D: bed skew and offset with manual Z up
{
setTargetBed(0);
setTargetHotend(0, 0);
setTargetHotend(0, 1);
setTargetHotend(0, 2);
adjust_bed_reset(); //reset bed level correction
// Disable the default update procedure of the display. We will do a modal dialog.
lcd_update_enable(false);
// Let the planner use the uncorrected coordinates.
@ -3166,6 +3322,10 @@ void process_commands()
// Let the user move the Z axes up to the end stoppers.
if (lcd_calibrate_z_end_stop_manual( onlyZ )) {
refresh_cmd_timeout();
if ((degHotend(0)>MAX_HOTEND_TEMP_CALIBRATION) || (degBed() > MAX_BED_TEMP_CALIBRATION)) lcd_wait_for_cool_down();
lcd_display_message_fullscreen_P(MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE1);
lcd_implementation_print_at(0, 3, 1);
lcd_printPGM(MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE2);
// Move the print head close to the bed.
current_position[Z_AXIS] = MESH_HOME_Z_SEARCH;
@ -4354,7 +4514,7 @@ Sigma_Exit:
#endif
updatePID();
SERIAL_PROTOCOL(MSG_OK);
SERIAL_PROTOCOLRPGM(MSG_OK);
SERIAL_PROTOCOL(" p:");
SERIAL_PROTOCOL(Kp);
SERIAL_PROTOCOL(" i:");
@ -4378,7 +4538,7 @@ Sigma_Exit:
if(code_seen('D')) bedKd = scalePID_d(code_value());
updatePID();
SERIAL_PROTOCOL(MSG_OK);
SERIAL_PROTOCOLRPGM(MSG_OK);
SERIAL_PROTOCOL(" p:");
SERIAL_PROTOCOL(bedKp);
SERIAL_PROTOCOL(" i:");
@ -4893,6 +5053,52 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
else if(code_seen('T'))
{
tmp_extruder = code_value();
#ifdef SNMM
st_synchronize();
delay(100);
disable_e0();
disable_e1();
disable_e2();
pinMode(E_MUX0_PIN,OUTPUT);
pinMode(E_MUX1_PIN,OUTPUT);
pinMode(E_MUX2_PIN,OUTPUT);
delay(100);
SERIAL_ECHO_START;
SERIAL_ECHO("T:");
SERIAL_ECHOLN((int)tmp_extruder);
switch (tmp_extruder) {
case 1:
WRITE(E_MUX0_PIN, HIGH);
WRITE(E_MUX1_PIN, LOW);
WRITE(E_MUX2_PIN, LOW);
break;
case 2:
WRITE(E_MUX0_PIN, LOW);
WRITE(E_MUX1_PIN, HIGH);
WRITE(E_MUX2_PIN, LOW);
break;
case 3:
WRITE(E_MUX0_PIN, HIGH);
WRITE(E_MUX1_PIN, HIGH);
WRITE(E_MUX2_PIN, LOW);
break;
default:
WRITE(E_MUX0_PIN, LOW);
WRITE(E_MUX1_PIN, LOW);
WRITE(E_MUX2_PIN, LOW);
break;
}
delay(100);
#else
if(tmp_extruder >= EXTRUDERS) {
SERIAL_ECHO_START;
SERIAL_ECHO("T");
@ -4932,6 +5138,7 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
SERIAL_ECHO(MSG_ACTIVE_EXTRUDER);
SERIAL_PROTOCOLLN((int)active_extruder);
}
#endif
} // end if(code_seen('T')) (end of T codes)
else
@ -5413,7 +5620,7 @@ bool setTargetedHotend(int code){
return false;
}
void save_statistics(unsigned long _total_filament_used, unsigned long _total_print_time)
void save_statistics(unsigned long _total_filament_used, unsigned long _total_print_time) //_total_filament_used unit: mm/100
{
if (eeprom_read_byte((uint8_t *)EEPROM_TOTALTIME) == 255 && eeprom_read_byte((uint8_t *)EEPROM_TOTALTIME + 1) == 255 && eeprom_read_byte((uint8_t *)EEPROM_TOTALTIME + 2) == 255 && eeprom_read_byte((uint8_t *)EEPROM_TOTALTIME + 3) == 255)
{
@ -5421,7 +5628,7 @@ void save_statistics(unsigned long _total_filament_used, unsigned long _total_pr
eeprom_update_dword((uint32_t *)EEPROM_FILAMENTUSED, 0);
}
unsigned long _previous_filament = eeprom_read_dword((uint32_t *)EEPROM_FILAMENTUSED);
unsigned long _previous_filament = eeprom_read_dword((uint32_t *)EEPROM_FILAMENTUSED); //_previous_filament unit: cm
unsigned long _previous_time = eeprom_read_dword((uint32_t *)EEPROM_TOTALTIME);
eeprom_update_dword((uint32_t *)EEPROM_TOTALTIME, _previous_time + (_total_print_time/60));

View File

@ -44,6 +44,34 @@ int SdFatUtil::FreeRam() {
}
#endif // __arm
void SdFatUtil::set_stack_guard()
{
char i = 0;
uint32_t *stack_guard;
stack_guard = (uint32_t*)&__bss_end;
//for (i = 0; i < 10; i++) {
*stack_guard = STACK_GUARD_TEST_VALUE;
//}
}
bool SdFatUtil::test_stack_integrity()
{
uint32_t* stack_guard = (uint32_t*)&__bss_end;
return (*stack_guard == STACK_GUARD_TEST_VALUE);
}
uint32_t SdFatUtil::get_stack_guard_test_value()
{
//static char i = 0;
uint32_t* stack_guard;
uint32_t output;
stack_guard = (uint32_t*)&__bss_end;
//output = *(stack_guard + i);
//i++;
output = *stack_guard;
return(output);
}
//------------------------------------------------------------------------------
/** %Print a string in flash memory.
*

View File

@ -39,6 +39,9 @@ namespace SdFatUtil {
void println_P( PGM_P str);
void SerialPrint_P(PGM_P str);
void SerialPrintln_P(PGM_P str);
void set_stack_guard();
bool test_stack_integrity();
uint32_t get_stack_guard_test_value();
}
using namespace SdFatUtil; // NOLINT

View File

@ -424,6 +424,11 @@ const char * const MSG_CALIBRATE_BED_RESET_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_CALIBRATE_BED_RESET_PL
};
const char MSG_CALIBRATE_E_EN[] PROGMEM = "Calibrate E";
const char * const MSG_CALIBRATE_E_LANG_TABLE[1] PROGMEM = {
MSG_CALIBRATE_E_EN
};
const char MSG_CARD_MENU_EN[] PROGMEM = "Print from SD";
const char MSG_CARD_MENU_CZ[] PROGMEM = "Tisk z SD";
const char MSG_CARD_MENU_IT[] PROGMEM = "Stampa da SD";
@ -437,6 +442,10 @@ const char * const MSG_CARD_MENU_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_CARD_MENU_PL
};
const char MSG_CHANGE_EXTR_EN[] PROGMEM = "Change extruder";
const char * const MSG_CHANGE_EXTR_LANG_TABLE[1] PROGMEM = {
MSG_CHANGE_EXTR_EN
};
const char MSG_CHANGE_SUCCESS_EN[] PROGMEM = "Change success!";
const char MSG_CHANGE_SUCCESS_CZ[] PROGMEM = "Zmena uspesna!";
const char MSG_CHANGE_SUCCESS_IT[] PROGMEM = "Cambia. riuscito!";
@ -463,6 +472,10 @@ const char * const MSG_CHANGING_FILAMENT_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_CHANGING_FILAMENT_PL
};
const char MSG_CLEAN_NOZZLE_E_EN[] PROGMEM = "E calibration finished. Please clean the nozzle. Click when done.";
const char * const MSG_CLEAN_NOZZLE_E_LANG_TABLE[1] PROGMEM = {
MSG_CLEAN_NOZZLE_E_EN
};
const char MSG_CNG_SDCARD_EN[] PROGMEM = "Change SD card";
const char * const MSG_CNG_SDCARD_LANG_TABLE[1] PROGMEM = {
MSG_CNG_SDCARD_EN
@ -499,6 +512,11 @@ const char * const MSG_CONFIRM_NOZZLE_CLEAN_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_CONFIRM_NOZZLE_CLEAN_PL
};
const char MSG_CONFIRM_NOZZLE_CLEAN_FIL_ADJ_EN[] PROGMEM = "Filaments are now adjusted. Please clean the nozzle for calibration. Click when done.";
const char * const MSG_CONFIRM_NOZZLE_CLEAN_FIL_ADJ_LANG_TABLE[1] PROGMEM = {
MSG_CONFIRM_NOZZLE_CLEAN_FIL_ADJ_EN
};
const char MSG_CONTROL_EN[] PROGMEM = "Control";
const char * const MSG_CONTROL_LANG_TABLE[1] PROGMEM = {
MSG_CONTROL_EN
@ -640,6 +658,10 @@ const char * const MSG_EXTERNAL_RESET_LANG_TABLE[1] PROGMEM = {
MSG_EXTERNAL_RESET_EN
};
const char MSG_E_CAL_KNOB_EN[] PROGMEM = "Rotate knob until mark reaches extruder body. Click when done.";
const char * const MSG_E_CAL_KNOB_LANG_TABLE[1] PROGMEM = {
MSG_E_CAL_KNOB_EN
};
const char MSG_Enqueing_EN[] PROGMEM = "enqueing \"";
const char * const MSG_Enqueing_LANG_TABLE[1] PROGMEM = {
MSG_Enqueing_EN
@ -663,6 +685,10 @@ const char * const MSG_FAN_SPEED_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_FAN_SPEED_PL
};
const char MSG_FARM_CARD_MENU_EN[] PROGMEM = "Farm mode print";
const char * const MSG_FARM_CARD_MENU_LANG_TABLE[1] PROGMEM = {
MSG_FARM_CARD_MENU_EN
};
const char MSG_FILAMENTCHANGE_EN[] PROGMEM = "Change filament";
const char MSG_FILAMENTCHANGE_CZ[] PROGMEM = "Vymenit filament";
const char MSG_FILAMENTCHANGE_IT[] PROGMEM = "Camb. filamento";
@ -676,6 +702,29 @@ const char * const MSG_FILAMENTCHANGE_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_FILAMENTCHANGE_PL
};
const char MSG_FILAMENT_CLEAN_EN[] PROGMEM = "Is color clear?";
const char * const MSG_FILAMENT_CLEAN_LANG_TABLE[1] PROGMEM = {
MSG_FILAMENT_CLEAN_EN
};
const char MSG_FILAMENT_LOADING_T0_EN[] PROGMEM = "Insert filament into extruder 1. Click when done.";
const char * const MSG_FILAMENT_LOADING_T0_LANG_TABLE[1] PROGMEM = {
MSG_FILAMENT_LOADING_T0_EN
};
const char MSG_FILAMENT_LOADING_T1_EN[] PROGMEM = "Insert filament into extruder 2. Click when done.";
const char * const MSG_FILAMENT_LOADING_T1_LANG_TABLE[1] PROGMEM = {
MSG_FILAMENT_LOADING_T1_EN
};
const char MSG_FILAMENT_LOADING_T2_EN[] PROGMEM = "Insert filament into extruder 3. Click when done.";
const char * const MSG_FILAMENT_LOADING_T2_LANG_TABLE[1] PROGMEM = {
MSG_FILAMENT_LOADING_T2_EN
};
const char MSG_FILAMENT_LOADING_T3_EN[] PROGMEM = "Insert filament into extruder 4. Click when done.";
const char * const MSG_FILAMENT_LOADING_T3_LANG_TABLE[1] PROGMEM = {
MSG_FILAMENT_LOADING_T3_EN
};
const char MSG_FILE_PRINTED_EN[] PROGMEM = "Done printing file";
const char * const MSG_FILE_PRINTED_LANG_TABLE[1] PROGMEM = {
MSG_FILE_PRINTED_EN
@ -686,6 +735,19 @@ const char * const MSG_FILE_SAVED_LANG_TABLE[1] PROGMEM = {
MSG_FILE_SAVED_EN
};
const char MSG_FIL_ADJUSTING_EN[] PROGMEM = "Adjusting filaments. Please wait.";
const char * const MSG_FIL_ADJUSTING_LANG_TABLE[1] PROGMEM = {
MSG_FIL_ADJUSTING_EN
};
const char MSG_FIL_LOADED_CHECK_EN[] PROGMEM = "Is filament loaded?";
const char * const MSG_FIL_LOADED_CHECK_LANG_TABLE[1] PROGMEM = {
MSG_FIL_LOADED_CHECK_EN
};
const char MSG_FIL_TUNING_EN[] PROGMEM = "Rotate the knob to adjust filament.";
const char * const MSG_FIL_TUNING_LANG_TABLE[1] PROGMEM = {
MSG_FIL_TUNING_EN
};
const char MSG_FIND_BED_OFFSET_AND_SKEW_LINE1_EN[] PROGMEM = "Searching bed calibration point";
const char MSG_FIND_BED_OFFSET_AND_SKEW_LINE1_CZ[] PROGMEM = "Hledam kalibracni bod podlozky";
const char MSG_FIND_BED_OFFSET_AND_SKEW_LINE1_IT[] PROGMEM = "Ricerca del letto punto di calibraz.";
@ -958,6 +1020,10 @@ const char * const MSG_LOAD_FILAMENT_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_LOAD_FILAMENT_PL
};
const char MSG_LOOSE_PULLEY_EN[] PROGMEM = "Loose pulley";
const char * const MSG_LOOSE_PULLEY_LANG_TABLE[1] PROGMEM = {
MSG_LOOSE_PULLEY_EN
};
const char MSG_M104_INVALID_EXTRUDER_EN[] PROGMEM = "M104 Invalid extruder ";
const char * const MSG_M104_INVALID_EXTRUDER_LANG_TABLE[1] PROGMEM = {
MSG_M104_INVALID_EXTRUDER_EN
@ -1011,6 +1077,10 @@ const char * const MSG_MAIN_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_MAIN_PL
};
const char MSG_MARK_FIL_EN[] PROGMEM = "Mark filament 100mm from extruder body. Click when done.";
const char * const MSG_MARK_FIL_LANG_TABLE[1] PROGMEM = {
MSG_MARK_FIL_EN
};
const char MSG_MAX_EN[] PROGMEM = " \002 Max";
const char * const MSG_MAX_LANG_TABLE[1] PROGMEM = {
MSG_MAX_EN
@ -2003,6 +2073,11 @@ const char * const MSG_SPEED_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_SPEED_PL
};
const char MSG_STACK_ERROR_EN[] PROGMEM = "Error - static memory has been overwritten";
const char * const MSG_STACK_ERROR_LANG_TABLE[1] PROGMEM = {
MSG_STACK_ERROR_EN
};
const char MSG_STATISTICS_EN[] PROGMEM = "Statistics ";
const char MSG_STATISTICS_CZ[] PROGMEM = "Statistika ";
const char MSG_STATISTICS_IT[] PROGMEM = "Statistiche";
@ -2256,6 +2331,10 @@ const char * const MSG_VTRAV_MIN_LANG_TABLE[1] PROGMEM = {
MSG_VTRAV_MIN_EN
};
const char MSG_WAITING_TEMP_EN[] PROGMEM = "Waiting for heater and bed cooling";
const char * const MSG_WAITING_TEMP_LANG_TABLE[1] PROGMEM = {
MSG_WAITING_TEMP_EN
};
const char MSG_WATCH_EN[] PROGMEM = "Info screen";
const char MSG_WATCH_CZ[] PROGMEM = "Informace";
const char MSG_WATCH_IT[] PROGMEM = "Schermata info";

View File

@ -104,12 +104,18 @@ extern const char* const MSG_CALIBRATE_BED_LANG_TABLE[LANG_NUM];
#define MSG_CALIBRATE_BED LANG_TABLE_SELECT(MSG_CALIBRATE_BED_LANG_TABLE)
extern const char* const MSG_CALIBRATE_BED_RESET_LANG_TABLE[LANG_NUM];
#define MSG_CALIBRATE_BED_RESET LANG_TABLE_SELECT(MSG_CALIBRATE_BED_RESET_LANG_TABLE)
extern const char* const MSG_CALIBRATE_E_LANG_TABLE[1];
#define MSG_CALIBRATE_E LANG_TABLE_SELECT_EXPLICIT(MSG_CALIBRATE_E_LANG_TABLE, 0)
extern const char* const MSG_CARD_MENU_LANG_TABLE[LANG_NUM];
#define MSG_CARD_MENU LANG_TABLE_SELECT(MSG_CARD_MENU_LANG_TABLE)
extern const char* const MSG_CHANGE_EXTR_LANG_TABLE[1];
#define MSG_CHANGE_EXTR LANG_TABLE_SELECT_EXPLICIT(MSG_CHANGE_EXTR_LANG_TABLE, 0)
extern const char* const MSG_CHANGE_SUCCESS_LANG_TABLE[LANG_NUM];
#define MSG_CHANGE_SUCCESS LANG_TABLE_SELECT(MSG_CHANGE_SUCCESS_LANG_TABLE)
extern const char* const MSG_CHANGING_FILAMENT_LANG_TABLE[LANG_NUM];
#define MSG_CHANGING_FILAMENT LANG_TABLE_SELECT(MSG_CHANGING_FILAMENT_LANG_TABLE)
extern const char* const MSG_CLEAN_NOZZLE_E_LANG_TABLE[1];
#define MSG_CLEAN_NOZZLE_E LANG_TABLE_SELECT_EXPLICIT(MSG_CLEAN_NOZZLE_E_LANG_TABLE, 0)
extern const char* const MSG_CNG_SDCARD_LANG_TABLE[1];
#define MSG_CNG_SDCARD LANG_TABLE_SELECT_EXPLICIT(MSG_CNG_SDCARD_LANG_TABLE, 0)
extern const char* const MSG_CONFIGURATION_VER_LANG_TABLE[1];
@ -118,6 +124,8 @@ extern const char* const MSG_CONFIRM_CARRIAGE_AT_THE_TOP_LANG_TABLE[LANG_NUM];
#define MSG_CONFIRM_CARRIAGE_AT_THE_TOP LANG_TABLE_SELECT(MSG_CONFIRM_CARRIAGE_AT_THE_TOP_LANG_TABLE)
extern const char* const MSG_CONFIRM_NOZZLE_CLEAN_LANG_TABLE[LANG_NUM];
#define MSG_CONFIRM_NOZZLE_CLEAN LANG_TABLE_SELECT(MSG_CONFIRM_NOZZLE_CLEAN_LANG_TABLE)
extern const char* const MSG_CONFIRM_NOZZLE_CLEAN_FIL_ADJ_LANG_TABLE[1];
#define MSG_CONFIRM_NOZZLE_CLEAN_FIL_ADJ LANG_TABLE_SELECT_EXPLICIT(MSG_CONFIRM_NOZZLE_CLEAN_FIL_ADJ_LANG_TABLE, 0)
extern const char* const MSG_CONTROL_LANG_TABLE[1];
#define MSG_CONTROL LANG_TABLE_SELECT_EXPLICIT(MSG_CONTROL_LANG_TABLE, 0)
extern const char* const MSG_COOLDOWN_LANG_TABLE[LANG_NUM];
@ -160,18 +168,38 @@ extern const char* const MSG_ERR_STOPPED_LANG_TABLE[1];
#define MSG_ERR_STOPPED LANG_TABLE_SELECT_EXPLICIT(MSG_ERR_STOPPED_LANG_TABLE, 0)
extern const char* const MSG_EXTERNAL_RESET_LANG_TABLE[1];
#define MSG_EXTERNAL_RESET LANG_TABLE_SELECT_EXPLICIT(MSG_EXTERNAL_RESET_LANG_TABLE, 0)
extern const char* const MSG_E_CAL_KNOB_LANG_TABLE[1];
#define MSG_E_CAL_KNOB LANG_TABLE_SELECT_EXPLICIT(MSG_E_CAL_KNOB_LANG_TABLE, 0)
extern const char* const MSG_Enqueing_LANG_TABLE[1];
#define MSG_Enqueing LANG_TABLE_SELECT_EXPLICIT(MSG_Enqueing_LANG_TABLE, 0)
extern const char* const MSG_FACTOR_LANG_TABLE[1];
#define MSG_FACTOR LANG_TABLE_SELECT_EXPLICIT(MSG_FACTOR_LANG_TABLE, 0)
extern const char* const MSG_FAN_SPEED_LANG_TABLE[LANG_NUM];
#define MSG_FAN_SPEED LANG_TABLE_SELECT(MSG_FAN_SPEED_LANG_TABLE)
extern const char* const MSG_FARM_CARD_MENU_LANG_TABLE[1];
#define MSG_FARM_CARD_MENU LANG_TABLE_SELECT_EXPLICIT(MSG_FARM_CARD_MENU_LANG_TABLE, 0)
extern const char* const MSG_FILAMENTCHANGE_LANG_TABLE[LANG_NUM];
#define MSG_FILAMENTCHANGE LANG_TABLE_SELECT(MSG_FILAMENTCHANGE_LANG_TABLE)
extern const char* const MSG_FILAMENT_CLEAN_LANG_TABLE[1];
#define MSG_FILAMENT_CLEAN LANG_TABLE_SELECT_EXPLICIT(MSG_FILAMENT_CLEAN_LANG_TABLE, 0)
extern const char* const MSG_FILAMENT_LOADING_T0_LANG_TABLE[1];
#define MSG_FILAMENT_LOADING_T0 LANG_TABLE_SELECT_EXPLICIT(MSG_FILAMENT_LOADING_T0_LANG_TABLE, 0)
extern const char* const MSG_FILAMENT_LOADING_T1_LANG_TABLE[1];
#define MSG_FILAMENT_LOADING_T1 LANG_TABLE_SELECT_EXPLICIT(MSG_FILAMENT_LOADING_T1_LANG_TABLE, 0)
extern const char* const MSG_FILAMENT_LOADING_T2_LANG_TABLE[1];
#define MSG_FILAMENT_LOADING_T2 LANG_TABLE_SELECT_EXPLICIT(MSG_FILAMENT_LOADING_T2_LANG_TABLE, 0)
extern const char* const MSG_FILAMENT_LOADING_T3_LANG_TABLE[1];
#define MSG_FILAMENT_LOADING_T3 LANG_TABLE_SELECT_EXPLICIT(MSG_FILAMENT_LOADING_T3_LANG_TABLE, 0)
extern const char* const MSG_FILE_PRINTED_LANG_TABLE[1];
#define MSG_FILE_PRINTED LANG_TABLE_SELECT_EXPLICIT(MSG_FILE_PRINTED_LANG_TABLE, 0)
extern const char* const MSG_FILE_SAVED_LANG_TABLE[1];
#define MSG_FILE_SAVED LANG_TABLE_SELECT_EXPLICIT(MSG_FILE_SAVED_LANG_TABLE, 0)
extern const char* const MSG_FIL_ADJUSTING_LANG_TABLE[1];
#define MSG_FIL_ADJUSTING LANG_TABLE_SELECT_EXPLICIT(MSG_FIL_ADJUSTING_LANG_TABLE, 0)
extern const char* const MSG_FIL_LOADED_CHECK_LANG_TABLE[1];
#define MSG_FIL_LOADED_CHECK LANG_TABLE_SELECT_EXPLICIT(MSG_FIL_LOADED_CHECK_LANG_TABLE, 0)
extern const char* const MSG_FIL_TUNING_LANG_TABLE[1];
#define MSG_FIL_TUNING LANG_TABLE_SELECT_EXPLICIT(MSG_FIL_TUNING_LANG_TABLE, 0)
extern const char* const MSG_FIND_BED_OFFSET_AND_SKEW_LINE1_LANG_TABLE[LANG_NUM];
#define MSG_FIND_BED_OFFSET_AND_SKEW_LINE1 LANG_TABLE_SELECT(MSG_FIND_BED_OFFSET_AND_SKEW_LINE1_LANG_TABLE)
extern const char* const MSG_FIND_BED_OFFSET_AND_SKEW_LINE2_LANG_TABLE[LANG_NUM];
@ -226,6 +254,8 @@ extern const char* const MSG_LOAD_EPROM_LANG_TABLE[1];
#define MSG_LOAD_EPROM LANG_TABLE_SELECT_EXPLICIT(MSG_LOAD_EPROM_LANG_TABLE, 0)
extern const char* const MSG_LOAD_FILAMENT_LANG_TABLE[LANG_NUM];
#define MSG_LOAD_FILAMENT LANG_TABLE_SELECT(MSG_LOAD_FILAMENT_LANG_TABLE)
extern const char* const MSG_LOOSE_PULLEY_LANG_TABLE[1];
#define MSG_LOOSE_PULLEY LANG_TABLE_SELECT_EXPLICIT(MSG_LOOSE_PULLEY_LANG_TABLE, 0)
extern const char* const MSG_M104_INVALID_EXTRUDER_LANG_TABLE[1];
#define MSG_M104_INVALID_EXTRUDER LANG_TABLE_SELECT_EXPLICIT(MSG_M104_INVALID_EXTRUDER_LANG_TABLE, 0)
extern const char* const MSG_M105_INVALID_EXTRUDER_LANG_TABLE[1];
@ -244,6 +274,8 @@ extern const char* const MSG_M221_INVALID_EXTRUDER_LANG_TABLE[1];
#define MSG_M221_INVALID_EXTRUDER LANG_TABLE_SELECT_EXPLICIT(MSG_M221_INVALID_EXTRUDER_LANG_TABLE, 0)
extern const char* const MSG_MAIN_LANG_TABLE[LANG_NUM];
#define MSG_MAIN LANG_TABLE_SELECT(MSG_MAIN_LANG_TABLE)
extern const char* const MSG_MARK_FIL_LANG_TABLE[1];
#define MSG_MARK_FIL LANG_TABLE_SELECT_EXPLICIT(MSG_MARK_FIL_LANG_TABLE, 0)
extern const char* const MSG_MAX_LANG_TABLE[1];
#define MSG_MAX LANG_TABLE_SELECT_EXPLICIT(MSG_MAX_LANG_TABLE, 0)
extern const char* const MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE1_LANG_TABLE[LANG_NUM];
@ -448,6 +480,8 @@ extern const char* const MSG_SOFTWARE_RESET_LANG_TABLE[1];
#define MSG_SOFTWARE_RESET LANG_TABLE_SELECT_EXPLICIT(MSG_SOFTWARE_RESET_LANG_TABLE, 0)
extern const char* const MSG_SPEED_LANG_TABLE[LANG_NUM];
#define MSG_SPEED LANG_TABLE_SELECT(MSG_SPEED_LANG_TABLE)
extern const char* const MSG_STACK_ERROR_LANG_TABLE[1];
#define MSG_STACK_ERROR LANG_TABLE_SELECT_EXPLICIT(MSG_STACK_ERROR_LANG_TABLE, 0)
extern const char* const MSG_STATISTICS_LANG_TABLE[LANG_NUM];
#define MSG_STATISTICS LANG_TABLE_SELECT(MSG_STATISTICS_LANG_TABLE)
extern const char* const MSG_STATS_FILAMENTUSED_LANG_TABLE[LANG_NUM];
@ -498,6 +532,8 @@ extern const char* const MSG_VOLUMETRIC_ENABLED_LANG_TABLE[1];
#define MSG_VOLUMETRIC_ENABLED LANG_TABLE_SELECT_EXPLICIT(MSG_VOLUMETRIC_ENABLED_LANG_TABLE, 0)
extern const char* const MSG_VTRAV_MIN_LANG_TABLE[1];
#define MSG_VTRAV_MIN LANG_TABLE_SELECT_EXPLICIT(MSG_VTRAV_MIN_LANG_TABLE, 0)
extern const char* const MSG_WAITING_TEMP_LANG_TABLE[1];
#define MSG_WAITING_TEMP LANG_TABLE_SELECT_EXPLICIT(MSG_WAITING_TEMP_LANG_TABLE, 0)
extern const char* const MSG_WATCH_LANG_TABLE[LANG_NUM];
#define MSG_WATCH LANG_TABLE_SELECT(MSG_WATCH_LANG_TABLE)
extern const char* const MSG_WATCHDOG_RESET_LANG_TABLE[1];

View File

@ -164,6 +164,7 @@
#define MSG_SELFTEST_ENDSTOP "Endstop"
#define MSG_SELFTEST_ENDSTOP_NOTHIT "Endstop not hit"
#define MSG_SELFTEST_OK "Self test OK"
#define MSG_LOOSE_PULLEY "Loose pulley"
#define MSG_SELFTEST_FAN "Fan test";
#define(length=20) MSG_SELFTEST_COOLING_FAN "Front print fan?";
@ -230,6 +231,25 @@
#define(length=20,lines=8) MSG_FOLLOW_CALIBRATION_FLOW "Printer has not been calibrated yet. Please follow the manual, chapter First steps, section Calibration flow."
#define(length=20,lines=12) MSG_BABYSTEP_Z_NOT_SET "Distance between tip of the nozzle and the bed surface has not been set yet. Please follow the manual, chapter First steps, section First layer calibration."
#define(length=20, lines=4) MSG_FILAMENT_LOADING_T0 "Insert filament into extruder 1. Click when done."
#define(length=20, lines=4) MSG_FILAMENT_LOADING_T1 "Insert filament into extruder 2. Click when done."
#define(length=20, lines=4) MSG_FILAMENT_LOADING_T2 "Insert filament into extruder 3. Click when done."
#define(length=20, lines=4) MSG_FILAMENT_LOADING_T3 "Insert filament into extruder 4. Click when done."
#define(length=20, lines=1) MSG_CHANGE_EXTR "Change extruder"
#define(length=20, lines=1) MSG_FIL_LOADED_CHECK "Is filament loaded?"
#define(length=20, lines=2) MSG_FIL_TUNING "Rotate the knob to adjust filament."
#define(length=20, lines=4) MSG_FIL_ADJUSTING "Adjusting filaments. Please wait."
#define(length=20,lines=8) MSG_CONFIRM_NOZZLE_CLEAN_FIL_ADJ "Filaments are now adjusted. Please clean the nozzle for calibration. Click when done."
#define(length=20, lines=4) MSG_STACK_ERROR "Error - static memory has been overwritten"
#define(length=20, lines=1) MSG_CALIBRATE_E "Calibrate E"
#define(length=20, lines=4) MSG_E_CAL_KNOB "Rotate knob until mark reaches extruder body. Click when done."
//#define(length=20, lines=1) MSG_FARM_CARD_MENU "Farm mode print"
#define(length=20, lines=4) MSG_MARK_FIL "Mark filament 100mm from extruder body. Click when done."
#define(length=20, lines=4) MSG_CLEAN_NOZZLE_E "E calibration finished. Please clean the nozzle. Click when done."
#define(length=20, lines=2) MSG_WAITING_TEMP "Waiting for heater and bed cooling"
#define(length=20, lines=1) MSG_FILAMENT_CLEAN "Is color clear?"
#define MSG_BED_CORRECTION_MENU "Bed level correct"
#define MSG_BED_CORRECTION_LEFT "Left side um"
#define MSG_BED_CORRECTION_RIGHT "Right side um"

View File

@ -2152,7 +2152,7 @@ static int babystepLoadZ = 0;
void babystep_apply()
{
// Apply Z height correction aka baby stepping before mesh bed leveing gets activated.
// Apply Z height correction aka baby stepping before mesh bed leveling gets activated.
if(calibration_status() == CALIBRATION_STATUS_CALIBRATED)
{
// End of G80: Apply the baby stepping value.

View File

@ -63,6 +63,14 @@
#define TEMP_1_PIN 1
#define TEMP_2_PIN -1
#ifdef SNMM
#define E_MUX0_PIN 17
#define E_MUX1_PIN 16
#define E_MUX2_PIN 84
#endif
// The SDSS pin uses a different pin mapping from file Sd2PinMap.h
#define SDSS 53
@ -209,6 +217,14 @@
#define FR_SENS 21
#ifdef SNMM
#define E_MUX0_PIN 17
#define E_MUX1_PIN 16
#define E_MUX2_PIN 84
#endif
#define LARGE_FLASH true
#define X_STEP_PIN 37
#define X_DIR_PIN 48

File diff suppressed because it is too large Load Diff

View File

@ -39,7 +39,8 @@ void lcd_mylang();
static void lcd_selftest_screen_step(int _row, int _col, int _state, const char *_name, const char *_indicator);
static bool lcd_selftest_fan_dialog(int _fan);
static void lcd_selftest_error(int _error_no, const char *_error_1, const char *_error_2);
static void lcd_menu_statistics();
void lcd_menu_statistics();
static bool lcd_selfcheck_pulleys(int axis);
extern const char* lcd_display_message_fullscreen_P(const char *msg, uint8_t &nlines);
inline const char* lcd_display_message_fullscreen_P(const char *msg)
@ -196,4 +197,37 @@ extern void lcd_implementation_print_at(uint8_t x, uint8_t y, int i);
extern void lcd_implementation_print(float f);
extern void lcd_implementation_print_at(uint8_t x, uint8_t y, const char *str);
#endif //ULTRALCD_H
void change_extr(int extr);
static int get_ext_nr();
static void extr_adj(int extruder);
static void extr_adj_0();
static void extr_adj_1();
static void extr_adj_2();
static void extr_adj_3();
static void fil_load_menu();
static void fil_unload_menu();
static void extr_unload_0();
static void extr_unload_1();
static void extr_unload_2();
static void extr_unload_3();
static void stack_test();
static int test();
void stack_error();
//void lcd_calibrate_extruder();
void lcd_calibrate_extruder();
void lcd_farm_sdcard_menu();
//void getFileDescription(char *name, char *description);
void lcd_farm_sdcard_menu_w();
//void get_description();
void lcd_wait_for_cool_down();
void adjust_bed_reset();
union MenuData;
char reset_menu();
#endif //ULTRALCD_H

View File

@ -776,6 +776,12 @@ static void lcd_implementation_status_screen()
}
#ifdef SNMM
lcd_printPGM(PSTR(" E"));
lcd.print(get_ext_nr()+1);
#endif
//Print time elapsed
lcd.setCursor(LCD_WIDTH - 8 -2, 2);
lcd_printPGM(PSTR(" "));