diff options
author | blddk <michael.andresen@gmail.com> | 2012-07-07 19:15:48 +0300 |
---|---|---|
committer | blddk <michael.andresen@gmail.com> | 2012-07-07 19:15:48 +0300 |
commit | 982796f9f023ca158593a52348224ec3faf99a84 (patch) | |
tree | ba5a01ab1f6e62b555b351f85adfd56774087d0b | |
parent | dd2b9ef537d24252878e91d314bf298840f3eb20 (diff) |
Added chain of command so hotend wont be turned off before print is done.
-rw-r--r-- | Sprinter/Sprinter.pde | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/Sprinter/Sprinter.pde b/Sprinter/Sprinter.pde index cc0ed44..3620030 100644 --- a/Sprinter/Sprinter.pde +++ b/Sprinter/Sprinter.pde @@ -1421,6 +1421,9 @@ FORCE_INLINE void process_commands() case 42: //M42 -Change pin status via gcode if (code_seen('S')) { +#ifdef CHAIN_OF_COMMAND + st_synchronize(); // wait for all movements to finish +#endif int pin_status = code_value(); if (code_seen('P') && pin_status >= 0 && pin_status <= 255) { @@ -1444,6 +1447,9 @@ FORCE_INLINE void process_commands() } break; case 104: // M104 +#ifdef CHAIN_OF_COMMAND + st_synchronize(); // wait for all movements to finish +#endif if (code_seen('S')) target_raw = temp2analogh(target_temp = code_value()); #ifdef WATCHPERIOD if(target_raw > current_raw) @@ -1458,6 +1464,9 @@ FORCE_INLINE void process_commands() #endif break; case 140: // M140 set bed temp +#ifdef CHAIN_OF_COMMAND + st_synchronize(); // wait for all movements to finish +#endif #if TEMP_1_PIN > -1 || defined BED_USES_AD595 if (code_seen('S')) target_bed_raw = temp2analogBed(code_value()); #endif @@ -1500,6 +1509,9 @@ FORCE_INLINE void process_commands() return; //break; case 109: { // M109 - Wait for extruder heater to reach target. +#ifdef CHAIN_OF_COMMAND + st_synchronize(); // wait for all movements to finish +#endif if (code_seen('S')) target_raw = temp2analogh(target_temp = code_value()); #ifdef WATCHPERIOD if(target_raw>current_raw) @@ -1550,6 +1562,9 @@ FORCE_INLINE void process_commands() } break; case 190: // M190 - Wait for bed heater to reach target temperature. +#ifdef CHAIN_OF_COMMAND + st_synchronize(); // wait for all movements to finish +#endif #if TEMP_1_PIN > -1 if (code_seen('S')) target_bed_raw = temp2analogBed(code_value()); codenum = millis(); @@ -1573,6 +1588,9 @@ FORCE_INLINE void process_commands() break; #if FAN_PIN > -1 case 106: //M106 Fan On +#ifdef CHAIN_OF_COMMAND + st_synchronize(); // wait for all movements to finish +#endif if (code_seen('S')) { unsigned char l_fan_code_val = constrain(code_value(),0,255); @@ -1627,6 +1645,9 @@ FORCE_INLINE void process_commands() SET_OUTPUT(PS_ON_PIN); //GND break; case 81: // M81 - ATX Power Off +#ifdef CHAIN_OF_COMMAND + st_synchronize(); // wait for all movements to finish +#endif SET_INPUT(PS_ON_PIN); //Floating break; #endif @@ -3508,4 +3529,4 @@ void log_ulong_array(char* message, unsigned long value[], int array_lenght) { } Serial.println("}"); } -#endif +#endif
\ No newline at end of file |