Przeglądaj źródła

Merge remote-tracking branch 'origin/Marlin_v1' into Marlin_v1

Conflicts:
	Marlin/Configuration.h
	Marlin/Marlin.pde
Erik van der Zalm 13 lat temu
rodzic
commit
e63e224a33

+ 3
- 2
Marlin/Configuration.h Wyświetl plik

@@ -58,7 +58,6 @@
58 58
 //#define BED_USES_THERMISTOR
59 59
 //#define BED_USES_AD595
60 60
 
61
-#define HEATER_CHECK_INTERVAL 50 //ms
62 61
 #define BED_CHECK_INTERVAL 5000 //ms
63 62
 
64 63
 //// Experimental watchdog and minimal temp
@@ -243,10 +242,12 @@ const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the
243 242
 // The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature
244 243
 // this enables the watchdog interrupt.
245 244
 //#define USE_WATCHDOG
246
-// you cannot reboot on a mega2560 due to a bug in he bootloader. Hence, you have to reset manually, and this is done hereby:
245
+#ifdef USE_WATCHDOG
246
+  // you cannot reboot on a mega2560 due to a bug in he bootloader. Hence, you have to reset manually, and this is done hereby:
247 247
 //#define RESET_MANUAL
248 248
 //#define WATCHDOG_TIMEOUT 4  //seconds
249 249
 
250
+
250 251
 // extruder advance constant (s2/mm3)
251 252
 //
252 253
 // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTUDER_ADVANCE_K * cubic mm per second ^ 2

+ 1
- 1
Marlin/Marlin.h Wyświetl plik

@@ -100,7 +100,7 @@ void prepare_move();
100 100
 void kill();
101 101
 
102 102
 void enquecommand(const char *cmd); //put an ascii command at the end of the current buffer.
103
-
103
+void prepare_arc_move(char isclockwise);
104 104
 
105 105
 #ifndef CRITICAL_SECTION_START
106 106
   #define CRITICAL_SECTION_START  unsigned char _sreg = SREG; cli();

+ 10
- 1
Marlin/Marlin.pde Wyświetl plik

@@ -37,6 +37,7 @@
37 37
 #include "temperature.h"
38 38
 #include "motion_control.h"
39 39
 #include "cardreader.h"
40
+#include "watchdog.h"
40 41
 
41 42
 
42 43
 #define VERSION_STRING  "1.0.0 Alpha 1"
@@ -193,6 +194,12 @@ extern "C"{
193 194
 }
194 195
 
195 196
 
197
+
198
+
199
+
200
+
201
+
202
+
196 203
 //adds an command to the main command buffer
197 204
 //thats really done in a non-safe way.
198 205
 //needs overworking someday
@@ -235,6 +242,7 @@ void setup()
235 242
   tp_init();    // Initialize temperature loop 
236 243
   plan_init();  // Initialize planner;
237 244
   st_init();    // Initialize stepper;
245
+  wd_init();
238 246
 }
239 247
 
240 248
 
@@ -659,7 +667,8 @@ inline void process_commands()
659 667
       break;
660 668
     case 105: // M105
661 669
       //SERIAL_ECHOLN(freeMemory());
662
-          
670
+       //test watchdog:
671
+       //delay(20000);
663 672
       #if (TEMP_0_PIN > -1) || defined (HEATER_USES_AD595)
664 673
         SERIAL_PROTOCOLPGM("ok T:");
665 674
         SERIAL_PROTOCOL( degHotend0()); 

+ 1
- 0
Marlin/cardreader.h Wyświetl plik

@@ -33,6 +33,7 @@ public:
33 33
   inline bool eof() { return sdpos>=filesize ;};
34 34
   inline int16_t get() {  sdpos = file.curPosition();return (int16_t)file.read();};
35 35
   inline void setIndex(long index) {sdpos = index;file.seekSet(index);};
36
+  inline uint8_t percentDone(){if(!sdprinting) return 0; if(filesize) return sdpos*100/filesize; else return 0;};
36 37
 
37 38
 public:
38 39
   bool saving;

+ 2
- 2
Marlin/ultralcd.h Wyświetl plik

@@ -97,7 +97,7 @@
97 97
   #define BLOCK ;
98 98
 #endif 
99 99
   
100
-  
100
+void lcd_statuspgm(const char* message);
101 101
   
102 102
 #endif //ULTRALCD
103
-
103
+

+ 23
- 12
Marlin/ultralcd.pde Wyświetl plik

@@ -374,6 +374,17 @@ void MainMenu::showStatus()
374 374
     lcd.print(fillto(LCD_WIDTH,messagetext));
375 375
     messagetext[0]='\0';
376 376
   }
377
+  
378
+  static uint8_t oldpercent=101;
379
+  uint8_t percent=card.percentDone();
380
+  if(oldpercent!=percent ||force_lcd_update)
381
+  {
382
+     lcd.setCursor(7,2);
383
+    lcd.print(itostr3((int)percent));
384
+    lcdprintPGM("%SD");
385
+    
386
+  }
387
+  
377 388
 #else //smaller LCDS----------------------------------
378 389
   static int olddegHotEnd0=-1;
379 390
   static int oldtargetHotEnd0=-1;
