From dd301be52dd474d7a48579c9850a08c2a0a54e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20FRANCOIS?= Date: Mon, 26 Jan 2015 18:50:29 +0100 Subject: [PATCH 01/12] Added suport for multiline G-code commands in the LCD menus --- Marlin/Marlin.h | 2 +- Marlin/Marlin_main.cpp | 8 ++++++-- Marlin/ultralcd.cpp | 37 ++++++++++++++++++++++++++++++++++++- 3 files changed, 43 insertions(+), 4 deletions(-) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 1ab316aac..0f98c69b8 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -199,7 +199,7 @@ void Stop(); bool IsStopped(); -void enquecommand(const char *cmd); //put an ASCII command at the end of the current buffer. +bool enquecommand(const char *cmd); //put an ASCII command at the end of the current buffer or return false when it is full void enquecommand_P(const char *cmd); //put an ASCII command at the end of the current buffer, read from flash void prepare_arc_move(char isclockwise); void clamp_to_software_endstops(float target[3]); diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 1401e7571..82325e1b3 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -454,9 +454,12 @@ void serial_echopair_P(const char *s_P, unsigned long v) //adds an command to the main command buffer //thats really done in a non-safe way. //needs overworking someday -void enquecommand(const char *cmd) +//(or return false if it failed to do so) +bool enquecommand(const char *cmd) { - if(buflen < BUFSIZE) + if(buflen >= BUFSIZE) + return false; + else { //this is dangerous if a mixing of serial and this happens strcpy(&(cmdbuffer[bufindw][0]),cmd); @@ -466,6 +469,7 @@ void enquecommand(const char *cmd) SERIAL_ECHOLNPGM("\""); bufindw= (bufindw + 1)%BUFSIZE; buflen += 1; + return true; } } diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index a8c7f8ca4..4297d9819 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -10,6 +10,8 @@ int8_t encoderDiff; /* encoderDiff is updated from interrupt context and added to encoderPosition every LCD update */ +const char* pgcode_seq= NULL; /* pointer to the current line in the active sequence of commands, or NULL when none */ + /* Configuration settings */ int plaPreheatHotendTemp; int plaPreheatHPBTemp; @@ -76,6 +78,7 @@ static void lcd_quick_feedback();//Cause an LCD refresh, and give the user visua static void menu_action_back(menuFunc_t data); static void menu_action_submenu(menuFunc_t data); static void menu_action_gcode(const char* pgcode); +static void menu_action_gcode_next(); static void menu_action_function(menuFunc_t data); static void menu_action_sdfile(const char* filename, char* longFilename); static void menu_action_sddirectory(const char* filename, char* longFilename); @@ -1164,7 +1167,37 @@ static void lcd_quick_feedback() /** Menu action functions **/ static void menu_action_back(menuFunc_t data) { lcd_goto_menu(data); } static void menu_action_submenu(menuFunc_t data) { lcd_goto_menu(data); } -static void menu_action_gcode(const char* pgcode) { enquecommand_P(pgcode); } + +static void menu_action_gcode(const char* pgcode) +{ + // No more calling enquecommand_P(pgcode) as it allows only one command! + pgcode_seq= pgcode; + menu_action_gcode_next(); +} + +static void menu_action_gcode_next() +{ + // Inject the next command from the pending sequence, when not empty. + char cmd[30]; + if(!pgcode_seq) return; + // Get the next 30 chars from the sequence of gcodes to run + strncpy_P(cmd, pgcode_seq, sizeof(cmd)-1); + cmd[sizeof(cmd)-1]= 0; + // Look for the end of line, or the end of sequence + size_t i= 0; + char c; + while( (c= cmd[i]) && c!='\n' ) + ++i; // look for the end of this gcode command + cmd[i]= 0; + if(!enquecommand(cmd)) // buffer was full, will retry later + return; + if(c) + pgcode_seq+= i+1; // move to next command + else + pgcode_seq= NULL; // mark the end of the sequence of gcodes +} + + static void menu_action_function(menuFunc_t data) { (*data)(); } static void menu_action_sdfile(const char* filename, char* longFilename) { @@ -1257,6 +1290,8 @@ void lcd_update() lcd_buttons_update(); + menu_action_gcode_next(); // inject the next pending command in the pending sequence (if any) + #if (SDCARDDETECT > 0) if((IS_SD_INSERTED != lcd_oldcardstatus && lcd_detected())) { From aa67b38a44561ab0dc004f6e10af4e2d81e65bb5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 7 Feb 2015 02:44:35 -0800 Subject: [PATCH 02/12] Fan speed and 4th extruder on graphical LCD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Display fan speed 0-1 as “—“ and 254-255 as “100%”. - Display 4th extruder instead of the heated bed --- Marlin/dogm_lcd_implementation.h | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/Marlin/dogm_lcd_implementation.h b/Marlin/dogm_lcd_implementation.h index 220621d47..1ccff63e3 100644 --- a/Marlin/dogm_lcd_implementation.h +++ b/Marlin/dogm_lcd_implementation.h @@ -199,7 +199,7 @@ static void lcd_implementation_status_screen() { u8g.setPrintPos(80,47); if (starttime != 0) { - uint16_t time = millis()/60000 - starttime/60000; + uint16_t time = (millis() - starttime) / 60000; u8g.print(itostr2(time/60)); u8g.print(':'); u8g.print(itostr2(time%60)); @@ -210,26 +210,25 @@ static void lcd_implementation_status_screen() { #endif // Extruders - _draw_heater_status(6, 0); - #if EXTRUDERS > 1 - _draw_heater_status(31, 1); - #if EXTRUDERS > 2 - _draw_heater_status(55, 2); - #endif - #endif + for (int i=0; i -1 - u8g.print(itostr3(int((fanSpeed*100)/256 + 1))); - u8g.print("%"); - #else - u8g.print("---"); + int per = ((fanSpeed + 1) * 100) / 256; + if (per) { + u8g.print(itostr3(per)); + u8g.print("%"); + } + else #endif + { + u8g.print("---"); + } // X, Y, Z-Coordinates u8g.setFont(FONT_STATUSMENU); From 85e5aa4011cf65c0b09a4453bd1f3ac3752ba072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20FRANCOIS?= Date: Sat, 7 Feb 2015 23:24:20 +0100 Subject: [PATCH 03/12] Generalized enqueue_commands_P, and moved them to Marlin_main as they should --- Marlin/Configuration.h | 314 ++++++++---------- Marlin/Configuration_adv.h | 4 +- Marlin/Marlin.h | 5 +- Marlin/Marlin.pde | 56 ---- Marlin/Marlin_main.cpp | 84 +++-- Marlin/cardreader.cpp | 4 +- .../delta/Configuration.h | 2 - Marlin/ultralcd.cpp | 48 +-- 8 files changed, 220 insertions(+), 297 deletions(-) delete mode 100644 Marlin/Marlin.pde diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 4e0786199..87cb10bd1 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -14,12 +14,6 @@ // example_configurations/delta directory. // -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// // User-specified version info of this build to display in [Pronterface, etc] terminal window during // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this @@ -27,7 +21,7 @@ #define STRING_VERSION "v1.0.2" #define STRING_URL "reprap.org" #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time -#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. +#define STRING_CONFIG_H_AUTHOR "(Jeremie, Tridimake)" // JFR - Who made the changes. #define STRING_SPLASH STRING_VERSION " - " STRING_URL // will be shown during bootup // SERIAL_PORT selects which serial port should be used for communication with the host. @@ -36,7 +30,8 @@ #define SERIAL_PORT 0 // This determines the communication speed of the printer -#define BAUDRATE 250000 +//#define BAUDRATE 250000 +#define BAUDRATE 115200 // This enables the serial port associated to the Bluetooth interface //#define BTENABLED // Enable BT interface on AT90USB devices @@ -44,11 +39,11 @@ // The following define selects which electronics board you have. // Please choose the name from boards.h that matches your setup #ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_ULTIMAKER + #define MOTHERBOARD 33 // JFR - was BOARD_ULTIMAKER #endif // Define this to set a custom name for your generic Mendel, -// #define CUSTOM_MENDEL_NAME "This Mendel" +#define CUSTOM_MENDEL_NAME "[RMud]HP" // JFR -was "This Mendel" // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) @@ -66,6 +61,50 @@ // Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. // #define PS_DEFAULT_OFF +//=========================================================================== +//============================== Delta Settings ============================= +//=========================================================================== +// Enable DELTA kinematics and most of the default configuration for Deltas +#define DELTA + +// Make delta curves from many straight lines (linear interpolation). +// This is a trade-off between visible corners (not enough segments) +// and processor overload (too many expensive sqrt calls). +#define DELTA_SEGMENTS_PER_SECOND 100 // JFR: was 200 + +/* + Parameter essential for delta calibration: + + C, Y-Axis + | |___| CARRIAGE_HORIZONTAL_OFFSET + | | \ + |_________ X-axis | \ + / \ | \ DELTA_DIAGONAL_ROD + / \ \ + / \ \ Carriage is at printer center! + A B \_____/ + |--| END_EFFECTOR_HORIZONTAL_OFFSET + |----| DELTA_RADIUS + |-----------| PRINTER_RADIUS + + Column angles are measured from X-axis counterclockwise +*/ + +// Center-to-center distance of the holes in the diagonal push rods. +#define DELTA_DIAGONAL_ROD (202.4) // mm JFR: was 202 for LABSUD + +// Horizontal offset from middle of printer to smooth rod center. +#define DELTA_SMOOTH_ROD_OFFSET 139.5 // mm + +// Horizontal offset of the universal joints on the end effector. +#define DELTA_EFFECTOR_OFFSET 18.0 // mm + +// Horizontal offset of the universal joints on the carriages. +#define DELTA_CARRIAGE_OFFSET 18.0 // mm + +// Effective horizontal distance bridged by diagonal push rods. +#define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-DELTA_EFFECTOR_OFFSET-DELTA_CARRIAGE_OFFSET) + //=========================================================================== //=============================Thermal Settings ============================ //=========================================================================== @@ -104,8 +143,8 @@ // 147 is Pt100 with 4k7 pullup // 110 is Pt100 with 1k pullup (non standard) -#define TEMP_SENSOR_0 -1 -#define TEMP_SENSOR_1 -1 +#define TEMP_SENSOR_0 1 // JFR -was -1 +#define TEMP_SENSOR_1 0 // JFR -was -1 #define TEMP_SENSOR_2 0 #define TEMP_SENSOR_BED 0 @@ -114,7 +153,7 @@ #define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 // Actual temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 10 // (seconds) +#define TEMP_RESIDENCY_TIME 4 // // JFR -was 10 (seconds) #define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one #define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. @@ -146,25 +185,23 @@ // PID settings: // Comment the following line to disable PID and enable bang-bang. #define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current +#define BANG_MAX 80 // JFR -was 255 // limits current to nozzle while in bang-bang mode; 255=full current +#define PID_MAX 70 // JFR -was BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current #ifdef PIDTEMP //#define PID_DEBUG // Sends debug data to the serial port. //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_EXTRUDER // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term #define K1 0.95 //smoothing factor within the PID - #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine +// JFR: was #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine + #define PID_dT ((16.0 * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it // Ultimaker - #define DEFAULT_Kp 22.2 - #define DEFAULT_Ki 1.08 - #define DEFAULT_Kd 114 +// #define DEFAULT_Kp 22.2 +// #define DEFAULT_Ki 1.08 +// #define DEFAULT_Kd 114 // MakerGear // #define DEFAULT_Kp 7.0 @@ -175,6 +212,12 @@ // #define DEFAULT_Kp 63.0 // #define DEFAULT_Ki 2.25 // #define DEFAULT_Kd 440 + +// E3D 24v calibrée par frafa avec buse 12v30W alimentée en 24v + #define DEFAULT_Kp 12.48 + #define DEFAULT_Ki 1.63 + #define DEFAULT_Kd 23.93 + #endif // PIDTEMP // Bed Temperature Control @@ -217,7 +260,7 @@ //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 +//#define PREVENT_DANGEROUS_EXTRUDE // JFR - was enabled //if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. #define PREVENT_LENGTHY_EXTRUDE @@ -266,9 +309,6 @@ your extruder heater takes 2 minutes to hit the target on heating. //=============================Mechanical Settings=========================== //=========================================================================== -// Uncomment the following line to enable CoreXY kinematics -// #define COREXY - // coarse Endstop Settings #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors @@ -295,12 +335,12 @@ your extruder heater takes 2 minutes to hit the target on heating. const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. -const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. -const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. -const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. +const bool X_MAX_ENDSTOP_INVERTING = false; // JFR -was true // set to true to invert the logic of the endstop. +const bool Y_MAX_ENDSTOP_INVERTING = false; // JFR -was true // set to true to invert the logic of the endstop. +const bool Z_MAX_ENDSTOP_INVERTING = false; // JFR -was true // set to true to invert the logic of the endstop. //#define DISABLE_MAX_ENDSTOPS -//#define DISABLE_MIN_ENDSTOPS - +// Deltas never have min endstops +//#define DISABLE_MIN_ENDSTOPS // JFR- was not commented out! // Disable max endstops for compatibility with endstop checking routine #if defined(COREXY) && !defined(DISABLE_MAX_ENDSTOPS) #define DISABLE_MAX_ENDSTOPS @@ -319,149 +359,39 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of #define DISABLE_E false // For all extruders #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled -#define INVERT_X_DIR true // for Mendel set to false, for Orca set to true -#define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false -#define INVERT_Z_DIR true // for Mendel set to false, for Orca set to true -#define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false +#define INVERT_X_DIR false // DELTA does not invert +#define INVERT_Y_DIR false +#define INVERT_Z_DIR false + +#define INVERT_E0_DIR true // JFR - was false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false // ENDSTOP SETTINGS: // Sets direction of endstops when homing; 1=MAX, -1=MIN -#define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 +// deltas always home to max +#define X_HOME_DIR 1 +#define Y_HOME_DIR 1 +#define Z_HOME_DIR 1 #define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. #define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. // Travel limits after homing -#define X_MAX_POS 205 -#define X_MIN_POS 0 -#define Y_MAX_POS 205 -#define Y_MIN_POS 0 -#define Z_MAX_POS 200 +#define X_MAX_POS 85 // JFR - was 205 +#define X_MIN_POS -85 // JFR - was 0 +#define Y_MAX_POS 85 // JFR - was 205 +#define Y_MIN_POS -85 // JFR - was 0 +#define Z_MAX_POS MANUAL_Z_HOME_POS // JFR - was 200 #define Z_MIN_POS 0 #define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS) #define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS) #define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS) //============================= Bed Auto Leveling =========================== +//Bed Auto Leveling is still not compatible with Delta Kinematics -//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) -#define Z_PROBE_REPEATABILITY_TEST // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled. - -#ifdef ENABLE_AUTO_BED_LEVELING - -// There are 2 different ways to pick the X and Y locations to probe: - -// - "grid" mode -// Probe every point in a rectangular grid -// You must specify the rectangle, and the density of sample points -// This mode is preferred because there are more measurements. -// It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive - -// - "3-point" mode -// Probe 3 arbitrary points on the bed (that aren't colinear) -// You must specify the X & Y coordinates of all 3 points - - #define AUTO_BED_LEVELING_GRID - // with AUTO_BED_LEVELING_GRID, the bed is sampled in a - // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid - // and least squares solution is calculated - // Note: this feature occupies 10'206 byte - #ifdef AUTO_BED_LEVELING_GRID - - // set the rectangle in which to probe - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define BACK_PROBE_BED_POSITION 180 - #define FRONT_PROBE_BED_POSITION 20 - - // set the number of grid points per dimension - // I wouldn't see a reason to go above 3 (=9 probing points on the bed) - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - - #else // not AUTO_BED_LEVELING_GRID - // with no grid, just probe 3 arbitrary points. A simple cross-product - // is used to esimate the plane of the print bed - - #define ABL_PROBE_PT_1_X 15 - #define ABL_PROBE_PT_1_Y 180 - #define ABL_PROBE_PT_2_X 15 - #define ABL_PROBE_PT_2_Y 20 - #define ABL_PROBE_PT_3_X 170 - #define ABL_PROBE_PT_3_Y 20 - #endif // AUTO_BED_LEVELING_GRID - - - // these are the offsets to the probe relative to the extruder tip (Hotend - Probe) - // X and Y offsets must be integers - #define X_PROBE_OFFSET_FROM_EXTRUDER -25 - #define Y_PROBE_OFFSET_FROM_EXTRUDER -29 - #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 - - #define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance. - // Be sure you have this distance over your Z_MAX_POS in case - - #define XY_TRAVEL_SPEED 8000 // X and Y axis travel speed between probes, in mm/min - - #define Z_RAISE_BEFORE_PROBING 15 //How much the extruder will be raised before traveling to the first probing point. - #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points - - //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell - //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like. - - //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk - //The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it. - // You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile. - -// #define PROBE_SERVO_DEACTIVATION_DELAY 300 - - -//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing, -//it is highly recommended you let this Z_SAFE_HOMING enabled!!! - - #define Z_SAFE_HOMING // This feature is meant to avoid Z homing with probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled - // - If stepper drivers timeout, it will need X and Y homing again before Z homing - // - Position the probe in a defined XY point before Z Homing when homing all axis (G28) - // - Block Z homing only when the probe is outside bed area. - - #ifdef Z_SAFE_HOMING - - #define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2) // X point for Z homing when homing all axis (G28) - #define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2) // Y point for Z homing when homing all axis (G28) - - #endif - - #ifdef AUTO_BED_LEVELING_GRID // Check if Probe_Offset * Grid Points is greater than Probing Range - #if X_PROBE_OFFSET_FROM_EXTRUDER < 0 - #if (-(X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION)) - #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS" - #endif - #else - #if ((X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION)) - #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS" - #endif - #endif - #if Y_PROBE_OFFSET_FROM_EXTRUDER < 0 - #if (-(Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION)) - #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS" - #endif - #else - #if ((Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION)) - #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS" - #endif - #endif - - - #endif - -#endif // ENABLE_AUTO_BED_LEVELING // The position of the homing switches @@ -469,24 +399,62 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) //Manual homing switch locations: + +#define MANUAL_HOME_POSITIONS // MANUAL_*_HOME_POS below will be used // JFR- was disabled // For deltabots this means top and center of the Cartesian print volume. #define MANUAL_X_HOME_POS 0 #define MANUAL_Y_HOME_POS 0 -#define MANUAL_Z_HOME_POS 0 +#define MANUAL_Z_HOME_POS (142.7-1) //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. //// MOVEMENT SETTINGS #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E -#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min) + +// delta homing speeds must be the same on xyz +#define HOMING_FEEDRATE {200*60, 200*60, 200*60, 0} // set the homing speeds (mm/min) + +// ================>>>>> N.R. with bug fixes by JFR +// Compute speed, feedrate and acceleration by means of pulley & motor specs only // default settings +#define PI 3.14159265 +#define G 9806.65 + +//Motors (movement) +#define MVT_N 3 // g acceleration for movement (3 ok) +#define MVT_SPR 200.0 // step per revolution +#define MVT_MS 32 // microstep (1/32 only possible with DRV8825 -- also 2.5A) +#define MVT_OMEG 900.0 // maximum number of revolutions per minute at 19V (was 600-900) +#define PULLEY_TN 26.0 // number of teeth on X/Y/Z pulley +#define PULLEY_STEP 3.0 // pulley tooth size (mm) -#define DEFAULT_AXIS_STEPS_PER_UNIT {78.7402,78.7402,200.0*8/3,760*1.1} // default steps per unit for Ultimaker -#define DEFAULT_MAX_FEEDRATE {500, 500, 5, 25} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {9000,9000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. +//Extruder motor +#define XTR_N MVT_N // g acceleration for extruder +#define XTR_SPR (MVT_SPR*5) // step per revolution (with 5:1 reductor) +#define XTR_MS MVT_MS // microstep +#define XTR_OMEG 225.0 // maximum number of revolutions per minute // was 600-900 +#define MVT_DHB 10.56 // Hobbed bolt diameter + +#define MVT_PCIRC ( PULLEY_TN * PULLEY_STEP ) // pulley circumference +#define MVT_S ( MVT_SPR * MVT_MS / MVT_PCIRC ) // step_per_revolution * microstepping / circumference +#define MVT_V ( MVT_OMEG * MVT_PCIRC / 60.0 ) // max velocity (mm/s) + +#define XTR_HBCIRC ( PI * MVT_DHB ) // hobbed bolt circumference from diameter +#define XTR_S ( XTR_SPR * XTR_MS / XTR_HBCIRC ) //step per mm +#define XTR_V ( XTR_OMEG * XTR_HBCIRC / 60 ) // max velocity (mm/s) + +// the second axis sometimes needs /2 (BROKEN DRIVER??!!) +#define DEFAULT_AXIS_STEPS_PER_UNIT { MVT_S, MVT_S, MVT_S, XTR_S } +#define DEFAULT_MAX_FEEDRATE { MVT_V, MVT_V, MVT_V, XTR_V } // (mm/sec) +//JFR: is this OK?? #define DEFAULT_MAX_ACCELERATION { MVT_N*G, MVT_N*G, MVT_N*G, XTR_N*G } // X, Y, Z, E maximum start speed for accelerated moves. +#define DEFAULT_MAX_ACCELERATION {9000,9000,9000,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot. + +// JFR: do we want to multiply here by MVT_N and XTR_N ipo N ? +#define DEFAULT_ACCELERATION (MVT_N*G*3/4) // X, Y, Z and E max acceleration in mm/s^2 for printing moves +#define DEFAULT_RETRACT_ACCELERATION (XTR_N*G*3/4) // X, Y, Z and E max acceleration in mm/s^2 for r retracts + +//<<<<<================ JFR / N.R. -#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for retracts // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). @@ -496,7 +464,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) #define DEFAULT_XYJERK 20.0 // (mm/sec) -#define DEFAULT_ZJERK 0.4 // (mm/sec) +#define DEFAULT_ZJERK 20.0 // (mm/sec) Must be same as XY for delta #define DEFAULT_EJERK 5.0 // (mm/sec) //=========================================================================== @@ -521,7 +489,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //#define EEPROM_SETTINGS //to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: // please keep turned on if you can. -//#define EEPROM_CHITCHAT +#define EEPROM_CHITCHAT // Preheat Constants #define PLA_PREHEAT_HOTEND_TEMP 180 @@ -551,7 +519,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // The RepRapDiscount Smart Controller (white PCB) // http://reprap.org/wiki/RepRapDiscount_Smart_Controller -//#define REPRAP_DISCOUNT_SMART_CONTROLLER +#define REPRAP_DISCOUNT_SMART_CONTROLLER // The GADGETS3D G3D LCD/SD Controller (blue PCB) // http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel @@ -573,6 +541,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C //#define RA_CONTROL_PANEL +// Delta calibration menu +// uncomment to add three points calibration menu option. +// See http://minow.blogspot.com/index.html#4918805519571907051 +// If needed, adjust the X, Y, Z calibration coordinates +// in ultralcd.cpp@lcd_delta_calibrate_menu() +#define DELTA_CALIBRATION_MENU // JFR - was disabled + //automatic expansion #if defined (MAKRPANEL) #define DOGLCD @@ -771,13 +746,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // Uncomment below to enable //#define FILAMENT_SENSOR -#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) -#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel +#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) +#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel #define DEFAULT_NOMINAL_FILAMENT_DIA 3.0 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm -#define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) +#define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) //defines used in the code #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially @@ -790,6 +765,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of + #include "Configuration_adv.h" #include "thermistortables.h" diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index a503e640f..72f8aac57 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -213,7 +213,7 @@ //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: #define X_HOME_RETRACT_MM 5 #define Y_HOME_RETRACT_MM 5 -#define Z_HOME_RETRACT_MM 2 +#define Z_HOME_RETRACT_MM 5 //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. #define AXIS_RELATIVE_MODES {false, false, false, false} @@ -248,7 +248,7 @@ #define DEFAULT_MINSEGMENTTIME 20000 // If defined the movements slow down when the look ahead buffer is only half full -#define SLOWDOWN +// #define SLOWDOWN // JFR - important, was enabled!! // Frequency limit // See nophead's blog for more info diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 0f98c69b8..fc85e7f3a 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -199,8 +199,9 @@ void Stop(); bool IsStopped(); -bool enquecommand(const char *cmd); //put an ASCII command at the end of the current buffer or return false when it is full -void enquecommand_P(const char *cmd); //put an ASCII command at the end of the current buffer, read from flash +bool enquecommand(const char *cmd); //put a single ASCII command at the end of the current buffer or return false when it is full +void enquecommands_P(const char *cmd); //put one or many ASCII commands at the end of the current buffer, read from flash + void prepare_arc_move(char isclockwise); void clamp_to_software_endstops(float target[3]); diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde deleted file mode 100644 index 79c934bf0..000000000 --- a/Marlin/Marlin.pde +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ - -/* - Reprap firmware based on Sprinter and grbl. - Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - */ - -/* - This firmware is a mashup between Sprinter and grbl. - (https://github.com/kliment/Sprinter) - (https://github.com/simen/grbl/tree) - - It has preliminary support for Matthew Roberts advance algorithm - http://reprap.org/pipermail/reprap-dev/2011-May/003323.html - */ - -/* All the implementation is done in *.cpp files to get better compatibility with avr-gcc without the Arduino IDE */ -/* Use this file to help the Arduino IDE find which Arduino libraries are needed and to keep documentation on GCode */ - -#include "Configuration.h" -#include "pins.h" - -#ifdef ULTRA_LCD - #if defined(LCD_I2C_TYPE_PCF8575) - #include - #include - #elif defined(LCD_I2C_TYPE_MCP23017) || defined(LCD_I2C_TYPE_MCP23008) - #include - #include - #elif defined(DOGLCD) - #include // library for graphics LCD by Oli Kraus (https://code.google.com/p/u8glib/) - #else - #include // library for character LCD - #endif -#endif - -#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1 -#include -#endif - -#if defined(DIGIPOT_I2C) - #include -#endif diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 82325e1b3..e18d08c0d 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -384,6 +384,8 @@ static int serial_count = 0; static boolean comment_mode = false; static char *strchr_pointer; // just a pointer to find chars in the command string like X, Y, Z, E, etc +const char* queued_commands_P= NULL; /* pointer to the current line in the active sequence of commands, or NULL when none */ + const int sensitive_pins[] = SENSITIVE_PINS; // Sensitive pin list for M42 //static float tt = 0; @@ -451,43 +453,64 @@ void serial_echopair_P(const char *s_P, unsigned long v) } #endif //!SDSUPPORT -//adds an command to the main command buffer -//thats really done in a non-safe way. -//needs overworking someday -//(or return false if it failed to do so) -bool enquecommand(const char *cmd) +//Injects the next command from the pending sequence of commands, when possible +//Return false if and only if no command was pending +static bool drain_queued_commands_P() { - if(buflen >= BUFSIZE) + char cmd[30]; + if(!queued_commands_P) return false; - else + // Get the next 30 chars from the sequence of gcodes to run + strncpy_P(cmd, queued_commands_P, sizeof(cmd)-1); + cmd[sizeof(cmd)-1]= 0; + // Look for the end of line, or the end of sequence + size_t i= 0; + char c; + while( (c= cmd[i]) && c!='\n' ) + ++i; // look for the end of this gcode command + cmd[i]= 0; + if(enquecommand(cmd)) // buffer was not full (else we will retry later) { - //this is dangerous if a mixing of serial and this happens - strcpy(&(cmdbuffer[bufindw][0]),cmd); - SERIAL_ECHO_START; - SERIAL_ECHOPGM(MSG_Enqueing); - SERIAL_ECHO(cmdbuffer[bufindw]); - SERIAL_ECHOLNPGM("\""); - bufindw= (bufindw + 1)%BUFSIZE; - buflen += 1; - return true; + if(c) + queued_commands_P+= i+1; // move to next command + else + queued_commands_P= NULL; // will have no more commands in the sequence } + return true; } -void enquecommand_P(const char *cmd) +//Record one or many commands to run from program memory. +//Aborts the current queue, if any. +//Note: drain_queued_commands_P() must be called repeatedly to drain the commands afterwards +void enquecommands_P(const char* pgcode) { - if(buflen < BUFSIZE) - { - //this is dangerous if a mixing of serial and this happens - strcpy_P(&(cmdbuffer[bufindw][0]),cmd); - SERIAL_ECHO_START; - SERIAL_ECHOPGM(MSG_Enqueing); - SERIAL_ECHO(cmdbuffer[bufindw]); - SERIAL_ECHOLNPGM("\""); - bufindw= (bufindw + 1)%BUFSIZE; - buflen += 1; - } + queued_commands_P= pgcode; + drain_queued_commands_P(); // first command exectuted asap (when possible) } +//adds a single command to the main command buffer, from RAM +//that is really done in a non-safe way. +//needs overworking someday +//Returns false if it failed to do so +bool enquecommand(const char *cmd) +{ + if(*cmd==';') + return false; + if(buflen >= BUFSIZE) + return false; + //this is dangerous if a mixing of serial and this happens + strcpy(&(cmdbuffer[bufindw][0]),cmd); + SERIAL_ECHO_START; + SERIAL_ECHOPGM(MSG_Enqueing); + SERIAL_ECHO(cmdbuffer[bufindw]); + SERIAL_ECHOLNPGM("\""); + bufindw= (bufindw + 1)%BUFSIZE; + buflen += 1; + return true; +} + + + void setup_killpin() { #if defined(KILL_PIN) && KILL_PIN > -1 @@ -691,6 +714,9 @@ void loop() void get_command() { + if(drain_queued_commands_P()) // priority is given to non-serial commands + return; + while( MYSERIAL.available() > 0 && buflen < BUFSIZE) { serial_char = MYSERIAL.read(); if(serial_char == '\n' || @@ -4489,7 +4515,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s { if (homeDebounceCount == 0) { - enquecommand_P((PSTR("G28"))); + enquecommands_P((PSTR("G28"))); homeDebounceCount++; LCD_ALERTMESSAGEPGM(MSG_AUTO_HOME); } diff --git a/Marlin/cardreader.cpp b/Marlin/cardreader.cpp index e22f3436b..33fe819bd 100644 --- a/Marlin/cardreader.cpp +++ b/Marlin/cardreader.cpp @@ -532,7 +532,7 @@ void CardReader::checkautostart(bool force) sprintf_P(cmd, PSTR("M23 %s"), autoname); enquecommand(cmd); - enquecommand_P(PSTR("M24")); + enquecommands_P(PSTR("M24")); found=true; } } @@ -637,7 +637,7 @@ void CardReader::printingHasFinished() if(SD_FINISHED_STEPPERRELEASE) { //finishAndDisableSteppers(); - enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND)); + enquecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND)); } autotempShutdown(); } diff --git a/Marlin/example_configurations/delta/Configuration.h b/Marlin/example_configurations/delta/Configuration.h index 6c530e923..e2689e5c3 100644 --- a/Marlin/example_configurations/delta/Configuration.h +++ b/Marlin/example_configurations/delta/Configuration.h @@ -67,8 +67,6 @@ // and processor overload (too many expensive sqrt calls). #define DELTA_SEGMENTS_PER_SECOND 200 -// NOTE NB all values for DELTA_* values MUST be floating point, so always have a decimal point in them - // Center-to-center distance of the holes in the diagonal push rods. #define DELTA_DIAGONAL_ROD 250.0 // mm diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 4297d9819..3ea0f461f 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -10,8 +10,6 @@ int8_t encoderDiff; /* encoderDiff is updated from interrupt context and added to encoderPosition every LCD update */ -const char* pgcode_seq= NULL; /* pointer to the current line in the active sequence of commands, or NULL when none */ - /* Configuration settings */ int plaPreheatHotendTemp; int plaPreheatHPBTemp; @@ -78,7 +76,6 @@ static void lcd_quick_feedback();//Cause an LCD refresh, and give the user visua static void menu_action_back(menuFunc_t data); static void menu_action_submenu(menuFunc_t data); static void menu_action_gcode(const char* pgcode); -static void menu_action_gcode_next(); static void menu_action_function(menuFunc_t data); static void menu_action_sdfile(const char* filename, char* longFilename); static void menu_action_sddirectory(const char* filename, char* longFilename); @@ -327,7 +324,7 @@ static void lcd_sdcard_stop() quickStop(); if(SD_FINISHED_STEPPERRELEASE) { - enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND)); + enquecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND)); } autotempShutdown(); @@ -350,6 +347,7 @@ static void lcd_main_menu() MENU_ITEM(submenu, MSG_DELTA_CALIBRATE, lcd_delta_calibrate_menu); #endif // DELTA_CALIBRATION_MENU } +/*JFR TEST*/ MENU_ITEM(gcode, "test multiline", PSTR("G4 S3\nM104 S50\nG4 S1\nM104 S200\nG4 S2\nM104 S0")); // SD-card changed by user MENU_ITEM(submenu, MSG_CONTROL, lcd_control_menu); #ifdef SDSUPPORT if (card.cardOK) @@ -397,8 +395,7 @@ void lcd_set_home_offsets() plan_set_position(0.0, 0.0, 0.0, current_position[E_AXIS]); // Audio feedback - enquecommand_P(PSTR("M300 S659 P200")); - enquecommand_P(PSTR("M300 S698 P200")); + enquecommands_P(PSTR("M300 S659 P200\nM300 S698 P200")); lcd_return_to_status(); } @@ -680,6 +677,13 @@ static void lcd_prepare_menu() } #endif MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu); + + // JFR for RMud delta printer + MENU_ITEM(gcode, "Calibrate bed", PSTR("M702\nG28\nG1 X-77.94 Y-45 Z36 F8000\nG4 S3\nM701 P0\nG1 X77.94 Y-45 Z36\nG4 S3\nM701 P1\nG1 X0 Y90 Z36\nG4 S3\nM701 P2\nM700\nG1 X0 Y0 Z100 F8000")); + MENU_ITEM(gcode, "Check level", PSTR("G28\nG1 X0 Y0 Z1 F4000\nG1 X-77.94 Y-45 Z1\nG1 X77.94 Y-45\nG1 X0 Y90\nG1 X-77.94 Y-45\nG4 S2\nG1 X-77.94 Y-45 Z0.3 F2000\nG1 X-77.94 Y-45\nG1 X77.94 Y-45\nG1 X0 Y90\nG1 X-77.94 Y-45\nG1 X0 Y0 Z0")); + MENU_ITEM(gcode, "Retract filament", PSTR("M302\nM82\nG92 E0\nG1 F4000 E-800")); + MENU_ITEM(gcode, "Insert filament", PSTR("M302\nM82\nG92 E0\nG1 F4000 E60")); + MENU_ITEM(gcode, "Finalize filament", PSTR("G1 F4000 E790")); END_MENU(); } @@ -1151,7 +1155,7 @@ menu_edit_type(unsigned long, long5, ftostr5, 0.01) lcd_move_y(); } static void reprapworld_keypad_move_home() { - enquecommand_P((PSTR("G28"))); // move all axis home + enquecommands_P((PSTR("G28"))); // move all axis home } #endif @@ -1170,31 +1174,7 @@ static void menu_action_submenu(menuFunc_t data) { lcd_goto_menu(data); } static void menu_action_gcode(const char* pgcode) { - // No more calling enquecommand_P(pgcode) as it allows only one command! - pgcode_seq= pgcode; - menu_action_gcode_next(); -} - -static void menu_action_gcode_next() -{ - // Inject the next command from the pending sequence, when not empty. - char cmd[30]; - if(!pgcode_seq) return; - // Get the next 30 chars from the sequence of gcodes to run - strncpy_P(cmd, pgcode_seq, sizeof(cmd)-1); - cmd[sizeof(cmd)-1]= 0; - // Look for the end of line, or the end of sequence - size_t i= 0; - char c; - while( (c= cmd[i]) && c!='\n' ) - ++i; // look for the end of this gcode command - cmd[i]= 0; - if(!enquecommand(cmd)) // buffer was full, will retry later - return; - if(c) - pgcode_seq+= i+1; // move to next command - else - pgcode_seq= NULL; // mark the end of the sequence of gcodes + enquecommands_P(pgcode); } @@ -1207,7 +1187,7 @@ static void menu_action_sdfile(const char* filename, char* longFilename) for(c = &cmd[4]; *c; c++) *c = tolower(*c); enquecommand(cmd); - enquecommand_P(PSTR("M24")); + enquecommands_P(PSTR("M24")); lcd_return_to_status(); } static void menu_action_sddirectory(const char* filename, char* longFilename) @@ -1290,8 +1270,6 @@ void lcd_update() lcd_buttons_update(); - menu_action_gcode_next(); // inject the next pending command in the pending sequence (if any) - #if (SDCARDDETECT > 0) if((IS_SD_INSERTED != lcd_oldcardstatus && lcd_detected())) { From 8e9272914130fb795498f580cdc91364a91462d1 Mon Sep 17 00:00:00 2001 From: AnHardt Date: Sun, 8 Feb 2015 13:45:22 +0100 Subject: [PATCH 04/12] Make display language configurable in Configuration.h --- Marlin/Configuration.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 770c86eb1..9b422a812 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -559,7 +559,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of #define ABS_PREHEAT_HPB_TEMP 100 #define ABS_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255 -//LCD and SD support +//==============================LCD and SD support============================= + +// Define your display language below. Replace (en) with your language code and uncomment. +// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu +// See also language.h +//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) // Character based displays can have different extended charsets. #define DISPLAY_CHARSET_HD44780_JAPAN // "ääööüüß23°" From 488633bf4426987b21778436eadfc3c2e2f54a9e Mon Sep 17 00:00:00 2001 From: AnHardt Date: Sun, 8 Feb 2015 14:26:24 +0100 Subject: [PATCH 05/12] #include "language_en.h" before the national language in language.h + May decrease the workload for feature developers. They may omit to update all the language files but "language_en.h". When loading _en first, all new features give some display, but the new in English. - May throw some additional warnings about redefinition during compile. --- Marlin/language.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Marlin/language.h b/Marlin/language.h index 27a5793c4..29f54bc9c 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -222,6 +222,7 @@ #define TESTSTRING360 "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" */ +#include "language_en.h" #include LANGUAGE_INCLUDE #endif //__LANGUAGE_H From 3aac2df0572af604e1a7b46669bf90ecfd7d4fa2 Mon Sep 17 00:00:00 2001 From: AnHardt Date: Sun, 8 Feb 2015 20:41:20 +0100 Subject: [PATCH 06/12] Now the oter way around. Include of language_en.h now behind national language. All "#define MSG_STR_*" now surrounded by #ifndef and #endif. --- Marlin/language.h | 2 +- Marlin/language_en.h | 232 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 233 insertions(+), 1 deletion(-) diff --git a/Marlin/language.h b/Marlin/language.h index 29f54bc9c..e13fc3176 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -222,7 +222,7 @@ #define TESTSTRING360 "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" */ -#include "language_en.h" #include LANGUAGE_INCLUDE +#include "language_en.h" #endif //__LANGUAGE_H diff --git a/Marlin/language_en.h b/Marlin/language_en.h index 49a22337d..086e5c1e3 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -8,124 +8,356 @@ #ifndef LANGUAGE_EN_H #define LANGUAGE_EN_H +#ifndef WELCOME_MSG #define WELCOME_MSG MACHINE_NAME " ready." +#endif +#ifndef MSG_SD_INSERTED #define MSG_SD_INSERTED "Card inserted" +#endif +#ifndef MSG_SD_REMOVED #define MSG_SD_REMOVED "Card removed" +#endif +#ifndef MSG_MAIN #define MSG_MAIN "Main" +#endif +#ifndef MSG_AUTOSTART #define MSG_AUTOSTART "Autostart" +#endif +#ifndef MSG_DISABLE_STEPPERS #define MSG_DISABLE_STEPPERS "Disable steppers" +#endif +#ifndef MSG_AUTO_HOME #define MSG_AUTO_HOME "Auto home" +#endif +#ifndef MSG_SET_HOME_OFFSETS #define MSG_SET_HOME_OFFSETS "Set home offsets" +#endif +#ifndef MSG_SET_ORIGIN #define MSG_SET_ORIGIN "Set origin" +#endif +#ifndef MSG_PREHEAT_PLA #define MSG_PREHEAT_PLA "Preheat PLA" +#endif +#ifndef MSG_PREHEAT_PLA_N #define MSG_PREHEAT_PLA_N MSG_PREHEAT_PLA " " +#endif +#ifndef MSG_PREHEAT_PLA_ALL #define MSG_PREHEAT_PLA_ALL MSG_PREHEAT_PLA " All" +#endif +#ifndef MSG_PREHEAT_PLA_BEDONLY #define MSG_PREHEAT_PLA_BEDONLY MSG_PREHEAT_PLA " Bed" +#endif +#ifndef MSG_PREHEAT_PLA_SETTINGS #define MSG_PREHEAT_PLA_SETTINGS MSG_PREHEAT_PLA " conf" +#endif +#ifndef MSG_PREHEAT_ABS #define MSG_PREHEAT_ABS "Preheat ABS" +#endif +#ifndef MSG_PREHEAT_ABS_N #define MSG_PREHEAT_ABS_N MSG_PREHEAT_ABS " " +#endif +#ifndef MSG_PREHEAT_ABS_ALL #define MSG_PREHEAT_ABS_ALL MSG_PREHEAT_ABS " All" +#endif +#ifndef MSG_PREHEAT_ABS_BEDONLY #define MSG_PREHEAT_ABS_BEDONLY MSG_PREHEAT_ABS " Bed" +#endif +#ifndef MSG_PREHEAT_ABS_SETTINGS #define MSG_PREHEAT_ABS_SETTINGS MSG_PREHEAT_ABS " conf" +#endif +#ifndef MSG_COOLDOWN #define MSG_COOLDOWN "Cooldown" +#endif +#ifndef MSG_SWITCH_PS_ON #define MSG_SWITCH_PS_ON "Switch power on" +#endif +#ifndef MSG_SWITCH_PS_OFF #define MSG_SWITCH_PS_OFF "Switch power off" +#endif +#ifndef MSG_EXTRUDE #define MSG_EXTRUDE "Extrude" +#endif +#ifndef MSG_RETRACT #define MSG_RETRACT "Retract" +#endif +#ifndef MSG_MOVE_AXIS #define MSG_MOVE_AXIS "Move axis" +#endif +#ifndef MSG_MOVE_X #define MSG_MOVE_X "Move X" +#endif +#ifndef MSG_MOVE_Y #define MSG_MOVE_Y "Move Y" +#endif +#ifndef MSG_MOVE_Z #define MSG_MOVE_Z "Move Z" +#endif +#ifndef MSG_MOVE_E #define MSG_MOVE_E "Extruder" +#endif +#ifndef MSG_MOVE_01MM #define MSG_MOVE_01MM "Move 0.1mm" +#endif +#ifndef MSG_MOVE_1MM #define MSG_MOVE_1MM "Move 1mm" +#endif +#ifndef MSG_MOVE_10MM #define MSG_MOVE_10MM "Move 10mm" +#endif +#ifndef MSG_SPEED #define MSG_SPEED "Speed" +#endif +#ifndef MSG_NOZZLE #define MSG_NOZZLE "Nozzle" +#endif +#ifndef MSG_BED #define MSG_BED "Bed" +#endif +#ifndef MSG_FAN_SPEED #define MSG_FAN_SPEED "Fan speed" +#endif +#ifndef MSG_FLOW #define MSG_FLOW "Flow" +#endif +#ifndef MSG_CONTROL #define MSG_CONTROL "Control" +#endif +#ifndef MSG_MIN #define MSG_MIN " " STR_THERMOMETER " Min" +#endif +#ifndef MSG_MAX #define MSG_MAX " " STR_THERMOMETER " Max" +#endif +#ifndef MSG_FACTOR #define MSG_FACTOR " " STR_THERMOMETER " Fact" +#endif +#ifndef MSG_AUTOTEMP #define MSG_AUTOTEMP "Autotemp" +#endif +#ifndef MSG_ON #define MSG_ON "On " +#endif +#ifndef MSG_OFF #define MSG_OFF "Off" +#endif +#ifndef MSG_PID_P #define MSG_PID_P "PID-P" +#endif +#ifndef MSG_PID_I #define MSG_PID_I "PID-I" +#endif +#ifndef MSG_PID_D #define MSG_PID_D "PID-D" +#endif +#ifndef MSG_PID_C #define MSG_PID_C "PID-C" +#endif +#ifndef MSG_ACC #define MSG_ACC "Accel" +#endif +#ifndef MSG_VXY_JERK #define MSG_VXY_JERK "Vxy-jerk" +#endif +#ifndef MSG_VZ_JERK #define MSG_VZ_JERK "Vz-jerk" +#endif +#ifndef MSG_VE_JERK #define MSG_VE_JERK "Ve-jerk" +#endif +#ifndef MSG_VMAX #define MSG_VMAX "Vmax " +#endif +#ifndef MSG_X #define MSG_X "x" +#endif +#ifndef MSG_Y #define MSG_Y "y" +#endif +#ifndef MSG_Z #define MSG_Z "z" +#endif +#ifndef MSG_E #define MSG_E "e" +#endif +#ifndef MSG_VMIN #define MSG_VMIN "Vmin" +#endif +#ifndef MSG_VTRAV_MIN #define MSG_VTRAV_MIN "VTrav min" +#endif +#ifndef MSG_AMAX #define MSG_AMAX "Amax " +#endif +#ifndef MSG_A_RETRACT #define MSG_A_RETRACT "A-retract" +#endif +#ifndef MSG_XSTEPS #define MSG_XSTEPS "Xsteps/mm" +#endif +#ifndef MSG_YSTEPS #define MSG_YSTEPS "Ysteps/mm" +#endif +#ifndef MSG_ZSTEPS #define MSG_ZSTEPS "Zsteps/mm" +#endif +#ifndef MSG_ESTEPS #define MSG_ESTEPS "Esteps/mm" +#endif +#ifndef MSG_TEMPERATURE #define MSG_TEMPERATURE "Temperature" +#endif +#ifndef MSG_MOTION #define MSG_MOTION "Motion" +#endif +#ifndef MSG_VOLUMETRIC #define MSG_VOLUMETRIC "Filament" +#endif +#ifndef MSG_VOLUMETRIC_ENABLED #define MSG_VOLUMETRIC_ENABLED "E in mm" STR_h3 +#endif +#ifndef MSG_FILAMENT_SIZE_EXTRUDER_0 #define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#endif +#ifndef MSG_FILAMENT_SIZE_EXTRUDER_1 #define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#endif +#ifndef MSG_FILAMENT_SIZE_EXTRUDER_2 #define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" +#endif +#ifndef MSG_FILAMENT_SIZE_EXTRUDER_3 #define MSG_FILAMENT_SIZE_EXTRUDER_3 "Fil. Dia. 4" +#endif +#ifndef MSG_CONTRAST #define MSG_CONTRAST "LCD contrast" +#endif +#ifndef MSG_STORE_EPROM #define MSG_STORE_EPROM "Store memory" +#endif +#ifndef MSG_LOAD_EPROM #define MSG_LOAD_EPROM "Load memory" +#endif +#ifndef MSG_RESTORE_FAILSAFE #define MSG_RESTORE_FAILSAFE "Restore failsafe" +#endif +#ifndef MSG_REFRESH #define MSG_REFRESH "Refresh" +#endif +#ifndef MSG_WATCH #define MSG_WATCH "Info screen" +#endif +#ifndef MSG_PREPARE #define MSG_PREPARE "Prepare" +#endif +#ifndef MSG_TUNE #define MSG_TUNE "Tune" +#endif +#ifndef MSG_PAUSE_PRINT #define MSG_PAUSE_PRINT "Pause print" +#endif +#ifndef MSG_RESUME_PRINT #define MSG_RESUME_PRINT "Resume print" +#endif +#ifndef MSG_STOP_PRINT #define MSG_STOP_PRINT "Stop print" +#endif +#ifndef MSG_CARD_MENU #define MSG_CARD_MENU "Print from SD" +#endif +#ifndef MSG_NO_CARD #define MSG_NO_CARD "No SD card" +#endif +#ifndef MSG_DWELL #define MSG_DWELL "Sleep..." +#endif +#ifndef MSG_USERWAIT #define MSG_USERWAIT "Wait for user..." +#endif +#ifndef MSG_RESUMING #define MSG_RESUMING "Resuming print" +#endif +#ifndef MSG_PRINT_ABORTED #define MSG_PRINT_ABORTED "Print aborted" +#endif +#ifndef MSG_NO_MOVE #define MSG_NO_MOVE "No move." +#endif +#ifndef MSG_KILLED #define MSG_KILLED "KILLED. " +#endif +#ifndef MSG_STOPPED #define MSG_STOPPED "STOPPED. " +#endif +#ifndef MSG_CONTROL_RETRACT #define MSG_CONTROL_RETRACT "Retract mm" +#endif +#ifndef MSG_CONTROL_RETRACT_SWAP #define MSG_CONTROL_RETRACT_SWAP "Swap Re.mm" +#endif +#ifndef MSG_CONTROL_RETRACTF #define MSG_CONTROL_RETRACTF "Retract V" +#endif +#ifndef MSG_CONTROL_RETRACT_ZLIFT #define MSG_CONTROL_RETRACT_ZLIFT "Hop mm" +#endif +#ifndef MSG_CONTROL_RETRACT_RECOVER #define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" +#endif +#ifndef MSG_CONTROL_RETRACT_RECOVER_SWAP #define MSG_CONTROL_RETRACT_RECOVER_SWAP "S UnRet+mm" +#endif +#ifndef MSG_CONTROL_RETRACT_RECOVERF #define MSG_CONTROL_RETRACT_RECOVERF "UnRet V" +#endif +#ifndef MSG_AUTORETRACT #define MSG_AUTORETRACT "AutoRetr." +#endif +#ifndef MSG_FILAMENTCHANGE #define MSG_FILAMENTCHANGE "Change filament" +#endif +#ifndef MSG_INIT_SDCARD #define MSG_INIT_SDCARD "Init. SD card" +#endif +#ifndef MSG_CNG_SDCARD #define MSG_CNG_SDCARD "Change SD card" +#endif +#ifndef MSG_ZPROBE_OUT #define MSG_ZPROBE_OUT "Z probe out. bed" +#endif +#ifndef MSG_POSITION_UNKNOWN #define MSG_POSITION_UNKNOWN "Home X/Y before Z" +#endif +#ifndef MSG_ZPROBE_ZOFFSET #define MSG_ZPROBE_ZOFFSET "Z Offset" +#endif +#ifndef MSG_BABYSTEP_X #define MSG_BABYSTEP_X "Babystep X" +#endif +#ifndef MSG_BABYSTEP_Y #define MSG_BABYSTEP_Y "Babystep Y" +#endif +#ifndef MSG_BABYSTEP_Z #define MSG_BABYSTEP_Z "Babystep Z" +#endif +#ifndef MSG_ENDSTOP_ABORT #define MSG_ENDSTOP_ABORT "Endstop abort" +#endif #ifdef DELTA_CALIBRATION_MENU + #ifndef MSG_DELTA_CALIBRATE #define MSG_DELTA_CALIBRATE "Delta Calibration" + #endif + #ifndef MSG_DELTA_CALIBRATE_X #define MSG_DELTA_CALIBRATE_X "Calibrate X" + #endif + #ifndef MSG_DELTA_CALIBRATE_Y #define MSG_DELTA_CALIBRATE_Y "Calibrate Y" + #endif + #ifndef MSG_DELTA_CALIBRATE_Z #define MSG_DELTA_CALIBRATE_Z "Calibrate Z" + #endif + #ifndef MSG_DELTA_CALIBRATE_CENTER #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" + #endif #endif // DELTA_CALIBRATION_MENU #endif // LANGUAGE_EN_H From e7ecf14d0c56f4103d5092ba81f470676c9c1149 Mon Sep 17 00:00:00 2001 From: Souko Date: Mon, 9 Feb 2015 21:46:06 +0100 Subject: [PATCH 07/12] Update ultralcd_st7920_u8glib_rrd.h Fixed delay-times during Init. REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER won't get initialized on some Boards because delay was to short. --- Marlin/ultralcd_st7920_u8glib_rrd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/ultralcd_st7920_u8glib_rrd.h b/Marlin/ultralcd_st7920_u8glib_rrd.h index 386e312e5..15e9e9d34 100644 --- a/Marlin/ultralcd_st7920_u8glib_rrd.h +++ b/Marlin/ultralcd_st7920_u8glib_rrd.h @@ -55,11 +55,11 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo WRITE(ST7920_CLK_PIN,1); ST7920_CS(); - u8g_Delay(90); //initial delay for boot up + u8g_Delay(120); //initial delay for boot up ST7920_SET_CMD(); ST7920_WRITE_BYTE(0x08); //display off, cursor+blink off ST7920_WRITE_BYTE(0x01); //clear CGRAM ram - u8g_Delay(10); //delay for CGRAM clear + u8g_Delay(15); //delay for CGRAM clear ST7920_WRITE_BYTE(0x3E); //extended mode + GDRAM active for(y=0;y Date: Tue, 10 Feb 2015 00:13:46 +0100 Subject: [PATCH 08/12] Fix for #1485 --- Marlin/Configuration_adv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index a503e640f..4d3579d24 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -228,7 +228,7 @@ #define INVERT_Z_STEP_PIN false #define INVERT_E_STEP_PIN false -//default stepper release if idle +//default stepper release if idle. Set to 0 to deactivate. #define DEFAULT_STEPPER_DEACTIVE_TIME 60 #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate From c246026bda71d1ae38ce4b3523f7854b3e12b1ea Mon Sep 17 00:00:00 2001 From: AnHardt Date: Tue, 10 Feb 2015 00:23:39 +0100 Subject: [PATCH 09/12] Sorry. --- Marlin/example_configurations/Hephestos/Configuration_adv.h | 2 +- Marlin/example_configurations/K8200/Configuration_adv.h | 2 +- Marlin/example_configurations/SCARA/Configuration_adv.h | 2 +- Marlin/example_configurations/WITBOX/Configuration_adv.h | 2 +- Marlin/example_configurations/delta/Configuration_adv.h | 2 +- Marlin/example_configurations/makibox/Configuration_adv.h | 2 +- Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index 333396772..1412c9941 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -228,7 +228,7 @@ #define INVERT_Z_STEP_PIN false #define INVERT_E_STEP_PIN false -//default stepper release if idle +//default stepper release if idle. Set to 0 to deactivate. #define DEFAULT_STEPPER_DEACTIVE_TIME 60 #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index a7f55854c..b3d9ed840 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -228,7 +228,7 @@ #define INVERT_Z_STEP_PIN false #define INVERT_E_STEP_PIN false -//default stepper release if idle +//default stepper release if idle. Set to 0 to deactivate. #define DEFAULT_STEPPER_DEACTIVE_TIME 60 #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 8c65ad26c..43320500f 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -228,7 +228,7 @@ #define INVERT_Z_STEP_PIN false #define INVERT_E_STEP_PIN false -//default stepper release if idle +//default stepper release if idle. Set to 0 to deactivate. #define DEFAULT_STEPPER_DEACTIVE_TIME 240 #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index 333396772..1412c9941 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -228,7 +228,7 @@ #define INVERT_Z_STEP_PIN false #define INVERT_E_STEP_PIN false -//default stepper release if idle +//default stepper release if idle. Set to 0 to deactivate. #define DEFAULT_STEPPER_DEACTIVE_TIME 60 #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate diff --git a/Marlin/example_configurations/delta/Configuration_adv.h b/Marlin/example_configurations/delta/Configuration_adv.h index 7150c2c88..b3fd53248 100644 --- a/Marlin/example_configurations/delta/Configuration_adv.h +++ b/Marlin/example_configurations/delta/Configuration_adv.h @@ -226,7 +226,7 @@ #define INVERT_Z_STEP_PIN false #define INVERT_E_STEP_PIN false -//default stepper release if idle +//default stepper release if idle. Set to 0 to deactivate. #define DEFAULT_STEPPER_DEACTIVE_TIME 60 #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index bf646f0f4..e6a3c1ccd 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -225,7 +225,7 @@ #define INVERT_Z_STEP_PIN false #define INVERT_E_STEP_PIN false -//default stepper release if idle +//default stepper release if idle. Set to 0 to deactivate. #define DEFAULT_STEPPER_DEACTIVE_TIME 60 #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 6f1bf7322..fc3c3f53c 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -227,7 +227,7 @@ #define INVERT_Z_STEP_PIN false #define INVERT_E_STEP_PIN false -//default stepper release if idle +//default stepper release if idle. Set to 0 to deactivate. #define DEFAULT_STEPPER_DEACTIVE_TIME 60 #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate From 4546c92f5bb3e577ba3df15befde728ebc388133 Mon Sep 17 00:00:00 2001 From: Wurstnase Date: Tue, 10 Feb 2015 09:00:48 +0100 Subject: [PATCH 10/12] X and Y must be Integers not Float! https://github.com/Wurstnase/Marlin/blob/Development/Marlin/Configuration.h#L427 --- Documentation/BedLeveling.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/BedLeveling.md b/Documentation/BedLeveling.md index 62566ac7b..35a38bb3a 100644 --- a/Documentation/BedLeveling.md +++ b/Documentation/BedLeveling.md @@ -60,9 +60,9 @@ My preferred method: * g) You can raise the z probe with M402 command; * h) Fill the defines bellow multiplying the values by "-1" (just change the signal) - -* \#define X_PROBE_OFFSET_FROM_EXTRUDER -24.3 -* \#define Y_PROBE_OFFSET_FROM_EXTRUDER 31.4 +* X and Y-Offset must be Integers! +* \#define X_PROBE_OFFSET_FROM_EXTRUDER -24 +* \#define Y_PROBE_OFFSET_FROM_EXTRUDER 31 * \#define Z_PROBE_OFFSET_FROM_EXTRUDER -5.1 Sled Option Notes From b3bda57ca25757ad78d432967c5a524220a14795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20FRANCOIS?= Date: Wed, 11 Feb 2015 07:12:02 +0100 Subject: [PATCH 11/12] reverted to upstream --- Marlin/Configuration_adv.h | 4 ++-- Marlin/example_configurations/delta/Configuration.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 5cda92101..4d3579d24 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -213,7 +213,7 @@ //homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: #define X_HOME_RETRACT_MM 5 #define Y_HOME_RETRACT_MM 5 -#define Z_HOME_RETRACT_MM 5 +#define Z_HOME_RETRACT_MM 2 //#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. #define AXIS_RELATIVE_MODES {false, false, false, false} @@ -248,7 +248,7 @@ #define DEFAULT_MINSEGMENTTIME 20000 // If defined the movements slow down when the look ahead buffer is only half full -// #define SLOWDOWN // JFR - important, was enabled!! +#define SLOWDOWN // Frequency limit // See nophead's blog for more info diff --git a/Marlin/example_configurations/delta/Configuration.h b/Marlin/example_configurations/delta/Configuration.h index d50d3cfca..3eb268041 100644 --- a/Marlin/example_configurations/delta/Configuration.h +++ b/Marlin/example_configurations/delta/Configuration.h @@ -88,6 +88,8 @@ Here are some standard links for getting your machine calibrated: // and processor overload (too many expensive sqrt calls). #define DELTA_SEGMENTS_PER_SECOND 200 +// NOTE NB all values for DELTA_* values MUST be floating point, so always have a decimal point in them + // Center-to-center distance of the holes in the diagonal push rods. #define DELTA_DIAGONAL_ROD 250.0 // mm From 22a79854456f1da5f966a683be1e8a64555e065f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20FRANCOIS?= Date: Wed, 11 Feb 2015 07:12:55 +0100 Subject: [PATCH 12/12] reverted to upstream --- Marlin/Marlin.pde | 56 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Marlin/Marlin.pde diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde new file mode 100644 index 000000000..79c934bf0 --- /dev/null +++ b/Marlin/Marlin.pde @@ -0,0 +1,56 @@ +/* -*- c++ -*- */ + +/* + Reprap firmware based on Sprinter and grbl. + Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + +/* + This firmware is a mashup between Sprinter and grbl. + (https://github.com/kliment/Sprinter) + (https://github.com/simen/grbl/tree) + + It has preliminary support for Matthew Roberts advance algorithm + http://reprap.org/pipermail/reprap-dev/2011-May/003323.html + */ + +/* All the implementation is done in *.cpp files to get better compatibility with avr-gcc without the Arduino IDE */ +/* Use this file to help the Arduino IDE find which Arduino libraries are needed and to keep documentation on GCode */ + +#include "Configuration.h" +#include "pins.h" + +#ifdef ULTRA_LCD + #if defined(LCD_I2C_TYPE_PCF8575) + #include + #include + #elif defined(LCD_I2C_TYPE_MCP23017) || defined(LCD_I2C_TYPE_MCP23008) + #include + #include + #elif defined(DOGLCD) + #include // library for graphics LCD by Oli Kraus (https://code.google.com/p/u8glib/) + #else + #include // library for character LCD + #endif +#endif + +#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1 +#include +#endif + +#if defined(DIGIPOT_I2C) + #include +#endif