From 0995eaa492feffee821fc7a26fa7477dfb5abe97 Mon Sep 17 00:00:00 2001 From: Bas Spaans Date: Wed, 30 Jan 2013 22:12:47 +0100 Subject: [PATCH 1/5] Chenged LED_PIN for Melzi boards, added comment about broken versions of the Sanguino libraries --- Marlin/pins.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/pins.h b/Marlin/pins.h index 1bbc65d1b..a628a9aa4 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -683,7 +683,7 @@ #endif #ifdef MELZI -#define LED_PIN 28 +#define LED_PIN 27 /* On some broken versions of the Sanguino libraries the pin definitions are wrong, which then needs LED_PIN as pin 27. But you better upgrade your Sanguino libraries! See #368. */ #define FAN_PIN 4 #endif From 12c41423ad2d6e2c9ab10fe24261ee210fb98de7 Mon Sep 17 00:00:00 2001 From: Bas Spaans Date: Wed, 30 Jan 2013 22:54:04 +0100 Subject: [PATCH 2/5] Fixed typo in comment --- Marlin/pins.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/pins.h b/Marlin/pins.h index a628a9aa4..41aae2e22 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -683,7 +683,7 @@ #endif #ifdef MELZI -#define LED_PIN 27 /* On some broken versions of the Sanguino libraries the pin definitions are wrong, which then needs LED_PIN as pin 27. But you better upgrade your Sanguino libraries! See #368. */ +#define LED_PIN 27 /* On some broken versions of the Sanguino libraries the pin definitions are wrong, which then needs LED_PIN as pin 28. But you better upgrade your Sanguino libraries! See #368. */ #define FAN_PIN 4 #endif From 01541ee64ca1239c9bfa593c54085ae78e0b78ec Mon Sep 17 00:00:00 2001 From: Bas Spaans Date: Thu, 31 Jan 2013 18:00:25 +0100 Subject: [PATCH 3/5] Extended comment explaining M42 usage --- Marlin/Marlin_main.cpp | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 473d205e9..1f2f34646 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -88,7 +88,7 @@ // M29 - Stop SD write // M30 - Delete file from SD (M30 filename.g) // M31 - Output time since last M109 or SD card start to serial -// M42 - Change pin status via gcode +// M42 - Change pin status via gcode. Use M42 Px Sy to set pin x to value y, when omitting Px the onboard led will be used. // M80 - Turn on Power Supply // M81 - Turn off Power Supply // M82 - Set E codes absolute (default) @@ -124,7 +124,8 @@ // M500 - stores paramters in EEPROM // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). // M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// M503 - print the current settings (from memory not from eeprom) +// M503 - print the current settings (from memory not from eeprom) + // M540 - Use S[0|1] to enable or disable the stop SD card print on endstop hit (requires ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) // M600 - Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal] // M907 - Set digital trimpot motor current using axis codes. @@ -958,7 +959,7 @@ void process_commands() autotempShutdown(); } break; - case 42: //M42 -Change pin status via gcode + case 42: //M42 -Change pin status via gcode if (code_seen('S')) { int pin_status = code_value(); @@ -1499,13 +1500,20 @@ void process_commands() { Config_PrintSettings(); } - break; - #ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - case 540: - { - if(code_seen('S')) abort_on_endstop_hit = code_value() > 0; - } - break; + break; + + #ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + + case 540: + + { + + if(code_seen('S')) abort_on_endstop_hit = code_value() > 0; + + } + + break; + #endif #ifdef FILAMENTCHANGEENABLE case 600: //Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal] From 00fed0a7038bbd7acaf7808ffbcd616ec154d963 Mon Sep 17 00:00:00 2001 From: Bas Spaans Date: Thu, 31 Jan 2013 18:11:13 +0100 Subject: [PATCH 4/5] Revert "Extended comment explaining M42 usage" This reverts commit 01541ee64ca1239c9bfa593c54085ae78e0b78ec. --- Marlin/Marlin_main.cpp | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 1f2f34646..473d205e9 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -88,7 +88,7 @@ // M29 - Stop SD write // M30 - Delete file from SD (M30 filename.g) // M31 - Output time since last M109 or SD card start to serial -// M42 - Change pin status via gcode. Use M42 Px Sy to set pin x to value y, when omitting Px the onboard led will be used. +// M42 - Change pin status via gcode // M80 - Turn on Power Supply // M81 - Turn off Power Supply // M82 - Set E codes absolute (default) @@ -124,8 +124,7 @@ // M500 - stores paramters in EEPROM // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). // M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// M503 - print the current settings (from memory not from eeprom) - +// M503 - print the current settings (from memory not from eeprom) // M540 - Use S[0|1] to enable or disable the stop SD card print on endstop hit (requires ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) // M600 - Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal] // M907 - Set digital trimpot motor current using axis codes. @@ -959,7 +958,7 @@ void process_commands() autotempShutdown(); } break; - case 42: //M42 -Change pin status via gcode + case 42: //M42 -Change pin status via gcode if (code_seen('S')) { int pin_status = code_value(); @@ -1500,20 +1499,13 @@ void process_commands() { Config_PrintSettings(); } - break; - - #ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - - case 540: - - { - - if(code_seen('S')) abort_on_endstop_hit = code_value() > 0; - - } - - break; - + break; + #ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + case 540: + { + if(code_seen('S')) abort_on_endstop_hit = code_value() > 0; + } + break; #endif #ifdef FILAMENTCHANGEENABLE case 600: //Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal] From 19ce90fe02c15060724f5640dd0bb4ca6b8b6887 Mon Sep 17 00:00:00 2001 From: Bas Spaans Date: Thu, 31 Jan 2013 18:20:23 +0100 Subject: [PATCH 5/5] Added comment about M42 usage (clean) --- Marlin/Marlin_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 473d205e9..39efdf454 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -88,7 +88,7 @@ // M29 - Stop SD write // M30 - Delete file from SD (M30 filename.g) // M31 - Output time since last M109 or SD card start to serial -// M42 - Change pin status via gcode +// M42 - Change pin status via gcode Use M42 Px Sy to set pin x to value y, when omitting Px the onboard led will be used. // M80 - Turn on Power Supply // M81 - Turn off Power Supply // M82 - Set E codes absolute (default)