Erik van der Zalm 12 years ago
parent
commit
5113513cb2
3 changed files with 35 additions and 30 deletions
  1. 17
    0
      Marlin/Configuration_adv.h
  2. 13
    29
      Marlin/Marlin.pde
  3. 5
    1
      README.md

+ 17
- 0
Marlin/Configuration_adv.h View File

204
 #if TEMP_SENSOR_0 == -2
204
 #if TEMP_SENSOR_0 == -2
205
   #define HEATER_0_USES_MAX6675
205
   #define HEATER_0_USES_MAX6675
206
 #endif
206
 #endif
207
+#if TEMP_SENSOR_0 == 0
208
+  #undef HEATER_0_MINTEMP
209
+  #undef HEATER_0_MAXTEMP
210
+#endif
211
+#if TEMP_SENSOR_1 == 0
212
+  #undef HEATER_1_MINTEMP
213
+  #undef HEATER_1_MAXTEMP
214
+#endif
215
+#if TEMP_SENSOR_2 == 0
216
+  #undef HEATER_2_MINTEMP
217
+  #undef HEATER_2_MAXTEMP
218
+#endif
219
+#if TEMP_SENSOR_BED == 0
220
+  #undef BED_MINTEMP
221
+  #undef BED_MAXTEMP
222
+#endif
223
+
207
 
224
 
208
 #endif //__CONFIGURATION_ADV_H
225
 #endif //__CONFIGURATION_ADV_H

+ 13
- 29
Marlin/Marlin.pde View File

27
 
27
 
28
 #include "Marlin.h"
28
 #include "Marlin.h"
29
 
29
 
30
-
31
-
32
 #include "ultralcd.h"
30
 #include "ultralcd.h"
33
 #include "planner.h"
31
 #include "planner.h"
34
 #include "stepper.h"
32
 #include "stepper.h"
38
 #include "watchdog.h"
36
 #include "watchdog.h"
39
 #include "EEPROMwrite.h"
37
 #include "EEPROMwrite.h"
40
 
38
 
41
-
42
-
43
-#define VERSION_STRING  "1.0.0 Beta 1"
44
-
45
-
46
-
39
+#define VERSION_STRING  "1.0.0 RC1"
47
 
40
 
48
 // look here for descriptions of gcodes: http://linuxcnc.org/handbook/gcode/g-code.html
41
 // look here for descriptions of gcodes: http://linuxcnc.org/handbook/gcode/g-code.html
49
 // http://objects.reprap.org/wiki/Mendel_User_Manual:_RepRapGCodes
42
 // http://objects.reprap.org/wiki/Mendel_User_Manual:_RepRapGCodes
147
 static float feedrate = 1500.0, next_feedrate, saved_feedrate;
140
 static float feedrate = 1500.0, next_feedrate, saved_feedrate;
148
 static long gcode_N, gcode_LastN;
141
 static long gcode_N, gcode_LastN;
149
 
142
 
150
-
151
-
152
 static bool relative_mode = false;  //Determines Absolute or Relative Coordinates
143
 static bool relative_mode = false;  //Determines Absolute or Relative Coordinates
153
 static bool relative_mode_e = false;  //Determines Absolute or Relative E Codes while in Absolute Coordinates mode. E is always relative in Relative Coordinates mode.
144
 static bool relative_mode_e = false;  //Determines Absolute or Relative E Codes while in Absolute Coordinates mode. E is always relative in Relative Coordinates mode.
154
 
145
 
155
 static uint8_t fanpwm=0;
146
 static uint8_t fanpwm=0;
156
 
147
 
157
-
158
-
159
 static char cmdbuffer[BUFSIZE][MAX_CMD_SIZE];
148
 static char cmdbuffer[BUFSIZE][MAX_CMD_SIZE];
160
 static bool fromsd[BUFSIZE];
149
 static bool fromsd[BUFSIZE];
161
 static int bufindr = 0;
150
 static int bufindr = 0;
224
     buflen += 1;
213
     buflen += 1;
225
   }
214
   }
226
 }
215
 }
216
+
227
 void setup_photpin()
217
 void setup_photpin()
228
 {
218
 {
229
   #ifdef PHOTOGRAPH_PIN
219
   #ifdef PHOTOGRAPH_PIN
254
   #endif
244
   #endif
255
 }
245
 }