@@ -686,7 +697,7 @@ void MainMenu::showControl()
686 697
       if(force_lcd_update)
687 698
         {
688 699
           lcd.setCursor(0,line);lcdprintPGM(" Vxy-jerk: ");
689
-          lcd.setCursor(13,line);lcd.print(itostr3(max_xy_jerk/60));
700
+          lcd.setCursor(13,line);lcd.print(itostr3(max_xy_jerk));
690 701
         }
691 702
         
692 703
         if((activeline==line) )
@@ -696,11 +707,11 @@ void MainMenu::showControl()
696 707
             linechanging=!linechanging;
697 708
             if(linechanging)
698 709
             {
699
-               encoderpos=(int)max_xy_jerk/60;
710
+               encoderpos=(int)max_xy_jerk;
700 711
             }
701 712
             else
702 713
             {
703
-              max_xy_jerk= encoderpos*60;
714
+              max_xy_jerk= encoderpos;
704 715
               encoderpos=activeline*lcdslow;
705 716
                 
706 717
             }
@@ -866,7 +877,7 @@ void MainMenu::showControl()
866 877
           if(i==ItemC_vmaxy)lcdprintPGM("y:");
867 878
           if(i==ItemC_vmaxz)lcdprintPGM("z:");
868 879
           if(i==ItemC_vmaxe)lcdprintPGM("e:");
869
-          lcd.setCursor(13,line);lcd.print(itostr3(max_feedrate[i-ItemC_vmaxx]/60));
880
+          lcd.setCursor(13,line);lcd.print(itostr3(max_feedrate[i-ItemC_vmaxx]));
870 881
         }
871 882
         
872 883
         if((activeline==line) )
@@ -876,11 +887,11 @@ void MainMenu::showControl()
876 887
             linechanging=!linechanging;
877 888
             if(linechanging)
878 889
             {
879
-               encoderpos=(int)max_feedrate[i-ItemC_vmaxx]/60;
890
+               encoderpos=(int)max_feedrate[i-ItemC_vmaxx];
880 891
             }
881 892
             else
882 893
             {
883
-              max_feedrate[i-ItemC_vmaxx]= encoderpos*60;
894
+              max_feedrate[i-ItemC_vmaxx]= encoderpos;
884 895
               encoderpos=activeline*lcdslow;
885 896
                 
886 897
             }
@@ -901,7 +912,7 @@ void MainMenu::showControl()
901 912
       if(force_lcd_update)
902 913
         {
903 914
           lcd.setCursor(0,line);lcdprintPGM(" Vmin:");
904
-          lcd.setCursor(13,line);lcd.print(itostr3(minimumfeedrate/60));
915
+          lcd.setCursor(13,line);lcd.print(itostr3(minimumfeedrate));
905 916
         }
906 917
         
907 918
         if((activeline==line) )
@@ -911,11 +922,11 @@ void MainMenu::showControl()
911 922
             linechanging=!linechanging;
912 923
             if(linechanging)
913 924
             {
914
-               encoderpos=(int)(minimumfeedrate/60.);
925
+               encoderpos=(int)(minimumfeedrate);
915 926
             }
916 927
             else
917 928
             {
918
-              minimumfeedrate= encoderpos*60;
929
+              minimumfeedrate= encoderpos;
919 930
               encoderpos=activeline*lcdslow;
920 931
                 
921 932
             }
@@ -935,7 +946,7 @@ void MainMenu::showControl()
935 946
       if(force_lcd_update)
936 947
         {
937 948
           lcd.setCursor(0,line);lcdprintPGM(" VTrav min:");
938
-          lcd.setCursor(13,line);lcd.print(itostr3(mintravelfeedrate/60));
949
+          lcd.setCursor(13,line);lcd.print(itostr3(mintravelfeedrate));
939 950
         }
940 951
         
941 952
         if((activeline==line) )
@@ -945,11 +956,11 @@ void MainMenu::showControl()
945 956
             linechanging=!linechanging;
946 957
             if(linechanging)
947 958
             {
948
-               encoderpos=(int)mintravelfeedrate/60;
959
+               encoderpos=(int)mintravelfeedrate;
949 960
             }
950 961
             else
951 962
             {
952
-              mintravelfeedrate= encoderpos*60;
963
+              mintravelfeedrate= encoderpos;
953 964
               encoderpos=activeline*lcdslow;
954 965
                 
955 966
             }

+ 2
- 0
Marlin/watchdog.pde Wyświetl plik

@@ -42,10 +42,12 @@ ISR(WDT_vect)
42 42
  
43 43
     #ifdef RESET_MANUAL
44 44
       LCD_MESSAGEPGM("Please Reset!");
45
+      LCD_STATUS;
45 46
       SERIAL_ERROR_START;
46 47
       SERIAL_ERRORLNPGM("Something is wrong, please turn off the printer.");
47 48
     #else
48 49
       LCD_MESSAGEPGM("Timeout, resetting!");
50
+      LCD_STATUS;
49 51
     #endif 
50 52
     //disable watchdog, it will survife reboot.
51 53
     WDTCSR |= (1<<WDCE) | (1<<WDE);

Ładowanie…
Anuluj
Zapisz