From 376d8af2c8f2eb53583c9689f2871256f32a7e7f Mon Sep 17 00:00:00 2001 From: Guillaume Seguin Date: Wed, 29 May 2013 18:06:12 +0200 Subject: [PATCH 01/11] Report temperatures for all extruders --- Marlin/Marlin_main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 007991781b..942b43bc1d 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1220,6 +1220,14 @@ void process_commands() SERIAL_PROTOCOL_F(degTargetBed(),1); #endif //TEMP_BED_PIN #else + for (int8_t cur_extruder = 0; cur_extruder < EXTRUDERS; ++cur_extruder) { + SERIAL_PROTOCOLPGM(" T"); + SERIAL_PROTOCOL(cur_extruder); + SERIAL_PROTOCOLPGM(":"); + SERIAL_PROTOCOL_F(degHotend(cur_extruder),1); + SERIAL_PROTOCOLPGM(" /"); + SERIAL_PROTOCOL_F(degTargetHotend(cur_extruder),1); + } SERIAL_ERROR_START; SERIAL_ERRORLNPGM(MSG_ERR_NO_THERMISTORS); #endif From 6c42a3a33969bc55a32998c489c78bc522b3f773 Mon Sep 17 00:00:00 2001 From: Guillaume Seguin Date: Tue, 23 Jul 2013 23:34:42 +0200 Subject: [PATCH 02/11] Woops, fix logic --- 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 942b43bc1d..800cc8ae23 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1219,7 +1219,6 @@ void process_commands() SERIAL_PROTOCOLPGM(" /"); SERIAL_PROTOCOL_F(degTargetBed(),1); #endif //TEMP_BED_PIN - #else for (int8_t cur_extruder = 0; cur_extruder < EXTRUDERS; ++cur_extruder) { SERIAL_PROTOCOLPGM(" T"); SERIAL_PROTOCOL(cur_extruder); @@ -1228,6 +1227,7 @@ void process_commands() SERIAL_PROTOCOLPGM(" /"); SERIAL_PROTOCOL_F(degTargetHotend(cur_extruder),1); } + #else SERIAL_ERROR_START; SERIAL_ERRORLNPGM(MSG_ERR_NO_THERMISTORS); #endif From 4d435c38a64447209fe229aac7c0ff1af49cb4b2 Mon Sep 17 00:00:00 2001 From: Guillaume Seguin Date: Wed, 24 Jul 2013 12:09:53 +0200 Subject: [PATCH 03/11] Add support of LiquidTWI2-based panels to Makefile Use LIQUID_TWI2=1 as make argument to enable this support --- Marlin/Makefile | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/Marlin/Makefile b/Marlin/Makefile index a56bc1eab1..5cc25ea014 100644 --- a/Marlin/Makefile +++ b/Marlin/Makefile @@ -54,6 +54,9 @@ UPLOAD_PORT ?= /dev/arduino #Directory used to build files in, contains all the build files, from object files to the final hex file. BUILD_DIR ?= applet +# This defines whether Liquid_TWI2 support will be built +LIQUID_TWI2 ?= 0 + ############################################################################ # Below here nothing should be changed... @@ -199,9 +202,19 @@ VPATH += $(HARDWARE_SRC) ifeq ($(HARDWARE_VARIANT), arduino) VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal VPATH += $(ARDUINO_INSTALL_DIR)/libraries/SPI +ifeq ($(LIQUID_TWI2), 1) +VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire +VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility +VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidTWI2 +endif else VPATH += $(HARDWARE_DIR)/libraries/LiquidCrystal VPATH += $(HARDWARE_DIR)/libraries/SPI +ifeq ($(LIQUID_TWI2), 1) +VPATH += $(HARDWARE_DIR)/libraries/Wire +VPATH += $(HARDWARE_DIR)/libraries/Wire/utility +VPATH += $(HARDWARE_DIR)/libraries/LiquidTWI2 +endif endif ifeq ($(HARDWARE_VARIANT), arduino) HARDWARE_SUB_VARIANT ?= mega @@ -218,8 +231,13 @@ CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp \ MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp \ SdFile.cpp SdVolume.cpp motion_control.cpp planner.cpp \ stepper.cpp temperature.cpp cardreader.cpp ConfigurationStore.cpp \ - watchdog.cpp -CXXSRC += LiquidCrystal.cpp ultralcd.cpp SPI.cpp Servo.cpp Tone.cpp + watchdog.cpp SPI.cpp Servo.cpp Tone.cpp ultralcd.cpp +ifeq ($(LIQUID_TWI2), 0) +CXXSRC += LiquidCrystal.cpp +else +SRC += twi.c +CXXSRC += Wire.cpp LiquidTWI2.cpp +endif #Check for Arduino 1.0.0 or higher and use the correct sourcefiles for that version ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true) From aae42c68f94653b44c8ece27aa89a35152d7e4e3 Mon Sep 17 00:00:00 2001 From: Guillaume Seguin Date: Sun, 28 Jul 2013 18:18:41 +0200 Subject: [PATCH 04/11] Update French translation in language.h --- Marlin/language.h | 139 ++++++++++++++++++++++------------------------ 1 file changed, 67 insertions(+), 72 deletions(-) diff --git a/Marlin/language.h b/Marlin/language.h index 17222c7cd2..39e459f94d 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -373,96 +373,91 @@ #if LANGUAGE_CHOICE == 3 - #define WELCOME_MSG MACHINE_NAME " Pret." + #define WELCOME_MSG MACHINE_NAME " prete." #define MSG_SD_INSERTED "Carte inseree" #define MSG_SD_REMOVED "Carte retiree" - #define MSG_MAIN " Principal \003" - #define MSG_AUTOSTART " Demarrage auto." - #define MSG_DISABLE_STEPPERS " Desactiver moteurs" - #define MSG_AUTO_HOME " Home auto." - #define MSG_SET_ORIGIN " Regler origine" + #define MSG_MAIN "Menu principal" + #define MSG_AUTOSTART "Demarrage auto" + #define MSG_DISABLE_STEPPERS "Arreter moteurs" + #define MSG_AUTO_HOME "Home auto." + #define MSG_SET_ORIGIN "Regler origine" #define MSG_PREHEAT_PLA " Prechauffage PLA" #define MSG_PREHEAT_PLA_SETTINGS " Regl. prechauffe PLA" - #define MSG_PREHEAT_ABS " Prechauffage ABS" - #define MSG_PREHEAT_ABS_SETTINGS " Regl. prechauffe ABS" - #define MSG_COOLDOWN " Refroidissement" - #define MSG_SWITCH_PS_ON "Allumer alimentation" - #define MSG_SWITCH_PS_OFF "Eteindre alimentation" - #define MSG_EXTRUDE " Extrusion" - #define MSG_RETRACT " Retractation" - #define MSG_PREHEAT_PLA " Prechauffage PLA" - #define MSG_PREHEAT_ABS " Prechauffage ABS" - #define MSG_MOVE_AXIS " Deplacer axe \x7E" - #define MSG_SPEED " Vitesse:" - #define MSG_NOZZLE " \002Buse:" - #define MSG_NOZZLE1 " \002Buse2:" - #define MSG_NOZZLE2 " \002Buse3:" - #define MSG_BED " \002Lit:" - #define MSG_FAN_SPEED " Vitesse ventilateur:" - #define MSG_FLOW " Flux:" - #define MSG_CONTROL " Controle \003" - #define MSG_MIN " \002 Min:" - #define MSG_MAX " \002 Max:" - #define MSG_FACTOR " \002 Facteur:" - #define MSG_AUTOTEMP " Temp. Auto.:" + #define MSG_PREHEAT_ABS "Prechauffage ABS" + #define MSG_PREHEAT_ABS_SETTINGS "Regl. prechauffe ABS" + #define MSG_COOLDOWN "Refroidir" + #define MSG_SWITCH_PS_ON "Allumer alim." + #define MSG_SWITCH_PS_OFF "Eteindre alim." + #define MSG_EXTRUDE "Extrusion" + #define MSG_RETRACT "Retraction" + #define MSG_PREHEAT_PLA "Prechauffage PLA" + #define MSG_PREHEAT_ABS "Prechauffage ABS" + #define MSG_MOVE_AXIS "Deplacer un axe" + #define MSG_SPEED " Vitesse" + #define MSG_NOZZLE "Buse" + #define MSG_NOZZLE1 "Buse2" + #define MSG_NOZZLE2 "Buse3" + #define MSG_BED "Plateau" + #define MSG_FAN_SPEED "Vitesse ventilateur" + #define MSG_FLOW "Flux" + #define MSG_CONTROL "Controler" + #define MSG_MIN " \002 Min" + #define MSG_MAX " \002 Max" + #define MSG_FACTOR " \002 Facteur" + #define MSG_AUTOTEMP "Temp. Auto." #define MSG_ON "Marche " #define MSG_OFF "Arret" - #define MSG_PID_P " PID-P: " - #define MSG_PID_I " PID-I: " - #define MSG_PID_D " PID-D: " - #define MSG_PID_C " PID-C: " - #define MSG_ACC " Acc:" + #define MSG_PID_P "PID-P" + #define MSG_PID_I "PID-I" + #define MSG_PID_D "PID-D" + #define MSG_PID_C "PID-C" + #define MSG_ACC "Accel" #define MSG_VXY_JERK "Vxy-jerk" #define MSG_VZ_JERK "Vz-jerk" #define MSG_VE_JERK "Ve-jerk" - #define MSG_VMAX " Vmax " - #define MSG_X "x:" - #define MSG_Y "y:" - #define MSG_Z "z:" - #define MSG_E "e:" - #define MSG_VMIN " Vmin:" - #define MSG_VTRAV_MIN " Vdepl min:" - #define MSG_AMAX " Amax " - #define MSG_A_RETRACT " A-retract:" - #define MSG_XSTEPS " Xpas/mm:" - #define MSG_YSTEPS " Ypas/mm:" - #define MSG_ZSTEPS " Zpas/mm:" - #define MSG_ESTEPS " Epas/mm:" - #define MSG_MAIN_WIDE " Principal \003" - #define MSG_RECTRACT "Rectracter" + #define MSG_VMAX "Vmax" + #define MSG_X "x" + #define MSG_Y "y" + #define MSG_Z "z" + #define MSG_E "e" + #define MSG_VMIN "Vmin" + #define MSG_VTRAV_MIN "Vdepl min" + #define MSG_AMAX "Amax " + #define MSG_A_RETRACT "A-retract" + #define MSG_XSTEPS "Xpas/mm" + #define MSG_YSTEPS "Ypas/mm" + #define MSG_ZSTEPS "Zpas/mm" + #define MSG_ESTEPS "Epas/mm" #define MSG_TEMPERATURE "Temperature" #define MSG_MOTION "Mouvement" - #define MSG_CONTRAST "LCD contrast" - #define MSG_STORE_EPROM " Sauvegarder memoire" - #define MSG_LOAD_EPROM " Lire memoire" - #define MSG_RESTORE_FAILSAFE " Restaurer memoire" - #define MSG_REFRESH "\004Actualiser" - #define MSG_WATCH " Surveiller \003" - #define MSG_PREPARE " Preparer \x7E" - #define MSG_PREPARE_ALT " Prepare \003" - #define MSG_CONTROL_ARROW " Controle \x7E" - #define MSG_RETRACT_ARROW " Retracter \x7E" - #define MSG_TUNE " Regler \x7E" - #define MSG_PAUSE_PRINT " Pause impression \x7E" - #define MSG_RESUME_PRINT " Reprendre impression \x7E" - #define MSG_STOP_PRINT " Arreter impression \x7E" - #define MSG_CARD_MENU " Menu carte \x7E" - #define MSG_NO_CARD " Pas de carte" + #define MSG_CONTRAST "Contraste LCD" + #define MSG_STORE_EPROM "Sauver config" + #define MSG_LOAD_EPROM "Lire config" + #define MSG_RESTORE_FAILSAFE "Restaurer defauts" + #define MSG_REFRESH "Actualiser" + #define MSG_WATCH "Surveiller" + #define MSG_PREPARE "Preparer" + #define MSG_TUNE "Regler" + #define MSG_PAUSE_PRINT "Interrompre impr." + #define MSG_RESUME_PRINT "Reprendre impr." + #define MSG_STOP_PRINT "Arreter impr." + #define MSG_CARD_MENU "Impr. depuis SD" + #define MSG_NO_CARD "Pas de carte" #define MSG_DWELL "Repos..." #define MSG_USERWAIT "Attente de l'utilisateur..." #define MSG_RESUMING "Reprise de l'impression" #define MSG_NO_MOVE "Aucun mouvement." #define MSG_PART_RELEASE "Relache partielle" - #define MSG_KILLED "TUE." + #define MSG_KILLED "MORT." #define MSG_STOPPED "STOPPE." #define MSG_STEPPER_RELEASED "RELACHE." - #define MSG_CONTROL_RETRACT " Retractation mm:" - #define MSG_CONTROL_RETRACTF " Retractation F:" - #define MSG_CONTROL_RETRACT_ZLIFT " Hop mm:" - #define MSG_CONTROL_RETRACT_RECOVER " UnRet +mm:" - #define MSG_CONTROL_RETRACT_RECOVERF " UnRet F:" - #define MSG_AUTORETRACT " Retract. Auto.:" - #define MSG_FILAMENTCHANGE "Change filament" + #define MSG_CONTROL_RETRACT "Retraction mm" + #define MSG_CONTROL_RETRACTF "Retraction F" + #define MSG_CONTROL_RETRACT_ZLIFT "Hop mm" + #define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" + #define MSG_CONTROL_RETRACT_RECOVERF "UnRet F" + #define MSG_AUTORETRACT "Retract. Auto." + #define MSG_FILAMENTCHANGE "Changer filament" #define MSG_INIT_SDCARD "Init. la carte SD" #define MSG_CNG_SDCARD "Changer de carte SD" From f4c3135c6da8d88776218c2257962d46d09d5e97 Mon Sep 17 00:00:00 2001 From: Guillaume Seguin Date: Sun, 28 Jul 2013 19:19:57 +0200 Subject: [PATCH 05/11] Add Panelolu2 pins for RAMPS1.3 --- Marlin/pins.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Marlin/pins.h b/Marlin/pins.h index 60235800a4..4e53d07ac2 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -485,6 +485,14 @@ #define BTN_ENC 35 #define SDCARDDETECT 49 + #elif defined(LCD_I2C_PANELOLU2) + #define BTN_EN1 47 //reverse if the encoder turns the wrong way. + #define BTN_EN2 43 + #define BTN_ENC 32 + #define SDSS 53 + #define SDCARDDETECT -1 + #define KILL_PIN 41 + #define FAN_PIN 45 #else //arduino pin which triggers an piezzo beeper #define BEEPER 33 // Beeper on AUX-4 From abc8320a689d567795bbf177352a2e86785af66e Mon Sep 17 00:00:00 2001 From: Brendan-csel Date: Mon, 29 Jul 2013 20:58:09 +1200 Subject: [PATCH 06/11] Save LCD_CLICKED before it is cleared The SD card menu was refreshing so slowly that the button interrupt was clearing LCD_CLICKED before the menu items could check it. --- Marlin/ultralcd.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 163c414293..25ed3ef9ce 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -96,6 +96,7 @@ static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned l if (encoderPosition > 0x8000) encoderPosition = 0; \ if (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM < currentMenuViewOffset) currentMenuViewOffset = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM;\ uint8_t _lineNr = currentMenuViewOffset, _menuItemNr; \ + bool wasClicked = LCD_CLICKED;\ for(uint8_t _drawLineNr = 0; _drawLineNr < LCD_HEIGHT; _drawLineNr++, _lineNr++) { \ _menuItemNr = 0; #define MENU_ITEM(type, label, args...) do { \ @@ -108,7 +109,7 @@ static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned l lcd_implementation_drawmenu_ ## type (_drawLineNr, _label_pstr , ## args ); \ }\ }\ - if (LCD_CLICKED && (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) == _menuItemNr) {\ + if (wasClicked && (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) == _menuItemNr) {\ lcd_quick_feedback(); \ menu_action_ ## type ( args ); \ return;\ From d7f384f680479ab3e901196395d2ebf9bb584117 Mon Sep 17 00:00:00 2001 From: Brendan-csel Date: Mon, 29 Jul 2013 21:00:29 +1200 Subject: [PATCH 07/11] Skip SD menu refresh if nothing has changed --- Marlin/ultralcd.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 25ed3ef9ce..bb98421784 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -695,6 +695,8 @@ static void lcd_sd_updir() void lcd_sdcard_menu() { + if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) + return; // nothing to do (so don't thrash the SD card) uint16_t fileCnt = card.getnrfilenames(); START_MENU(); MENU_ITEM(back, MSG_MAIN, lcd_main_menu); From 4623e78ce0739437301b8e9944dbc761cad1f246 Mon Sep 17 00:00:00 2001 From: Nicolas Rossi Date: Tue, 30 Jul 2013 14:01:41 +0200 Subject: [PATCH 08/11] Added Honeywell thermistor 135-104LAF-J01 --- Marlin/Configuration.h | 1 + Marlin/thermistortables.h | 152 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 153 insertions(+) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index db02b1d5f6..158214a648 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -124,6 +124,7 @@ // 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan) (4.7k pullup) // 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) // 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) +// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) // 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) // 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) // 10 is 100k RS thermistor 198-961 (4.7k pullup) diff --git a/Marlin/thermistortables.h b/Marlin/thermistortables.h index 09182208f7..ecac95fe30 100644 --- a/Marlin/thermistortables.h +++ b/Marlin/thermistortables.h @@ -314,6 +314,158 @@ const short temptable_7[][2] PROGMEM = { {1023*OVERSAMPLENR, 0} //to allow internal 0 degrees C }; #endif + +#if (THERMISTORHEATER_0 == 71) || (THERMISTORHEATER_1 == 71) || (THERMISTORHEATER_2 == 71) || (THERMISTORBED == 71) // 100k Honeywell 135-104LAF-J01 +// R0 = 100000 Ohm +// T0 = 25 °C +// Beta = 3974 +// R1 = 0 Ohm +// R2 = 4700 Ohm +const short temptable_71[][2] PROGMEM = { + {35*OVERSAMPLENR, 300}, + {51*OVERSAMPLENR, 270}, + {54*OVERSAMPLENR, 265}, + {58*OVERSAMPLENR, 260}, + {59*OVERSAMPLENR, 258}, + {61*OVERSAMPLENR, 256}, + {63*OVERSAMPLENR, 254}, + {64*OVERSAMPLENR, 252}, + {66*OVERSAMPLENR, 250}, + {67*OVERSAMPLENR, 249}, + {68*OVERSAMPLENR, 248}, + {69*OVERSAMPLENR, 247}, + {70*OVERSAMPLENR, 246}, + {71*OVERSAMPLENR, 245}, + {72*OVERSAMPLENR, 244}, + {73*OVERSAMPLENR, 243}, + {74*OVERSAMPLENR, 242}, + {75*OVERSAMPLENR, 241}, + {76*OVERSAMPLENR, 240}, + {77*OVERSAMPLENR, 239}, + {78*OVERSAMPLENR, 238}, + {79*OVERSAMPLENR, 237}, + {80*OVERSAMPLENR, 236}, + {81*OVERSAMPLENR, 235}, + {82*OVERSAMPLENR, 234}, + {84*OVERSAMPLENR, 233}, + {85*OVERSAMPLENR, 232}, + {86*OVERSAMPLENR, 231}, + {87*OVERSAMPLENR, 230}, + {89*OVERSAMPLENR, 229}, + {90*OVERSAMPLENR, 228}, + {91*OVERSAMPLENR, 227}, + {92*OVERSAMPLENR, 226}, + {94*OVERSAMPLENR, 225}, + {95*OVERSAMPLENR, 224}, + {97*OVERSAMPLENR, 223}, + {98*OVERSAMPLENR, 222}, + {99*OVERSAMPLENR, 221}, + {101*OVERSAMPLENR, 220}, + {102*OVERSAMPLENR, 219}, + {104*OVERSAMPLENR, 218}, + {106*OVERSAMPLENR, 217}, + {107*OVERSAMPLENR, 216}, + {109*OVERSAMPLENR, 215}, + {110*OVERSAMPLENR, 214}, + {112*OVERSAMPLENR, 213}, + {114*OVERSAMPLENR, 212}, + {115*OVERSAMPLENR, 211}, + {117*OVERSAMPLENR, 210}, + {119*OVERSAMPLENR, 209}, + {121*OVERSAMPLENR, 208}, + {123*OVERSAMPLENR, 207}, + {125*OVERSAMPLENR, 206}, + {126*OVERSAMPLENR, 205}, + {128*OVERSAMPLENR, 204}, + {130*OVERSAMPLENR, 203}, + {132*OVERSAMPLENR, 202}, + {134*OVERSAMPLENR, 201}, + {136*OVERSAMPLENR, 200}, + {139*OVERSAMPLENR, 199}, + {141*OVERSAMPLENR, 198}, + {143*OVERSAMPLENR, 197}, + {145*OVERSAMPLENR, 196}, + {147*OVERSAMPLENR, 195}, + {150*OVERSAMPLENR, 194}, + {152*OVERSAMPLENR, 193}, + {154*OVERSAMPLENR, 192}, + {157*OVERSAMPLENR, 191}, + {159*OVERSAMPLENR, 190}, + {162*OVERSAMPLENR, 189}, + {164*OVERSAMPLENR, 188}, + {167*OVERSAMPLENR, 187}, + {170*OVERSAMPLENR, 186}, + {172*OVERSAMPLENR, 185}, + {175*OVERSAMPLENR, 184}, + {178*OVERSAMPLENR, 183}, + {181*OVERSAMPLENR, 182}, + {184*OVERSAMPLENR, 181}, + {187*OVERSAMPLENR, 180}, + {190*OVERSAMPLENR, 179}, + {193*OVERSAMPLENR, 178}, + {196*OVERSAMPLENR, 177}, + {199*OVERSAMPLENR, 176}, + {202*OVERSAMPLENR, 175}, + {205*OVERSAMPLENR, 174}, + {208*OVERSAMPLENR, 173}, + {212*OVERSAMPLENR, 172}, + {215*OVERSAMPLENR, 171}, + {219*OVERSAMPLENR, 170}, + {237*OVERSAMPLENR, 165}, + {256*OVERSAMPLENR, 160}, + {300*OVERSAMPLENR, 150}, + {351*OVERSAMPLENR, 140}, + {470*OVERSAMPLENR, 120}, + {504*OVERSAMPLENR, 115}, + {538*OVERSAMPLENR, 110}, + {552*OVERSAMPLENR, 108}, + {566*OVERSAMPLENR, 106}, + {580*OVERSAMPLENR, 104}, + {594*OVERSAMPLENR, 102}, + {608*OVERSAMPLENR, 100}, + {622*OVERSAMPLENR, 98}, + {636*OVERSAMPLENR, 96}, + {650*OVERSAMPLENR, 94}, + {664*OVERSAMPLENR, 92}, + {678*OVERSAMPLENR, 90}, + {712*OVERSAMPLENR, 85}, + {745*OVERSAMPLENR, 80}, + {758*OVERSAMPLENR, 78}, + {770*OVERSAMPLENR, 76}, + {783*OVERSAMPLENR, 74}, + {795*OVERSAMPLENR, 72}, + {806*OVERSAMPLENR, 70}, + {818*OVERSAMPLENR, 68}, + {829*OVERSAMPLENR, 66}, + {840*OVERSAMPLENR, 64}, + {850*OVERSAMPLENR, 62}, + {860*OVERSAMPLENR, 60}, + {870*OVERSAMPLENR, 58}, + {879*OVERSAMPLENR, 56}, + {888*OVERSAMPLENR, 54}, + {897*OVERSAMPLENR, 52}, + {905*OVERSAMPLENR, 50}, + {924*OVERSAMPLENR, 45}, + {940*OVERSAMPLENR, 40}, + {955*OVERSAMPLENR, 35}, + {967*OVERSAMPLENR, 30}, + {970*OVERSAMPLENR, 29}, + {972*OVERSAMPLENR, 28}, + {974*OVERSAMPLENR, 27}, + {976*OVERSAMPLENR, 26}, + {978*OVERSAMPLENR, 25}, + {980*OVERSAMPLENR, 24}, + {982*OVERSAMPLENR, 23}, + {984*OVERSAMPLENR, 22}, + {985*OVERSAMPLENR, 21}, + {987*OVERSAMPLENR, 20}, + {995*OVERSAMPLENR, 15}, + {1001*OVERSAMPLENR, 10}, + {1006*OVERSAMPLENR, 5}, + {1010*OVERSAMPLENR, 0}, +}; +#endif + #if (THERMISTORHEATER_0 == 8) || (THERMISTORHEATER_1 == 8) || (THERMISTORHEATER_2 == 8) || (THERMISTORBED == 8) // 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) const short temptable_8[][2] PROGMEM = { From 9bf1cf1b22aa53b6b441854a6b17c0d58b470993 Mon Sep 17 00:00:00 2001 From: Nicolas Rossi Date: Tue, 30 Jul 2013 14:09:21 +0200 Subject: [PATCH 09/11] Pre-calculate diagonal rod length squared --- Marlin/Configuration.h | 3 +++ Marlin/Marlin_main.cpp | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 158214a648..9f6065f26e 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -107,6 +107,9 @@ #define DELTA_TOWER3_X 0.0 // back middle tower #define DELTA_TOWER3_Y DELTA_RADIUS +// Diagonal rod squared +#define DELTA_DIAGONAL_ROD_2 pow(DELTA_DIAGONAL_ROD,2) + //=========================================================================== //=============================Thermal Settings ============================ //=========================================================================== diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 800cc8ae23..c2fb9a7288 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2254,15 +2254,15 @@ void clamp_to_software_endstops(float target[3]) #ifdef DELTA void calculate_delta(float cartesian[3]) { - delta[X_AXIS] = sqrt(sq(DELTA_DIAGONAL_ROD) + delta[X_AXIS] = sqrt(DELTA_DIAGONAL_ROD_2 - sq(DELTA_TOWER1_X-cartesian[X_AXIS]) - sq(DELTA_TOWER1_Y-cartesian[Y_AXIS]) ) + cartesian[Z_AXIS]; - delta[Y_AXIS] = sqrt(sq(DELTA_DIAGONAL_ROD) + delta[Y_AXIS] = sqrt(DELTA_DIAGONAL_ROD_2 - sq(DELTA_TOWER2_X-cartesian[X_AXIS]) - sq(DELTA_TOWER2_Y-cartesian[Y_AXIS]) ) + cartesian[Z_AXIS]; - delta[Z_AXIS] = sqrt(sq(DELTA_DIAGONAL_ROD) + delta[Z_AXIS] = sqrt(DELTA_DIAGONAL_ROD_2 - sq(DELTA_TOWER3_X-cartesian[X_AXIS]) - sq(DELTA_TOWER3_Y-cartesian[Y_AXIS]) ) + cartesian[Z_AXIS]; From 394ed08f8807979aaf7b1fd53939c84ecfa345d9 Mon Sep 17 00:00:00 2001 From: Nicolas Rossi Date: Tue, 30 Jul 2013 14:33:30 +0200 Subject: [PATCH 10/11] Added feedrate setting for manual moves from panel --- Marlin/Configuration_adv.h | 5 +++++ Marlin/ultralcd.cpp | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index f555d60692..58e8b2e6f3 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -193,6 +193,11 @@ #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINTRAVELFEEDRATE 0.0 +// Feedrates for manual moves along X, Y, Z, E from panel +#ifdef ULTIPANEL +#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // set the speeds for manual moves (mm/min) +#endif + // minimum time in microseconds that a movement needs to take if the buffer is emptied. #define DEFAULT_MINSEGMENTTIME 20000 diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index bb98421784..229e23e92d 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -18,6 +18,8 @@ int plaPreheatFanSpeed; int absPreheatHotendTemp; int absPreheatHPBTemp; int absPreheatFanSpeed; + +static float manual_feedrate[] = MANUAL_FEEDRATE; /* !Configuration settings */ //Function pointer to menu functions. @@ -377,9 +379,9 @@ static void lcd_move_x() encoderPosition = 0; #ifdef DELTA calculate_delta(current_position); - plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], 600, active_extruder); + plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], manual_feedrate[X_AXIS]/60, active_extruder); #else - plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600, active_extruder); + plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[X_AXIS]/60, active_extruder); #endif lcdDrawUpdate = 1; } @@ -406,9 +408,9 @@ static void lcd_move_y() encoderPosition = 0; #ifdef DELTA calculate_delta(current_position); - plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], 600, active_extruder); + plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], manual_feedrate[Y_AXIS]/60, active_extruder); #else - plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600, active_extruder); + plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[Y_AXIS]/60, active_extruder); #endif lcdDrawUpdate = 1; } @@ -435,9 +437,9 @@ static void lcd_move_z() encoderPosition = 0; #ifdef DELTA calculate_delta(current_position); - plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS]/60, active_extruder); + plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], manual_feedrate[Z_AXIS]/60, active_extruder); #else - plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS]/60, active_extruder); + plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[Z_AXIS]/60, active_extruder); #endif lcdDrawUpdate = 1; } @@ -460,9 +462,9 @@ static void lcd_move_e() encoderPosition = 0; #ifdef DELTA calculate_delta(current_position); - plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], 20, active_extruder); + plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], manual_feedrate[E_AXIS]/60, active_extruder); #else - plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 20, active_extruder); + plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[E_AXIS]/60, active_extruder); #endif lcdDrawUpdate = 1; } From b0c8120fcc5d107b808bd7f85252c9235bd432b7 Mon Sep 17 00:00:00 2001 From: Nicolas Rossi Date: Sat, 3 Aug 2013 13:09:53 +0200 Subject: [PATCH 11/11] Added feedrate setting in exemple config for manual moves from panel --- Marlin/example_configurations/delta/Configuration_adv.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Marlin/example_configurations/delta/Configuration_adv.h b/Marlin/example_configurations/delta/Configuration_adv.h index f279b0e213..d3c2d1939b 100644 --- a/Marlin/example_configurations/delta/Configuration_adv.h +++ b/Marlin/example_configurations/delta/Configuration_adv.h @@ -195,6 +195,11 @@ #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINTRAVELFEEDRATE 0.0 +// Feedrates for manual moves along X, Y, Z, E from panel +#ifdef ULTIPANEL +#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // set the speeds for manual moves (mm/min) +#endif + // minimum time in microseconds that a movement needs to take if the buffer is emptied. #define DEFAULT_MINSEGMENTTIME 20000