From 7a2d1f5aeb85225a7d71e8b95982e36c5fb17722 Mon Sep 17 00:00:00 2001 From: Bernhard Kubicek Date: Sat, 19 Nov 2011 18:22:22 +0100 Subject: [PATCH 1/4] add M17, so the enable stepper button works in repg. --- Marlin/Marlin.pde | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde index f619854da..021a921f7 100644 --- a/Marlin/Marlin.pde +++ b/Marlin/Marlin.pde @@ -70,6 +70,8 @@ // M114 - Display current position //Custom M Codes +// M17 - Enable/Power all stepper motors +// M18 - Disaable all stepper motors; same as M84 // M20 - List SD card // M21 - Init SD card // M22 - Release SD card @@ -569,6 +571,13 @@ inline void process_commands() switch( (int)code_value() ) { + case 17: + LCD_MESSAGEPGM("No move."); + enable_x(); + enable_y(); + enable_z(); + enable_e(); + break; #ifdef SDSUPPORT case 20: // M20 - list SD card From 5ad1d19384ba3ea8a1e6c33babc63de1d28acf31 Mon Sep 17 00:00:00 2001 From: Bernhard Kubicek Date: Sat, 19 Nov 2011 20:18:54 +0100 Subject: [PATCH 2/4] make it compile without sd_support --- Marlin/cardreader.h | 14 +++++++------- Marlin/cardreader.pde | 6 +----- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Marlin/cardreader.h b/Marlin/cardreader.h index d96715807..653f59452 100644 --- a/Marlin/cardreader.h +++ b/Marlin/cardreader.h @@ -20,17 +20,15 @@ public: void closefile(); void release(); void startFileprint(); - //void startFilewrite(char *name); void pauseSDPrint(); void getStatus(); - void cd(char * absolutPath); - //void selectFile(char* name); + void getfilename(const uint8_t nr); uint16_t getnrfilenames(); void ls(); - void lsDive(char *prepend,SdFile parent); + inline bool eof() { return sdpos>=filesize ;}; inline int16_t get() { sdpos = file.curPosition();return (int16_t)file.read();}; @@ -57,10 +55,13 @@ private: LsAction lsAction; //stored for recursion. int16_t nrFiles; //counter for the files in the current directory and recycled as position counter for getting the nrFiles'th name in the directory. char* diveDirName; + void lsDive(char *prepend,SdFile parent); }; #else + +#define dir_t bool class CardReader { public: @@ -71,6 +72,7 @@ public: inline static void checkautostart(bool x) {}; + inline static void openFile(char* name,bool read){}; inline static void closefile() {}; inline static void release(){}; inline static void startFileprint(){}; @@ -87,9 +89,7 @@ public: inline static bool eof() {return true;}; inline static char get() {return 0;}; inline static void setIndex(){}; + inline uint8_t percentDone(){return 0;}; }; #endif //SDSUPPORT - - - #endif \ No newline at end of file diff --git a/Marlin/cardreader.pde b/Marlin/cardreader.pde index 2771668a4..bab87834e 100644 --- a/Marlin/cardreader.pde +++ b/Marlin/cardreader.pde @@ -1,5 +1,5 @@ -#ifdef SDSUPPORT #include "cardreader.h" +#ifdef SDSUPPORT CardReader::CardReader() { @@ -378,9 +378,5 @@ uint16_t CardReader::getnrfilenames() return nrFiles; } -void CardReader::cd(char * absolutPath) -{ - -} #endif //SDSUPPORT \ No newline at end of file From 8a1e719a3fd064c0ac0e64ce22d7e6fcd797d342 Mon Sep 17 00:00:00 2001 From: Bernhard Kubicek Date: Sat, 19 Nov 2011 20:52:43 +0100 Subject: [PATCH 3/4] overworked config file --- Marlin/Configuration.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index f9a136702..31884782d 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -90,6 +90,9 @@ #define PIDTEMP #ifdef PIDTEMP + #if MOTHERBOARD == 62 + #error Sanguinololu does not support PID, sorry. Please disable it. + #endif //#define PID_DEBUG // Sends debug data to the serial port. //#define PID_OPENLOOP 1 // Puts PID in open loop. M104 sets the output power in % @@ -195,7 +198,6 @@ const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the //// MOVEMENT SETTINGS #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E -//note: on bernhards ultimaker 200 200 12 are working well. #define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min) #define AXIS_RELATIVE_MODES {false, false, false, false} @@ -205,7 +207,7 @@ const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the // default settings #define DEFAULT_AXIS_STEPS_PER_UNIT {78.7402,78.7402,200*8/3,760*1.1} // default steps per unit for ultimaker -//#define DEFAULT_AXIS_STEPS_PER_UNIT {40, 40, 3333.92, 67} +//#define DEFAULT_AXIS_STEPS_PER_UNIT {40, 40, 3333.92, 67} //sells mendel with v9 extruder #define DEFAULT_MAX_FEEDRATE {500, 500, 5, 200000} // (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. @@ -239,7 +241,8 @@ const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the #define EEPROM_CHITCHAT -// The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature +// The hardware watchdog should halt the Microcontroller, in case the firmware gets stuck somewhere. However: +// the Watchdog is not working well, so please only enable this for testing // this enables the watchdog interrupt. //#define USE_WATCHDOG //#ifdef USE_WATCHDOG @@ -272,7 +275,7 @@ const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the //#define ULTRA_LCD //general lcd support, also 16x2 //#define SDSUPPORT // Enable SD Card Support in Hardware Console -#define ULTIPANEL +//#define ULTIPANEL #ifdef ULTIPANEL //#define NEWPANEL //enable this if you have a click-encoder panel #define SDSUPPORT @@ -295,8 +298,13 @@ const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the #define N_ARC_CORRECTION 25 -//automatic temperature: just for testing, this is very dangerous, keep disabled! -// not working yet. +//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode. +//The maximum buffered steps/sec of the extruder motor are called "se". +//You enter the autotemp mode by a M109 S T F +// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp +// you exit the value by any M109 without F* +// Also, if the temperature is set to a value Date: Sat, 19 Nov 2011 21:01:07 +0100 Subject: [PATCH 4/4] update mcode documentation --- Marlin/Marlin.pde | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde index 021a921f7..d942047b7 100644 --- a/Marlin/Marlin.pde +++ b/Marlin/Marlin.pde @@ -71,7 +71,7 @@ //Custom M Codes // M17 - Enable/Power all stepper motors -// M18 - Disaable all stepper motors; same as M84 +// M18 - Disable all stepper motors; same as M84 // M20 - List SD card // M21 - Init SD card // M22 - Release SD card @@ -92,7 +92,9 @@ // or use S to specify an inactivity timeout, after which the steppers will be disabled. S0 to disable the timeout. // M85 - Set inactivity shutdown timer with parameter S. To disable set zero (default) // M92 - Set axis_steps_per_unit - same syntax as G92 +// M114 - Output current position to serial port // M115 - Capabilities string +// M119 - Output Endstop status to serial port // M140 - Set bed target temp // M190 - Wait for bed current temp to reach target temp. // M200 - Set filament diameter