示例#1
0
static void lcd_fd()
{
if (fil_temp == 200)
{
setTargetHotend0(plaPreheatHotendTemp);
}
if (fil_temp == 230)
{
setTargetHotend0(absPreheatHotendTemp);
}
setWatch(); // heater sanity check timer
if (!isHeatingHotend(0)&&(filament_seq == 0))
{
filament_seq = 1;
}
if ((filament_seq == 0)&&(pausa_display == 0))
{
pausa_display = 1;
}
if (filament_seq == 1)
{   
if (st_message == 0)  
    {
	lcdDrawUpdate = 2;  
	lcd_implementation_message0(PSTR(""));
    lcd_implementation_message1(PSTR("Se puede sacar"));
	lcd_implementation_message2(PSTR("el filamento.."));
	lcd_implementation_message3(PSTR(""));
	}
}
else
    {
    lcd_implementation_message4(PSTR(" Calentando..."));
    _draw_heater_status(6, 0);
	lcdDrawUpdate = 1;
	u8g.drawBitmapP(9,1,STATUS_SCREENBYTEWIDTH,STATUS_SCREENHEIGHT, (blink % 2) && fanSpeed ? status_screen0_bmp : status_screen1_bmp);
	
	}
	
if ((LCD_CLICKED) || (degTargetHotend(0) == 0)  || (currentMenu == lcd_status_screen))
	{
 	filament_seq = 0;
	st_message = 0;
	pausa_display = 0;
	encoder_zero = 0;
	setTargetHotend0(0);
	lcd_return_to_status();
    }
}
示例#2
0
////i4
void lcd_cooldown()
{
    setTargetHotend0(0);
    setTargetBed(0);
    fanSpeed = 0;
    lcd_return_to_status();
}
示例#3
0
  void getHighESpeed() {
    static float oldt = 0;

    if (!autotemp_enabled) return;
    if (degTargetHotend0() + 2 < autotemp_min) return; // probably temperature set to zero.

    float high = 0.0;
    uint8_t block_index = block_buffer_tail;

    while (block_index != block_buffer_head) {
      block_t *block = &block_buffer[block_index];
      if (block->steps[X_AXIS] || block->steps[Y_AXIS] || block->steps[Z_AXIS]) {
        float se = (float)block->steps[E_AXIS] / block->step_event_count * block->nominal_speed; // mm/sec;
        if (se > high) high = se;
      }
      block_index = next_block_index(block_index);
    }

    float t = autotemp_min + high * autotemp_factor;
    t = constrain(t, autotemp_min, autotemp_max);
    if (oldt > t) {
      t *= (1 - AUTOTEMP_OLDWEIGHT);
      t += AUTOTEMP_OLDWEIGHT * oldt;
    }
    oldt = t;
    setTargetHotend0(t);
  }
示例#4
0
void checkHitEndstops()
{
 if( endstop_x_hit || endstop_y_hit || endstop_z_hit) {
   SERIAL_ECHO_START;
   SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT);
   if(endstop_x_hit) {
     SERIAL_ECHOPAIR(" X:",(float)endstops_trigsteps[X_AXIS]/axis_steps_per_unit[X_AXIS]);
     LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "X");
   }
   if(endstop_y_hit) {
     SERIAL_ECHOPAIR(" Y:",(float)endstops_trigsteps[Y_AXIS]/axis_steps_per_unit[Y_AXIS]);
     LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Y");
   }
   if(endstop_z_hit) {
     SERIAL_ECHOPAIR(" Z:",(float)endstops_trigsteps[Z_AXIS]/axis_steps_per_unit[Z_AXIS]);
     LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Z");
   }
   SERIAL_ECHOLN("");
   endstop_x_hit=false;
   endstop_y_hit=false;
   endstop_z_hit=false;
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
   if (abort_on_endstop_hit)
   {
     card.sdprinting = false;
     card.closefile();
     quickStop();
     setTargetHotend0(0);
     setTargetHotend1(0);
     setTargetHotend2(0);
   }
