|
@@ -534,17 +534,17 @@ void MainMenu::showPrepare()
|
534
|
534
|
MENUITEM( lcdprintPGM(MSG_SET_ORIGIN) , BLOCK;enquecommand("G92 X0 Y0 Z0");beepshort(); ) ;
|
535
|
535
|
break;
|
536
|
536
|
case ItemP_preheat_pla:
|
537
|
|
- MENUITEM( lcdprintPGM(MSG_PREHEAT_PLA) , BLOCK;setTargetHotend0(PLA_PREHEAT_HOTEND_TEMP);setTargetBed(PLA_PREHEAT_HPB_TEMP);
|
|
537
|
+ MENUITEM( lcdprintPGM(MSG_PREHEAT_PLA) , BLOCK;setTargetHotend0(plaPreheatHotendTemp);setTargetBed(plaPreheatHPBTemp);
|
538
|
538
|
#if FAN_PIN > -1
|
539
|
|
- FanSpeed=PLA_PREHEAT_FAN_SPEED;
|
|
539
|
+ FanSpeed = plaPreheatFanSpeed;
|
540
|
540
|
analogWrite(FAN_PIN, FanSpeed);
|
541
|
541
|
#endif
|
542
|
542
|
beepshort(); );
|
543
|
543
|
break;
|
544
|
544
|
case ItemP_preheat_abs:
|
545
|
|
- MENUITEM( lcdprintPGM(MSG_PREHEAT_ABS) , BLOCK;setTargetHotend0(ABS_PREHEAT_HOTEND_TEMP);setTargetBed(ABS_PREHEAT_HPB_TEMP);
|
|
545
|
+ MENUITEM( lcdprintPGM(MSG_PREHEAT_ABS) , BLOCK;setTargetHotend0(absPreheatHotendTemp);setTargetBed(absPreheatHPBTemp);
|
546
|
546
|
#if FAN_PIN > -1
|
547
|
|
- FanSpeed=ABS_PREHEAT_FAN_SPEED;
|
|
547
|
+ FanSpeed = absPreheatFanSpeed;
|
548
|
548
|
analogWrite(FAN_PIN, FanSpeed);
|
549
|
549
|
#endif
|
550
|
550
|
beepshort(); );
|
|
@@ -795,7 +795,7 @@ void MainMenu::showTune()
|
795
|
795
|
{
|
796
|
796
|
lcd.setCursor(0,line);lcdprintPGM(MSG_NOZZLE);
|
797
|
797
|
lcd.setCursor(13,line);lcd.print(ftostr3(intround(degTargetHotend0())));
|
798
|
|
- }
|
|
798
|
+ }
|
799
|
799
|
|
800
|
800
|
if((activeline!=line) )
|
801
|
801
|
break;
|
|
@@ -973,7 +973,9 @@ enum {
|
973
|
973
|
ItemCT_bed,
|
974
|
974
|
#endif
|
975
|
975
|
ItemCT_fan,
|
976
|
|
- ItemCT_PID_P,ItemCT_PID_I,ItemCT_PID_D,ItemCT_PID_C
|
|
976
|
+ ItemCT_PID_P,ItemCT_PID_I,ItemCT_PID_D,ItemCT_PID_C,
|
|
977
|
+ ItemCT_PLA_PreHeat_Setting,
|
|
978
|
+ ItemCT_ABS_PreHeat_Setting,
|
977
|
979
|
};
|
978
|
980
|
|
979
|
981
|
void MainMenu::showControlTemp()
|
|
@@ -1440,16 +1442,19 @@ void MainMenu::showControlTemp()
|
1440
|
1442
|
#endif
|
1441
|
1443
|
#endif
|
1442
|
1444
|
break;
|
|
1445
|
+ case ItemCT_PLA_PreHeat_Setting:
|
|
1446
|
+ MENUITEM( lcdprintPGM(MSG_PREHEAT_PLA_SETTINGS) , BLOCK;status=Sub_PreheatPLASettings;beepshort(); ) ;
|
|
1447
|
+ break;
|
|
1448
|
+ case ItemCT_ABS_PreHeat_Setting:
|
|
1449
|
+ MENUITEM( lcdprintPGM(MSG_PREHEAT_ABS_SETTINGS) , BLOCK;status=Sub_PreheatABSSettings;beepshort(); ) ;
|
|
1450
|
+ break;
|
1443
|
1451
|
default:
|
1444
|
1452
|
break;
|
1445
|
1453
|
}
|
1446
|
1454
|
line++;
|
1447
|
1455
|
}
|
1448
|
|
- #ifdef PID_ADD_EXTRUSION_RATE
|
1449
|
|
- updateActiveLines(ItemCT_PID_C,encoderpos);
|
1450
|
|
- #else
|
1451
|
|
- updateActiveLines(ItemCT_PID_D,encoderpos);
|
1452
|
|
- #endif
|
|
1456
|
+
|
|
1457
|
+ updateActiveLines(ItemCT_ABS_PreHeat_Setting,encoderpos);
|
1453
|
1458
|
}
|
1454
|
1459
|
|
1455
|
1460
|
|
|
@@ -2575,6 +2580,14 @@ void MainMenu::update()
|
2575
|
2580
|
{
|
2576
|
2581
|
showSD();
|
2577
|
2582
|
}break;
|
|
2583
|
+ case Sub_PreheatPLASettings:
|
|
2584
|
+ {
|
|
2585
|
+ showPLAsettings();
|
|
2586
|
+ }break;
|
|
2587
|
+ case Sub_PreheatABSSettings:
|
|
2588
|
+ {
|
|
2589
|
+ showABSsettings();
|
|
2590
|
+ }break;
|
2578
|
2591
|
}
|
2579
|
2592
|
|
2580
|
2593
|
if(timeoutToStatus<millis())
|
|
@@ -2583,11 +2596,299 @@ void MainMenu::update()
|
2583
|
2596
|
lastencoderpos=encoderpos;
|
2584
|
2597
|
}
|
2585
|
2598
|
|
|
2599
|
+enum {
|
|
2600
|
+ ItemPLAPreHeat_Exit,
|
|
2601
|
+ ItemPLAPreHeat_set_PLA_FanSpeed,
|
|
2602
|
+ ItemPLAPreHeat_set_nozzle,
|
|
2603
|
+ ItemPLAPreHeat_set_HPB,
|
|
2604
|
+ ItemPLAPreHeat_Store_Eprom
|
|
2605
|
+ };
|
|
2606
|
+
|
|
2607
|
+void MainMenu::showPLAsettings()
|
|
2608
|
+{
|
|
2609
|
+#ifdef ULTIPANEL
|
|
2610
|
+ uint8_t line=0;
|
|
2611
|
+ clearIfNecessary();
|
|
2612
|
+ for(int8_t i=lineoffset;i<lineoffset+LCD_HEIGHT;i++)
|
|
2613
|
+ {
|
|
2614
|
+ switch(i)
|
|
2615
|
+ {
|
2586
|
2616
|
|
|
2617
|
+ case ItemPLAPreHeat_Exit:
|
|
2618
|
+ MENUITEM( lcdprintPGM(MSG_TEMPERATURE_RTN) , BLOCK;status=Sub_TempControl;beepshort(); ) ;
|
|
2619
|
+ break;
|
2587
|
2620
|
|
|
2621
|
+ case ItemPLAPreHeat_set_PLA_FanSpeed:
|
|
2622
|
+ {
|
|
2623
|
+ if(force_lcd_update)
|
|
2624
|
+ {
|
|
2625
|
+ lcd.setCursor(0,line);lcdprintPGM(MSG_FAN_SPEED);
|
|
2626
|
+ lcd.setCursor(13,line);lcd.print(ftostr3(plaPreheatFanSpeed));
|
|
2627
|
+ }
|
|
2628
|
+
|
|
2629
|
+ if((activeline!=line) )
|
|
2630
|
+ break;
|
|
2631
|
+
|
|
2632
|
+ if(CLICKED)
|
|
2633
|
+ {
|
|
2634
|
+ linechanging=!linechanging;
|
|
2635
|
+ if(linechanging)
|
|
2636
|
+ {
|
|
2637
|
+ encoderpos=plaPreheatFanSpeed;
|
|
2638
|
+ }
|
|
2639
|
+ else
|
|
2640
|
+ {
|
|
2641
|
+ encoderpos=activeline*lcdslow;
|
|
2642
|
+ beepshort();
|
|
2643
|
+ }
|
|
2644
|
+ BLOCK;
|
|
2645
|
+ }
|
|
2646
|
+ if(linechanging)
|
|
2647
|
+ {
|
|
2648
|
+ if(encoderpos<0) encoderpos=0;
|
|
2649
|
+ if(encoderpos>255) encoderpos=255;
|
|
2650
|
+ plaPreheatFanSpeed=encoderpos;
|
|
2651
|
+ lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
|
|
2652
|
+ }
|
|
2653
|
+ }break;
|
2588
|
2654
|
|
|
2655
|
+ case ItemPLAPreHeat_set_nozzle:
|
|
2656
|
+ {
|
|
2657
|
+ if(force_lcd_update)
|
|
2658
|
+ {
|
|
2659
|
+ lcd.setCursor(0,line);lcdprintPGM(MSG_NOZZLE);
|
|
2660
|
+ lcd.setCursor(13,line);lcd.print(ftostr3(plaPreheatHotendTemp));
|
|
2661
|
+ }
|
|
2662
|
+
|
|
2663
|
+ if((activeline!=line) )
|
|
2664
|
+ break;
|
|
2665
|
+
|
|
2666
|
+ if(CLICKED)
|
|
2667
|
+ {
|
|
2668
|
+ linechanging=!linechanging;
|
|
2669
|
+ if(linechanging)
|
|
2670
|
+ {
|
|
2671
|
+ encoderpos=plaPreheatHotendTemp;
|
|
2672
|
+ }
|
|
2673
|
+ else
|
|
2674
|
+ {
|
|
2675
|
+ encoderpos=activeline*lcdslow;
|
|
2676
|
+ beepshort();
|
|
2677
|
+ }
|
|
2678
|
+ BLOCK;
|
|
2679
|
+ }
|
|
2680
|
+ if(linechanging)
|
|
2681
|
+ {
|
|
2682
|
+ if(encoderpos<0) encoderpos=0;
|
|
2683
|
+ if(encoderpos>260) encoderpos=260;
|
|
2684
|
+ plaPreheatHotendTemp = encoderpos;
|
|
2685
|
+ lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
|
|
2686
|
+ }
|
|
2687
|
+ }break;
|
2589
|
2688
|
|
|
2689
|
+ case ItemPLAPreHeat_set_HPB:
|
|
2690
|
+ {
|
|
2691
|
+ if(force_lcd_update)
|
|
2692
|
+ {
|
|
2693
|
+ lcd.setCursor(0,line);lcdprintPGM(MSG_BED);
|
|
2694
|
+ lcd.setCursor(13,line);lcd.print(ftostr3(plaPreheatHPBTemp));
|
|
2695
|
+ }
|
|
2696
|
+
|
|
2697
|
+ if((activeline!=line) )
|
|
2698
|
+ break;
|
|
2699
|
+
|
|
2700
|
+ if(CLICKED)
|
|
2701
|
+ {
|
|
2702
|
+ linechanging=!linechanging;
|
|
2703
|
+ if(linechanging)
|
|
2704
|
+ {
|
|
2705
|
+ encoderpos=plaPreheatHPBTemp;
|
|
2706
|
+ }
|
|
2707
|
+ else
|
|
2708
|
+ {
|
|
2709
|
+ encoderpos=activeline*lcdslow;
|
|
2710
|
+ beepshort();
|
|
2711
|
+ }
|
|
2712
|
+ BLOCK;
|
|
2713
|
+ }
|
|
2714
|
+ if(linechanging)
|
|
2715
|
+ {
|
|
2716
|
+ if(encoderpos<0) encoderpos=0;
|
|
2717
|
+ if(encoderpos>250) encoderpos=150;
|
|
2718
|
+ plaPreheatHPBTemp = encoderpos;
|
|
2719
|
+ lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
|
|
2720
|
+ }
|
|
2721
|
+ }break;
|
|
2722
|
+ case ItemPLAPreHeat_Store_Eprom:
|
|
2723
|
+ {
|
|
2724
|
+ if(force_lcd_update)
|
|
2725
|
+ {
|
|
2726
|
+ lcd.setCursor(0,line);lcdprintPGM(MSG_STORE_EPROM);
|
|
2727
|
+ }
|
|
2728
|
+ if((activeline==line) && CLICKED)
|
|
2729
|
+ {
|
|
2730
|
+ //enquecommand("M84");
|
|
2731
|
+ beepshort();
|
|
2732
|
+ BLOCK;
|
|
2733
|
+ EEPROM_StoreSettings();
|
|
2734
|
+ }
|
|
2735
|
+ }break;
|
|
2736
|
+ default:
|
|
2737
|
+ break;
|
|
2738
|
+ }
|
|
2739
|
+ line++;
|
|
2740
|
+ }
|
|
2741
|
+ updateActiveLines(ItemPLAPreHeat_Store_Eprom,encoderpos);
|
|
2742
|
+#endif
|
|
2743
|
+}
|
|
2744
|
+
|
|
2745
|
+enum {
|
|
2746
|
+ ItemABSPreHeat_Exit,
|
|
2747
|
+ ItemABSPreHeat_set_FanSpeed,
|
|
2748
|
+ ItemABSPreHeat_set_nozzle,
|
|
2749
|
+ ItemABSPreHeat_set_HPB,
|
|
2750
|
+ ItemABSPreHeat_Store_Eprom
|
|
2751
|
+ };
|
|
2752
|
+
|
|
2753
|
+void MainMenu::showABSsettings()
|
|
2754
|
+{
|
|
2755
|
+#ifdef ULTIPANEL
|
|
2756
|
+ uint8_t line=0;
|
|
2757
|
+ clearIfNecessary();
|
|
2758
|
+ for(int8_t i=lineoffset;i<lineoffset+LCD_HEIGHT;i++)
|
|
2759
|
+ {
|
|
2760
|
+ switch(i)
|
|
2761
|
+ {
|
|
2762
|
+
|
|
2763
|
+ case ItemABSPreHeat_Exit:
|
|
2764
|
+ MENUITEM( lcdprintPGM(MSG_TEMPERATURE_RTN) , BLOCK;status=Sub_TempControl;beepshort(); ) ;
|
|
2765
|
+ break;
|
|
2766
|
+
|
|
2767
|
+ case ItemABSPreHeat_set_FanSpeed:
|
|
2768
|
+ {
|
|
2769
|
+ if(force_lcd_update)
|
|
2770
|
+ {
|
|
2771
|
+ lcd.setCursor(0,line);lcdprintPGM(MSG_FAN_SPEED);
|
|
2772
|
+ lcd.setCursor(13,line);lcd.print(ftostr3(absPreheatFanSpeed));
|
|
2773
|
+ }
|
|
2774
|
+
|
|
2775
|
+ if((activeline!=line) )
|
|
2776
|
+ break;
|
|
2777
|
+
|
|
2778
|
+ if(CLICKED)
|
|
2779
|
+ {
|
|
2780
|
+ linechanging=!linechanging;
|
|
2781
|
+ if(linechanging)
|
|
2782
|
+ {
|
|
2783
|
+ encoderpos=absPreheatFanSpeed;
|
|
2784
|
+ }
|
|
2785
|
+ else
|
|
2786
|
+ {
|
|
2787
|
+ encoderpos=activeline*lcdslow;
|
|
2788
|
+ beepshort();
|
|
2789
|
+ }
|
|
2790
|
+ BLOCK;
|
|
2791
|
+ }
|
|
2792
|
+ if(linechanging)
|
|
2793
|
+ {
|
|
2794
|
+ if(encoderpos<0) encoderpos=0;
|
|
2795
|
+ if(encoderpos>255) encoderpos=255;
|
|
2796
|
+ absPreheatFanSpeed=encoderpos;
|
|
2797
|
+ lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
|
|
2798
|
+ }
|
|
2799
|
+ }break;
|
|
2800
|
+
|
|
2801
|
+ case ItemABSPreHeat_set_nozzle:
|
|
2802
|
+ {
|
|
2803
|
+ if(force_lcd_update)
|
|
2804
|
+ {
|
|
2805
|
+ lcd.setCursor(0,line);lcdprintPGM(MSG_NOZZLE);
|
|
2806
|
+ lcd.setCursor(13,line);lcd.print(ftostr3(absPreheatHotendTemp));
|
|
2807
|
+ }
|
|
2808
|
+
|
|
2809
|
+ if((activeline!=line) )
|
|
2810
|
+ break;
|
|
2811
|
+
|
|
2812
|
+ if(CLICKED)
|
|
2813
|
+ {
|
|
2814
|
+ linechanging=!linechanging;
|
|
2815
|
+ if(linechanging)
|
|
2816
|
+ {
|
|
2817
|
+ encoderpos=absPreheatHotendTemp;
|
|
2818
|
+ }
|
|
2819
|
+ else
|
|
2820
|
+ {
|
|
2821
|
+ encoderpos=activeline*lcdslow;
|
|
2822
|
+ beepshort();
|
|
2823
|
+ }
|
|
2824
|
+ BLOCK;
|
|
2825
|
+ }
|
|
2826
|
+ if(linechanging)
|
|
2827
|
+ {
|
|
2828
|
+ if(encoderpos<0) encoderpos=0;
|
|
2829
|
+ if(encoderpos>260) encoderpos=260;
|
|
2830
|
+ absPreheatHotendTemp = encoderpos;
|
|
2831
|
+ lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
|
|
2832
|
+ }
|
|
2833
|
+ }break;
|
|
2834
|
+
|
|
2835
|
+ case ItemABSPreHeat_set_HPB:
|
|
2836
|
+ {
|
|
2837
|
+ if(force_lcd_update)
|
|
2838
|
+ {
|
|
2839
|
+ lcd.setCursor(0,line);lcdprintPGM(MSG_BED);
|
|
2840
|
+ lcd.setCursor(13,line);lcd.print(ftostr3(absPreheatHPBTemp));
|
|
2841
|
+ }
|
|
2842
|
+
|
|
2843
|
+ if((activeline!=line) )
|
|
2844
|
+ break;
|
|
2845
|
+
|
|
2846
|
+ if(CLICKED)
|
|
2847
|
+ {
|
|
2848
|
+ linechanging=!linechanging;
|
|
2849
|
+ if(linechanging)
|
|
2850
|
+ {
|
|
2851
|
+ encoderpos=absPreheatHPBTemp;
|
|
2852
|
+ }
|
|
2853
|
+ else
|
|
2854
|
+ {
|
|
2855
|
+ encoderpos=activeline*lcdslow;
|
|
2856
|
+ beepshort();
|
|
2857
|
+ }
|
|
2858
|
+ BLOCK;
|
|
2859
|
+ }
|
|
2860
|
+ if(linechanging)
|
|
2861
|
+ {
|
|
2862
|
+ if(encoderpos<0) encoderpos=0;
|
|
2863
|
+ if(encoderpos>250) encoderpos=150;
|
|
2864
|
+ absPreheatHPBTemp = encoderpos;
|
|
2865
|
+ lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
|
|
2866
|
+ }
|
|
2867
|
+ }break;
|
|
2868
|
+ case ItemABSPreHeat_Store_Eprom:
|
|
2869
|
+ {
|
|
2870
|
+ if(force_lcd_update)
|
|
2871
|
+ {
|
|
2872
|
+ lcd.setCursor(0,line);lcdprintPGM(MSG_STORE_EPROM);
|
|
2873
|
+ }
|
|
2874
|
+ if((activeline==line) && CLICKED)
|
|
2875
|
+ {
|
|
2876
|
+ //enquecommand("M84");
|
|
2877
|
+ beepshort();
|
|
2878
|
+ BLOCK;
|
|
2879
|
+ EEPROM_StoreSettings();
|
|
2880
|
+ }
|
|
2881
|
+ }break;
|
|
2882
|
+ default:
|
|
2883
|
+ break;
|
|
2884
|
+ }
|
|
2885
|
+ line++;
|
|
2886
|
+ }
|
|
2887
|
+ updateActiveLines(ItemABSPreHeat_Store_Eprom,encoderpos);
|
|
2888
|
+#endif
|
|
2889
|
+}
|
2590
|
2890
|
|
|
2891
|
+//**********************************************************************************************************
|
2591
|
2892
|
// convert float to string with +123.4 format
|
2592
|
2893
|
char *ftostr3(const float &x)
|
2593
|
2894
|
{
|