From 5aa80e6c0521156cdbb6f765ba0ca47e8cb7dfe1 Mon Sep 17 00:00:00 2001 From: Erik de Bruijn Date: Tue, 8 May 2012 17:32:50 +0200 Subject: [PATCH 1/3] Made language.h more flexible. Automatically do the right defines based on MOTHERBOARD == 7 ? "Ultimaker" : "Mendel" --- Marlin/language.h | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/Marlin/language.h b/Marlin/language.h index 4747ce626e..f6180bc408 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -10,11 +10,20 @@ #define LANGUAGE_CHOICE 1 // Pick your language from the list above +#define PROTOCOL_VERSION "1.0" + +#ifdef MOTHERBOARD == 7 + #define MACHINE_NAME "Ultimaker" + #define FIRMWARE_URL "http://firmware.ultimaker.com" +#else + #define MACHINE_NAME "Mendel" + #define FIRMWARE_URL "http://www.mendel-parts.com" +#endif + #if LANGUAGE_CHOICE == 1 // LCD Menu Messages - - #define WELCOME_MSG "Printer Ready." + #define WELCOME_MSG MACHINE_NAME " Ready." #define MSG_SD_INSERTED "Card inserted" #define MSG_SD_REMOVED "Card removed" #define MSG_MAIN " Main \003" @@ -63,8 +72,8 @@ #define MSG_MAIN_WIDE " Main \003" #define MSG_TEMPERATURE_WIDE " Temperature \x7E" #define MSG_MOTION_WIDE " Motion \x7E" - #define MSG_STORE_EPROM " Store EPROM" - #define MSG_LOAD_EPROM " Load EPROM" + #define MSG_STORE_EPROM " Store memory" + #define MSG_LOAD_EPROM " Load memory" #define MSG_RESTORE_FAILSAFE " Restore Failsafe" #define MSG_REFRESH "\004Refresh" #define MSG_WATCH " Watch \003" @@ -76,7 +85,7 @@ #define MSG_CARD_MENU " Card Menu \x7E" #define MSG_NO_CARD " No Card" #define MSG_SERIAL_ERROR_MENU_STRUCTURE "Something is wrong in the MenuStructure." - #define MSG_DWELL "DWELL..." + #define MSG_DWELL "Sleep..." #define MSG_NO_MOVE "No move." #define MSG_PART_RELEASE "Partial Release" #define MSG_KILLED "KILLED. " @@ -94,7 +103,7 @@ #define MSG_BROWNOUT_RESET " Brown out Reset" #define MSG_WATCHDOG_RESET " Watchdog Reset" #define MSG_SOFTWARE_RESET " Software Reset" - #define MSG_MARLIN "Marlin: " + #define MSG_MARLIN "Marlin " #define MSG_AUTHOR " | Author: " #define MSG_CONFIGURATION_VER " Last Updated: " #define MSG_FREE_MEMORY " Free Memory: " @@ -116,7 +125,7 @@ #define MSG_HEATING_COMPLETE "Heating done." #define MSG_BED_HEATING "Bed Heating." #define MSG_BED_DONE "Bed done." - #define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:http://www.mendel-parts.com PROTOCOL_VERSION:1.0 MACHINE_TYPE:Mendel EXTRUDER_COUNT:1\n" + #define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:1\n" #define MSG_COUNT_X " Count X:" #define MSG_ERR_KILLED "Printer halted. kill() called !!" #define MSG_ERR_STOPPED "Printer stopped deu to errors. Fix the error and use M999 to restart!. (Temperature is reset. Set it before restarting)" @@ -157,7 +166,7 @@ // LCD Menu Messages - #define WELCOME_MSG "UltiMARLIN Ready." + #define WELCOME_MSG MACHINE_NAME " Ready." #define MSG_SD_INSERTED "Card inserted" #define MSG_SD_REMOVED "Card removed" @@ -263,7 +272,7 @@ #define MSG_HEATING_COMPLETE "Heating done." #define MSG_BED_HEATING "Bed Heating." #define MSG_BED_DONE "Bed done." - #define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:http://www.mendel-parts.com PROTOCOL_VERSION:1.0 MACHINE_TYPE:Mendel EXTRUDER_COUNT:1\n" + #define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:\n" #define MSG_COUNT_X " Count X:" #define MSG_ERR_KILLED "Printer halted. kill() called !!" #define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart!" From d88205d89da20ea8b84a3f57d461be08510948a7 Mon Sep 17 00:00:00 2001 From: Erik de Bruijn Date: Tue, 8 May 2012 17:18:31 +0200 Subject: [PATCH 2/3] Suggestion to improve (TODO), no actual code changed --- Marlin/ultralcd.pde | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Marlin/ultralcd.pde b/Marlin/ultralcd.pde index c6cd15bb04..f9eb19b19d 100644 --- a/Marlin/ultralcd.pde +++ b/Marlin/ultralcd.pde @@ -1,3 +1,5 @@ +#include "language.h" +#include "temperature.h" #include "ultralcd.h" #ifdef ULTRA_LCD #include "Marlin.h" @@ -708,6 +710,7 @@ void MainMenu::showAxisMove() } break; case ItemAM_E: + // ErikDB: TODO: this length should be changed for volumetric. MENUITEM( lcdprintPGM(MSG_EXTRUDE) , BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E5");beepshort(); ) ; break; default: From e3fe1f0d007e7306ac3b20bd99b3a7debbf91fcd Mon Sep 17 00:00:00 2001 From: Erik de Bruijn Date: Tue, 8 May 2012 17:27:45 +0200 Subject: [PATCH 3/3] =?UTF-8?q?Made=20a=20more=20granular=20configuration?= =?UTF-8?q?=20possible=20PREVENT=5FLENGTHY=5FEXTRUDE=EF=9C=88.=20You=20can?= =?UTF-8?q?=20now=20decide=20to=20allow/disallow=20large=20length=20of=20e?= =?UTF-8?q?xtrusions=20to=20be=20executed.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Turning off the protection might be beneficial to those who want to do fast and long reversals. --- Marlin/Configuration.h | 3 +++ Marlin/planner.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index f15876770e..880d48a7d2 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -108,6 +108,9 @@ //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit //can be software-disabled for whatever purposes by #define PREVENT_DANGEROUS_EXTRUDE +//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. +#define PREVENT_LENGTHY_EXTRUDE + #define EXTRUDE_MINTEMP 170 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index cfb503deb8..b620589533 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -495,12 +495,14 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa SERIAL_ECHO_START; SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP); } + #ifdef PREVENT_LENGTHY_EXTRUDE if(labs(target[E_AXIS]-position[E_AXIS])>axis_steps_per_unit[E_AXIS]*EXTRUDE_MAXLENGTH) { position[E_AXIS]=target[E_AXIS]; //behave as if the move really took place, but ignore E part SERIAL_ECHO_START; SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP); } + #endif #endif // Prepare to set up new block