host keep alive multi material messages, load filament for multi material

This commit is contained in:
PavelSindler 2017-08-28 14:52:15 +02:00
parent 9e73c96223
commit faeafa1100
3 changed files with 17 additions and 9 deletions

View File

@ -3332,6 +3332,7 @@ void process_commands()
current_position[E_AXIS] += DEFAULT_RETRACTION;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 400, active_extruder);
}
KEEPALIVE_STATE(NOT_BUSY);
// Restore custom message state
custom_message = custom_message_old;
custom_message_type = custom_message_type_old;
@ -5381,11 +5382,13 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
WRITE(BEEPER, LOW);
#ifdef SNMM
display_loading();
KEEPALIVE_STATE(PAUSED_FOR_USER);
do {
target[E_AXIS] += 0.002;
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 500, active_extruder);
delay_keep_alive(2);
} while (!lcd_clicked());
} while (!lcd_clicked());
KEEPALIVE_STATE(IN_HANDLER);
/*if (millis() - load_filament_time > 2) {
load_filament_time = millis();
target[E_AXIS] += 0.001;
@ -5600,6 +5603,9 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
break;
case 701: //M701: load filament
{
#ifdef SNMM
extr_adj(snmm_extruder);//loads current extruder
#else
enable_z();
custom_message = true;
custom_message_type = 2;
@ -5631,6 +5637,7 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
loading_flag = false;
custom_message = false;
custom_message_type = 0;
#endif
}
break;
case 702:

View File

@ -3009,7 +3009,7 @@ static char snmm_stop_print_menu() { //menu for choosing which filaments will be
lcd_print_at_PGM(1,3,MSG_CURRENT);
char cursor_pos = 1;
int enc_dif = 0;
KEEPALIVE_STATE(PAUSED_FOR_USER);
while (1) {
manage_heater();
manage_inactivity(true);
@ -3037,10 +3037,10 @@ static char snmm_stop_print_menu() { //menu for choosing which filaments will be
while (lcd_clicked());
delay(10);
while (lcd_clicked());
KEEPALIVE_STATE(IN_HANDLER);
return(cursor_pos - 1);
}
}
}
}
char choose_extruder_menu() {
@ -3059,7 +3059,7 @@ char choose_extruder_menu() {
for (int i = 0; i < 3; i++) {
lcd_print_at_PGM(1, i + 1, MSG_EXTRUDER);
}
KEEPALIVE_STATE(PAUSED_FOR_USER);
while (1) {
for (int i = 0; i < 3; i++) {
@ -3123,6 +3123,7 @@ char choose_extruder_menu() {
while (lcd_clicked());
delay(10);
while (lcd_clicked());
KEEPALIVE_STATE(IN_HANDLER);
return(cursor_pos + first - 1);
}
@ -3317,7 +3318,7 @@ void display_loading() {
}
}
static void extr_adj(int extruder) //loading filament for SNMM
void extr_adj(int extruder) //loading filament for SNMM
{
bool correct;
max_feedrate[E_AXIS] =80;
@ -3331,13 +3332,13 @@ static void extr_adj(int extruder) //loading filament for SNMM
case 3: lcd_display_message_fullscreen_P(MSG_FILAMENT_LOADING_T3); break;
default: lcd_display_message_fullscreen_P(MSG_FILAMENT_LOADING_T0); break;
}
KEEPALIVE_STATE(PAUSED_FOR_USER);
do{
extr_mov(0.001,1000);
delay_keep_alive(2);
} while (!lcd_clicked());
//delay_keep_alive(500);
KEEPALIVE_STATE(IN_HANDLER);
st_synchronize();
//correct = lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_FIL_LOADED_CHECK, false);
//if (!correct) goto START;

View File

@ -211,7 +211,7 @@ extern void lcd_implementation_print_at(uint8_t x, uint8_t y, const char *str);
void change_extr(int extr);
static void lcd_colorprint_change();
static int get_ext_nr();
static void extr_adj(int extruder);
void extr_adj(int extruder);
static void extr_adj_0();
static void extr_adj_1();
static void extr_adj_2();