#endif
 }
}
示例#5
0
void lcd_preheat_flex()
{
    setTargetHotend0(flexPreheatHotendTemp);
    setTargetBed(flexPreheatHPBTemp);
    fanSpeed = 0;
    lcd_return_to_status();
    setWatch(); // heater sanity check timer
}
void lcd_preheat_abs0()
{
    setTargetHotend0(absPreheatHotendTemp);
    setTargetBed(absPreheatHPBTemp);
    fanSpeed = absPreheatFanSpeed;
    lcd_return_to_status();
    setWatch(); // heater sanity check timer
}
示例#7
0
static void lcd_cooldown()
{
    setTargetHotend0(0);
    setTargetHotend1(0);
    setTargetHotend2(0);
    setTargetBed(0);
    lcd_return_to_status();
}
示例#8
0
void lcd_preheat_abs()
{
    setTargetHotend0(absPreheatHotendTemp);
    setTargetHotend1(absPreheatHotendTemp);
    setTargetHotend2(absPreheatHotendTemp);
    setTargetBed(absPreheatHPBTemp);
    fanSpeed = absPreheatFanSpeed;
    lcd_return_to_status();
}
示例#9
0
void lcd_preheat_pla()
{
    setTargetHotend0(plaPreheatHotendTemp);
    setTargetHotend1(plaPreheatHotendTemp);
    setTargetHotend2(plaPreheatHotendTemp);
    setTargetBed(plaPreheatHPBTemp);
    fanSpeed = plaPreheatFanSpeed;
    lcd_return_to_status();
}
示例#10
0
void lcd_preheat_laybrick()
{
    setTargetHotend0(LAYBRICK_PREHEAT_HOTEND_TEMP);
    setTargetHotend1(LAYBRICK_PREHEAT_HOTEND_TEMP);
    setTargetHotend2(LAYBRICK_PREHEAT_HOTEND_TEMP);
    setTargetBed(LAYBRICK_PREHEAT_HPB_TEMP);
    fanSpeed = LAYBRICK_PREHEAT_FAN_SPEED;
    lcd_return_to_status();
    setWatch(); // heater sanity check timer
}
示例#11
0
void lcd_preheat_nylon()
{
    setTargetHotend0(nylonPreheatHotendTemp);
    setTargetHotend1(nylonPreheatHotendTemp);
    setTargetHotend2(nylonPreheatHotendTemp);
    setTargetBed(nylonPreheatHPBTemp);
    fanSpeed = nylonPreheatFanSpeed;
    lcd_return_to_status();
    setWatch(); // heater sanity check timer
}
示例#12
0
void lcd_preheat_pla()
{
    setTargetHotend0(plaPreheatHotendTemp);
    setTargetHotend1(plaPreheatHotendTemp);
    setTargetHotend2(plaPreheatHotendTemp);
    setTargetBed(plaPreheatHPBTemp);
    fanSpeed = plaPreheatFanSpeed;
    lcd_return_to_status();
    setWatch(); // heater sanity check timer
}
void lcd_preheat_abs()
{
    setTargetHotend0(absPreheatHotendTemp);
    setTargetHotend1(absPreheatHotendTemp);
    setTargetHotend2(absPreheatHotendTemp);
    setTargetBed(absPreheatHPBTemp);
#if FAN_PIN > -1
    fanSpeed = absPreheatFanSpeed;
    analogWrite(FAN_PIN,  fanSpeed);
#endif
    lcd_return_to_status();
}
示例#14
0
void checkHitEndstops()
{
 if( endstop_x_hit || endstop_y_hit || endstop_z_hit || endstop_j_hit) {
   SERIAL_ECHO_START;
   snprintf(json_str,JSONSIZE,"{%s:[",MSG_ENDSTOPS_HIT);
   SERIAL_PROTOCOL(json_str);
   comma = false;
   if(endstop_x_hit) {
     SERIAL_PROTOCOLPGM("\"x\"");
     LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "X");
     comma = true;
   }
   if(endstop_y_hit) {
     if (comma) SERIAL_PROTOCOLPGM(",");
     SERIAL_PROTOCOLPGM("\"y\"");
     LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Y");
     comma = true;
   }
   if(endstop_z_hit) {
     if (comma) SERIAL_PROTOCOLPGM(",");
     SERIAL_PROTOCOLPGM("\"z\"");
     LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Z");
     comma = true;
   }
   if(endstop_j_hit) {
     if (comma) SERIAL_PROTOCOLPGM(",");
     SERIAL_PROTOCOLPGM("\"j\"");
     LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "J");
   }
   SERIAL_PROTOCOL("]}");
   SERIAL_MSG_END;
   endstop_x_hit=false;
   endstop_y_hit=false;
   endstop_z_hit=false;
   endstop_j_hit=false;
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
   if (abort_on_endstop_hit)
   {
     card.sdprinting = false;
     card.closefile();
     quickStop();
     setTargetHotend0(0);
     setTargetHotend1(0);
     setTargetHotend2(0);
   }