256
 
246
 
257
-long millis_diff(unsigned long starttime) {
258
-  unsigned long difftime = millis() - starttime;
259
-  if (difftime > 0x8000) difftime += 0x8000;
260
-  return difftime;
261
-}
262
-
263
 void setup()
247
 void setup()
264
 { 
248
 { 
265
   setup_powerhold();
249
   setup_powerhold();
332
   LCD_STATUS;
316
   LCD_STATUS;
333
 }
317
 }
334
 
318
 
335
-
336
 void get_command() 
319
 void get_command() 
337
 { 
320
 { 
338
   while( MSerial.available() > 0  && buflen < BUFSIZE) {
321
   while( MSerial.available() > 0  && buflen < BUFSIZE) {
556
       if(code_seen('S')) codenum = code_value() * 1000; // seconds to wait
539
       if(code_seen('S')) codenum = code_value() * 1000; // seconds to wait
557
       
540
       
558
       st_synchronize();
541
       st_synchronize();
559
-//      codenum += millis();  // keep track of when we started waiting
542
+      codenum += millis();  // keep track of when we started waiting
560
       previous_millis_cmd = millis();
543
       previous_millis_cmd = millis();
561
-      while(millis_diff(previous_millis_cmd)  < codenum ){
544
+      while(millis()  < codenum ){
562
         manage_heater();
545
         manage_heater();
563
       }
546
       }
564
       break;
547
       break;
795
       #if (TEMP_0_PIN > -1)
778
       #if (TEMP_0_PIN > -1)
796
         SERIAL_PROTOCOLPGM("ok T:");
779
         SERIAL_PROTOCOLPGM("ok T:");
797
         SERIAL_PROTOCOL(degHotend(tmp_extruder)); 
780
         SERIAL_PROTOCOL(degHotend(tmp_extruder)); 
798
-        #if TEMP_BED_PIN > -1 
781
+        #if TEMP_BED_PIN > -1
799
           SERIAL_PROTOCOLPGM(" B:");  
782
           SERIAL_PROTOCOLPGM(" B:");  
800
           SERIAL_PROTOCOL(degBed());
783
           SERIAL_PROTOCOL(degBed());
801
         #endif //TEMP_BED_PIN
784
         #endif //TEMP_BED_PIN
849
         /* continue to loop until we have reached the target temp   
832
         /* continue to loop until we have reached the target temp   
850
           _and_ until TEMP_RESIDENCY_TIME hasn't passed since we reached it */
833
           _and_ until TEMP_RESIDENCY_TIME hasn't passed since we reached it */
851
         while((residencyStart == -1) ||
834
         while((residencyStart == -1) ||
852
-              (residencyStart > -1 && (millis_diff(residencyStart) < TEMP_RESIDENCY_TIME*1000) )) {
835
+              (residencyStart > -1 && (millis() - residencyStart) < TEMP_RESIDENCY_TIME*1000) ) {
853
       #else
836
       #else
854
         while ( target_direction ? (isHeatingHotend(tmp_extruder)) : (isCoolingHotend(tmp_extruder)&&(CooldownNoWait==false)) ) {
837
         while ( target_direction ? (isHeatingHotend(tmp_extruder)) : (isCoolingHotend(tmp_extruder)&&(CooldownNoWait==false)) ) {
855
       #endif //TEMP_RESIDENCY_TIME
838
       #endif //TEMP_RESIDENCY_TIME
856
-          if(millis_diff(codenum) > 1000 ) 
839
+          if((millis() - codenum) > 1000 ) 
857
           { //Print Temp Reading and remaining time every 1 second while heating up/cooling down
840
           { //Print Temp Reading and remaining time every 1 second while heating up/cooling down
858
             SERIAL_PROTOCOLPGM("T:");
841
             SERIAL_PROTOCOLPGM("T:");
859
             SERIAL_PROTOCOL( degHotend(tmp_extruder) ); 
842
             SERIAL_PROTOCOL( degHotend(tmp_extruder) ); 
863
               SERIAL_PROTOCOLPGM(" W:");
846
               SERIAL_PROTOCOLPGM(" W:");
864
               if(residencyStart > -1)
847
               if(residencyStart > -1)
865
               {
848
               {
866
-                 codenum = TEMP_RESIDENCY_TIME - (millis_diff(residencyStart) / 1000);
849
+                 codenum = TEMP_RESIDENCY_TIME - ((millis() - residencyStart) / 1000);
867
                  SERIAL_PROTOCOLLN( codenum );
850
                  SERIAL_PROTOCOLLN( codenum );
868
               }
851
               }
869
               else 
852
               else 
901
         codenum = millis(); 
884
         codenum = millis(); 
902
         while(isHeatingBed()) 
885
         while(isHeatingBed()) 
903
         {
886
         {
904
-          if( millis_diff(codenum) > 1000 ) //Print Temp Reading every 1 second while heating up.
887
+          if(( millis() - codenum) > 1000 ) //Print Temp Reading every 1 second while heating up.
905
           {
888
           {
906
             float tt=degHotend(active_extruder);
889
             float tt=degHotend(active_extruder);
907
             SERIAL_PROTOCOLPGM("T:");
890
             SERIAL_PROTOCOLPGM("T:");
971
         bool all_axis = !((code_seen(axis_codes[0])) || (code_seen(axis_codes[1])) || (code_seen(axis_codes[2]))|| (code_seen(axis_codes[3])));
954
         bool all_axis = !((code_seen(axis_codes[0])) || (code_seen(axis_codes[1])) || (code_seen(axis_codes[2]))|| (code_seen(axis_codes[3])));
972
         if(all_axis)
955
         if(all_axis)
973
         {
956
         {
957
+          st_synchronize();
974
           disable_e0();
958
           disable_e0();
975
           disable_e1();
959
           disable_e1();
976
           disable_e2();
960
           disable_e2();
1299
 
1283
 
1300
 void manage_inactivity(byte debug) 
1284
 void manage_inactivity(byte debug) 
1301
 { 
1285
 { 
1302
-  if( millis_diff(previous_millis_cmd) >  max_inactive_time ) 
1286
+  if( (millis() - previous_millis_cmd) >  max_inactive_time ) 
1303
     if(max_inactive_time) 
1287
     if(max_inactive_time) 
1304
       kill(); 
1288
       kill(); 
1305
   if(stepper_inactive_time)  
1289
   if(stepper_inactive_time)  
1306
-  if( millis_diff(last_stepperdisabled_time) >  stepper_inactive_time ) 
1290
+  if( (millis() - last_stepperdisabled_time) >  stepper_inactive_time ) 
1307
   {
1291
   {
1308
     if(previous_millis_cmd>last_stepperdisabled_time)
1292
     if(previous_millis_cmd>last_stepperdisabled_time)
1309
       last_stepperdisabled_time=previous_millis_cmd;
1293
       last_stepperdisabled_time=previous_millis_cmd;
1315
     }
1299
     }
1316
   }
1300
   }
1317
   #ifdef EXTRUDER_RUNOUT_PREVENT
1301
   #ifdef EXTRUDER_RUNOUT_PREVENT
1318
-    if( millis_diff(previous_millis_cmd) >  EXTRUDER_RUNOUT_SECONDS*1000 ) 
1302
+    if( (millis() - previous_millis_cmd) >  EXTRUDER_RUNOUT_SECONDS*1000 ) 
1319
     if(degHotend(active_extruder)>EXTRUDER_RUNOUT_MINTEMP)
1303
     if(degHotend(active_extruder)>EXTRUDER_RUNOUT_MINTEMP)
1320
     {
1304
     {
1321
      bool oldstatus=READ(E0_ENABLE_PIN);
1305
      bool oldstatus=READ(E0_ENABLE_PIN);

+ 5
- 1
README.md View File

1
 WARNING: 
1
 WARNING: 
2
 --------
2
 --------
3
-THIS IS THE BETA 1 FOR MARLIN 1.0.0
3
+THIS IS RELEASE CANDIDATE 1 FOR MARLIN 1.0.0
4
+
5
+The configuration is now split in two files
6
+Configuration.h for the normal settings
7
+Configuration_adv.h for the advanced settings
4
 
8
 
5
 Quick Information
9
 Quick Information
6
 ===================
10
 ===================

Loading…
Cancel
Save