#endif
 }
}
示例#15
0
文件: planner.cpp 项目: T3P3/Marlin-1
void getHighESpeed()
{
  static float oldt=0;
  if(!autotemp_enabled){
    return;
  }
  if(degTargetHotend0()+2<autotemp_min) {  //probably temperature set to zero.
    return; //do nothing
  }

  float high=0.0;
  uint8_t block_index = block_buffer_tail;

  while(block_index != block_buffer_head) {
    if((block_buffer[block_index].steps_x != 0) ||
      (block_buffer[block_index].steps_y != 0) ||
      (block_buffer[block_index].steps_z != 0)) {
      float se=(float(block_buffer[block_index].steps_e)/float(block_buffer[block_index].step_event_count))*block_buffer[block_index].nominal_speed;
      //se; mm/sec;
      if(se>high)
      {
        high=se;
      }
    }
    block_index = (block_index+1) & (BLOCK_BUFFER_SIZE - 1);
  }

  float g=autotemp_min+high*autotemp_factor;
  float t=g;
  if(t<autotemp_min)
    t=autotemp_min;
  if(t>autotemp_max)
    t=autotemp_max;
  if(oldt>t)
  {
    t=AUTOTEMP_OLDWEIGHT*oldt+(1-AUTOTEMP_OLDWEIGHT)*t;
  }
  oldt=t;
  setTargetHotend0(t);
}
示例#16
0
void checkHitEndstops() {
  if (endstop_x_hit || endstop_y_hit || endstop_z_hit || endstop_z_probe_hit) { // #ifdef || endstop_z_probe_hit to save space if needed.
    SERIAL_ECHO_START;
    SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT);
    if (endstop_x_hit) {
      SERIAL_ECHOPAIR(" X:", (float)endstops_trigsteps[X_AXIS] / axis_steps_per_unit[X_AXIS]);
      LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "X");
    }
    if (endstop_y_hit) {
      SERIAL_ECHOPAIR(" Y:", (float)endstops_trigsteps[Y_AXIS] / axis_steps_per_unit[Y_AXIS]);
      LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Y");
    }
    if (endstop_z_hit) {
      SERIAL_ECHOPAIR(" Z:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
      LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Z");
    }
    #ifdef Z_PROBE_ENDSTOP
    if (endstop_z_probe_hit) {
      SERIAL_ECHOPAIR(" Z_PROBE:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
      LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "ZP");
    }
    #endif
    SERIAL_EOL;

    endstops_hit_on_purpose();

    #if defined(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) && defined(SDSUPPORT)
      if (abort_on_endstop_hit) {
        card.sdprinting = false;
        card.closefile();
        quickStop();
        setTargetHotend0(0);
        setTargetHotend1(0);
        setTargetHotend2(0);
        setTargetHotend3(0);
        setTargetBed(0);
      }
    #endif
  }
}
示例#17
0
void getHighESpeed()
{
  static float oldt=0;
  if(!autotemp_enabled)
    return;
  if(degTargetHotend0()+2<autotemp_min)  //probably temperature set to zero.
    return; //do nothing
  
  float high=0;
  char block_index = block_buffer_tail;
  
  while(block_index != block_buffer_head) {
    float se=block_buffer[block_index].steps_e/float(block_buffer[block_index].step_event_count)*block_buffer[block_index].nominal_rate;
    //se; units steps/sec;
    if(se>high)
    {
      high=se;
    }
    block_index = (block_index+1) & (BLOCK_BUFFER_SIZE - 1);
  }
   
  float g=autotemp_min+high*autotemp_factor;
  float t=g;
  if(t<autotemp_min)
    t=autotemp_min;
  if(t>autotemp_max)
    t=autotemp_max;
  if(oldt>t)
  {
    t=AUTOTEMP_OLDWEIGHT*oldt+(1-AUTOTEMP_OLDWEIGHT)*t;
  }
  oldt=t;
  setTargetHotend0(t);
//   SERIAL_ECHO_START;
//   SERIAL_ECHOPAIR("highe",high);
//   SERIAL_ECHOPAIR(" t",t);
//   SERIAL_ECHOLN("");
}
示例#18
0
static void lcd_fc()
{
if (fil_temp == 200)
{
setTargetHotend0(plaPreheatHotendTemp);
}
if (fil_temp == 230)
{
setTargetHotend0(absPreheatHotendTemp);
}
setWatch(); // heater sanity check timer
if (!isHeatingHotend(0)&&(filament_seq == 0))
{
filament_seq = 1;
}
if ((filament_seq == 0)&&(pausa_display == 0))
{
pausa_display = 1;
}
if (filament_seq == 1)
{   
if (st_message == 0)  
    {
	lcdDrawUpdate = 2;  
	lcd_implementation_message0(PSTR("Introducir el nuevo"));
    lcd_implementation_message1(PSTR("filamento y girar el  "));
	lcd_implementation_message2(PSTR("boton hasta que"));
	lcd_implementation_message3(PSTR("salga el filamento"));
	if (encoder_zero == 0)
	{
	encoderPosition = 0;
	encoder_zero = 1;
	}
	}
    if (encoderPosition != 0)
    {
	    move_menu_scale = 1.0;
        current_position[E_AXIS] += float((int)encoderPosition) * move_menu_scale;
        encoderPosition = 0;
		 #ifdef DELTA
        calculate_delta(current_position);
        plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], manual_feedrate[E_AXIS]/60, active_extruder);
        #else
        plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[E_AXIS]/60, active_extruder);
        #endif
        lcdDrawUpdate = 2;
		st_message = 1;
    }
	
    if ((lcdDrawUpdate) && (st_message == 1))
    {
	lcd_implementation_drawedit(PSTR("Extruder"), ftostr31(current_position[E_AXIS]));
    }

}
else
    {
    lcd_implementation_message4(PSTR(" Calentando..."));
    _draw_heater_status(6, 0);
	lcdDrawUpdate = 1;
	u8g.drawBitmapP(9,1,STATUS_SCREENBYTEWIDTH,STATUS_SCREENHEIGHT, (blink % 2) && fanSpeed ? status_screen0_bmp : status_screen1_bmp);
	
	}
	
if ((LCD_CLICKED) || (degTargetHotend(0) == 0)  || (currentMenu == lcd_status_screen))
	{
 	filament_seq = 0;
	st_message = 0;
	pausa_display = 0;
	encoder_zero = 0;
	setTargetHotend0(0);
	lcd_return_to_status();
    }
}