From cb12161191be148906d31642b44af04248c3d6cc Mon Sep 17 00:00:00 2001 From: wgm4321 Date: Sun, 28 Dec 2014 20:43:14 -0500 Subject: [PATCH 01/50] Add Filament menu and add Filament/Retract settings to config store. --- Marlin/ConfigurationStore.cpp | 124 ++++++++++++++++-- Marlin/Marlin.h | 4 + Marlin/Marlin_main.cpp | 78 ++++++++--- Marlin/language_en.h | 5 + Marlin/ultralcd.cpp | 45 ++++++- Marlin/ultralcd.h | 1 + .../ultralcd_implementation_hitachi_HD44780.h | 4 + 7 files changed, 232 insertions(+), 29 deletions(-) diff --git a/Marlin/ConfigurationStore.cpp b/Marlin/ConfigurationStore.cpp index 20e68d09e3..0b3e485503 100644 --- a/Marlin/ConfigurationStore.cpp +++ b/Marlin/ConfigurationStore.cpp @@ -38,15 +38,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) // wrong data being written to the variables. // ALSO: always make sure the variables in the Store and retrieve sections are in the same order. -#define EEPROM_VERSION "V10" -#ifdef DELTA - #undef EEPROM_VERSION - #define EEPROM_VERSION "V11" -#endif -#ifdef SCARA - #undef EEPROM_VERSION - #define EEPROM_VERSION "V12" -#endif +#define EEPROM_VERSION "V13" #ifdef EEPROM_SETTINGS void Config_StoreSettings() @@ -101,6 +93,31 @@ void Config_StoreSettings() #ifdef SCARA EEPROM_WRITE_VAR(i,axis_scaling); // Add scaling for SCARA #endif + #ifdef FWRETRACT + EEPROM_WRITE_VAR(i,autoretract_enabled); + EEPROM_WRITE_VAR(i,retract_length); + #if EXTRUDERS > 1 + EEPROM_WRITE_VAR(i,retract_length_swap); + #endif + EEPROM_WRITE_VAR(i,retract_feedrate); + EEPROM_WRITE_VAR(i,retract_zlift); + EEPROM_WRITE_VAR(i,retract_recover_length); + #if EXTRUDERS > 1 + EEPROM_WRITE_VAR(i,retract_recover_length_swap); + #endif + EEPROM_WRITE_VAR(i,retract_recover_feedrate); + #endif + + // Save filament sizes + EEPROM_WRITE_VAR(i, volumetric_enabled); + EEPROM_WRITE_VAR(i, filament_size[0]); + #if EXTRUDERS > 1 + EEPROM_WRITE_VAR(i, filament_size[1]); + #if EXTRUDERS > 2 + EEPROM_WRITE_VAR(i, filament_size[2]); + #endif + #endif + char ver2[4]=EEPROM_VERSION; i=EEPROM_OFFSET; EEPROM_WRITE_VAR(i,ver2); // validate data @@ -210,12 +227,46 @@ SERIAL_ECHOLNPGM("Scaling factors:"); SERIAL_ECHO_START; SERIAL_ECHOLNPGM("Recover: S=Extra length (mm) F:Speed (mm/m)"); SERIAL_ECHO_START; - SERIAL_ECHOPAIR(" M208 S",retract_recover_length); - SERIAL_ECHOPAIR(" F" ,retract_recover_feedrate*60); - SERIAL_ECHOLN(""); + SERIAL_ECHOPAIR(" M208 S",retract_recover_length); + SERIAL_ECHOPAIR(" F", retract_recover_feedrate*60); + SERIAL_ECHOLN(""); + SERIAL_ECHO_START; + SERIAL_ECHOLNPGM("Auto-Retract: S=0 to disable, 1 to interpret extrude-only moves as retracts or recoveries"); + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(" M209 S", (unsigned long)(autoretract_enabled ? 1 : 0)); + SERIAL_ECHOLN(""); +#if EXTRUDERS > 1 + SERIAL_ECHO_START; + SERIAL_ECHOLNPGM("Multi-extruder settings:"); + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(" Swap retract length (mm): ", retract_length_swap); + SERIAL_ECHOLN(""); + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(" Swap rec. addl. length (mm): ", retract_recover_length_swap); + SERIAL_ECHOLN(""); #endif + SERIAL_ECHO_START; + if (volumetric_enabled) { + SERIAL_ECHOLNPGM("Filament settings:"); + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(" M200 D", filament_size[0]); + SERIAL_ECHOLN(""); +#if EXTRUDERS > 1 + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(" M200 T1 D", filament_size[1]); + SERIAL_ECHOLN(""); +#if EXTRUDERS > 2 + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(" M200 T2 D", filament_size[2]); + SERIAL_ECHOLN(""); +#endif +#endif + } else { + SERIAL_ECHOLNPGM("Filament settings: Disabled"); + } } #endif +#endif #ifdef EEPROM_SETTINGS @@ -277,6 +328,30 @@ void Config_RetrieveSettings() EEPROM_READ_VAR(i,axis_scaling); #endif + #ifdef FWRETRACT + EEPROM_READ_VAR(i,autoretract_enabled); + EEPROM_READ_VAR(i,retract_length); + #if EXTRUDERS > 1 + EEPROM_READ_VAR(i,retract_length_swap); + #endif + EEPROM_READ_VAR(i,retract_feedrate); + EEPROM_READ_VAR(i,retract_zlift); + EEPROM_READ_VAR(i,retract_recover_length); + #if EXTRUDERS > 1 + EEPROM_READ_VAR(i,retract_recover_length_swap); + #endif + EEPROM_READ_VAR(i,retract_recover_feedrate); + #endif + + EEPROM_READ_VAR(i, volumetric_enabled); + EEPROM_READ_VAR(i, filament_size[0]); +#if EXTRUDERS > 1 + EEPROM_READ_VAR(i, filament_size[1]); +#if EXTRUDERS > 2 + EEPROM_READ_VAR(i, filament_size[2]); +#endif +#endif + calculate_volumetric_multipliers(); // Call updatePID (similar to when we have processed M301) updatePID(); SERIAL_ECHO_START; @@ -353,6 +428,31 @@ void Config_ResetDefault() #endif//PID_ADD_EXTRUSION_RATE #endif//PIDTEMP +#ifdef FWRETRACT + autoretract_enabled = false; + retract_length = RETRACT_LENGTH; +#if EXTRUDERS > 1 + retract_length_swap = RETRACT_LENGTH_SWAP; +#endif + retract_feedrate = RETRACT_FEEDRATE; + retract_zlift = RETRACT_ZLIFT; + retract_recover_length = RETRACT_RECOVER_LENGTH; +#if EXTRUDERS > 1 + retract_recover_length_swap = RETRACT_RECOVER_LENGTH_SWAP; +#endif + retract_recover_feedrate = RETRACT_RECOVER_FEEDRATE; +#endif + + volumetric_enabled = false; + filament_size[0] = DEFAULT_NOMINAL_FILAMENT_DIA; +#if EXTRUDERS > 1 + filament_size[1] = DEFAULT_NOMINAL_FILAMENT_DIA; +#if EXTRUDERS > 2 + filament_size[2] = DEFAULT_NOMINAL_FILAMENT_DIA; +#endif +#endif + calculate_volumetric_multipliers(); + SERIAL_ECHO_START; SERIAL_ECHOLNPGM("Hardcoded Default Settings Loaded"); diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 444c43f695..84915e7b2a 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -209,7 +209,9 @@ extern float homing_feedrate[]; extern bool axis_relative_modes[]; extern int feedmultiply; extern int extrudemultiply; // Sets extrude multiply factor (in percent) for all extruders +extern bool volumetric_enabled; extern int extruder_multiply[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually +extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder. extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner extern float current_position[NUM_AXIS] ; extern float add_homing[3]; @@ -266,3 +268,5 @@ extern void digipot_i2c_init(); #endif #endif + +extern void calculate_volumetric_multipliers(); \ No newline at end of file diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 644ae31f1a..314eb433ee 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -215,6 +215,15 @@ int extruder_multiply[EXTRUDERS] = {100 #endif #endif }; +bool volumetric_enabled = false; +float filament_size[EXTRUDERS] = { DEFAULT_NOMINAL_FILAMENT_DIA + #if EXTRUDERS > 1 + , DEFAULT_NOMINAL_FILAMENT_DIA + #if EXTRUDERS > 2 + , DEFAULT_NOMINAL_FILAMENT_DIA + #endif + #endif +}; float volumetric_multiplier[EXTRUDERS] = {1.0 #if EXTRUDERS > 1 , 1.0 @@ -2823,21 +2832,7 @@ Sigma_Exit: #endif //BLINKM case 200: // M200 D set filament diameter and set E axis units to cubic millimeters (use S0 to set back to millimeters). { - float area = .0; - float radius = .0; - if(code_seen('D')) { - radius = (float)code_value() * .5; - if(radius == 0) { - area = 1; - } else { - area = M_PI * pow(radius, 2); - } - } else { - //reserved for setting filament diameter via UFID or filament measuring device - break; - - - } + tmp_extruder = active_extruder; if(code_seen('T')) { tmp_extruder = code_value(); @@ -2847,7 +2842,32 @@ Sigma_Exit: break; } } - volumetric_multiplier[tmp_extruder] = 1 / area; + + float area = .0; + if(code_seen('D')) { + float diameter = (float)code_value(); + if (diameter == 0.0) { + // setting any extruder filament size disables volumetric on the assumption that + // slicers either generate in extruder values as cubic mm or as as filament feeds + // for all extruders + volumetric_enabled = false; + } else { + filament_size[tmp_extruder] = (float)code_value(); + // make sure all extruders have some sane value for the filament size + filament_size[0] = (filament_size[0] == 0.0 ? DEFAULT_NOMINAL_FILAMENT_DIA : filament_size[0]); + #if EXTRUDERS > 1 + filament_size[1] = (filament_size[1] == 0.0 ? DEFAULT_NOMINAL_FILAMENT_DIA : filament_size[1]); + #if EXTRUDERS > 2 + filament_size[2] = (filament_size[2] == 0.0 ? DEFAULT_NOMINAL_FILAMENT_DIA : filament_size[2]); + #endif + #endif + volumetric_enabled = true; + } + } else { + //reserved for setting filament diameter via UFID or filament measuring device + break; + } + calculate_volumetric_multipliers(); } break; case 201: // M201 @@ -4580,3 +4600,29 @@ bool setTargetedHotend(int code){ return false; } + +float calculate_volumetric_multiplier(float diameter) { + float area = .0; + float radius = .0; + + radius = diameter * .5; + if (! volumetric_enabled || radius == 0) { + area = 1; + } + else { + area = M_PI * pow(radius, 2); + } + + return 1.0 / area; +} + +void calculate_volumetric_multipliers() { + volumetric_multiplier[0] = calculate_volumetric_multiplier(filament_size[0]); +#if EXTRUDERS > 1 + volumetric_multiplier[1] = calculate_volumetric_multiplier(filament_size[1]); +#if EXTRUDERS > 2 + volumetric_multiplier[2] = calculate_volumetric_multiplier(filament_size[2]); +#endif +#endif +} + diff --git a/Marlin/language_en.h b/Marlin/language_en.h index c094ff641f..5758e7a7b4 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "Esteps/mm" #define MSG_TEMPERATURE "Temperature" #define MSG_MOTION "Motion" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "LCD contrast" #define MSG_STORE_EPROM "Store memory" #define MSG_LOAD_EPROM "Load memory" diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 916114899c..adae93bc8d 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -59,6 +59,7 @@ static void lcd_control_temperature_menu(); static void lcd_control_temperature_preheat_pla_settings_menu(); static void lcd_control_temperature_preheat_abs_settings_menu(); static void lcd_control_motion_menu(); +static void lcd_control_volumetric_menu(); #ifdef DOGLCD static void lcd_set_contrast(); #endif @@ -78,6 +79,7 @@ static void menu_action_setting_edit_bool(const char* pstr, bool* ptr); static void menu_action_setting_edit_int3(const char* pstr, int* ptr, int minValue, int maxValue); static void menu_action_setting_edit_float3(const char* pstr, float* ptr, float minValue, float maxValue); static void menu_action_setting_edit_float32(const char* pstr, float* ptr, float minValue, float maxValue); +static void menu_action_setting_edit_float43(const char* pstr, float* ptr, float minValue, float maxValue); static void menu_action_setting_edit_float5(const char* pstr, float* ptr, float minValue, float maxValue); static void menu_action_setting_edit_float51(const char* pstr, float* ptr, float minValue, float maxValue); static void menu_action_setting_edit_float52(const char* pstr, float* ptr, float minValue, float maxValue); @@ -86,6 +88,7 @@ static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, static void menu_action_setting_edit_callback_int3(const char* pstr, int* ptr, int minValue, int maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_float3(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_float32(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); +static void menu_action_setting_edit_callback_float43(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_float5(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_float51(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_float52(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); @@ -721,6 +724,8 @@ static void lcd_control_menu() MENU_ITEM(back, MSG_MAIN, lcd_main_menu); MENU_ITEM(submenu, MSG_TEMPERATURE, lcd_control_temperature_menu); MENU_ITEM(submenu, MSG_MOTION, lcd_control_motion_menu); + MENU_ITEM(submenu, MSG_VOLUMETRIC, lcd_control_volumetric_menu); + #ifdef DOGLCD // MENU_ITEM_EDIT(int3, MSG_CONTRAST, &lcd_contrast, 0, 63); MENU_ITEM(submenu, MSG_CONTRAST, lcd_set_contrast); @@ -849,6 +854,26 @@ static void lcd_control_motion_menu() END_MENU(); } +static void lcd_control_volumetric_menu() +{ + START_MENU(); + MENU_ITEM(back, MSG_CONTROL, lcd_control_menu); + + MENU_ITEM_EDIT(bool, MSG_VOLUMETRIC_ENABLED, &volumetric_enabled); + + if (volumetric_enabled) { + MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_0, &filament_size[0], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers); +#if EXTRUDERS > 1 + MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_1, &filament_size[1], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers); +#if EXTRUDERS > 2 + MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_2, &filament_size[2], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers); +#endif +#endif + } + + END_MENU(); +} + #ifdef DOGLCD static void lcd_set_contrast() { @@ -992,6 +1017,7 @@ void lcd_sdcard_menu() menu_edit_type(int, int3, itostr3, 1) menu_edit_type(float, float3, ftostr3, 1) menu_edit_type(float, float32, ftostr32, 100) +menu_edit_type(float, float43, ftostr43, 1000) menu_edit_type(float, float5, ftostr5, 0.01) menu_edit_type(float, float51, ftostr51, 10) menu_edit_type(float, float52, ftostr52, 100) @@ -1461,7 +1487,24 @@ char *ftostr32(const float &x) return conv; } -// Convert float to string with 1.23 format +// Convert float to string with 1.234 format +char *ftostr43(const float &x) +{ + long xx = x * 1000; + if (xx >= 0) + conv[0] = (xx / 1000) % 10 + '0'; + else + conv[0] = '-'; + xx = abs(xx); + conv[1] = '.'; + conv[2] = (xx / 100) % 10 + '0'; + conv[3] = (xx / 10) % 10 + '0'; + conv[4] = (xx) % 10 + '0'; + conv[5] = 0; + return conv; +} + +//Float to string with 1.23 format char *ftostr12ns(const float &x) { long xx=x*100; diff --git a/Marlin/ultralcd.h b/Marlin/ultralcd.h index 339955e592..144bfa60be 100644 --- a/Marlin/ultralcd.h +++ b/Marlin/ultralcd.h @@ -118,6 +118,7 @@ char *ftostr3(const float &x); char *ftostr31ns(const float &x); // float to string without sign character char *ftostr31(const float &x); char *ftostr32(const float &x); +char *ftostr43(const float &x); char *ftostr12ns(const float &x); char *ftostr5(const float &x); char *ftostr51(const float &x); diff --git a/Marlin/ultralcd_implementation_hitachi_HD44780.h b/Marlin/ultralcd_implementation_hitachi_HD44780.h index bf50812c4f..af38003c49 100644 --- a/Marlin/ultralcd_implementation_hitachi_HD44780.h +++ b/Marlin/ultralcd_implementation_hitachi_HD44780.h @@ -693,6 +693,8 @@ static void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t row, cons #define lcd_implementation_drawmenu_setting_edit_float3(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr3(*(data))) #define lcd_implementation_drawmenu_setting_edit_float32_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr32(*(data))) #define lcd_implementation_drawmenu_setting_edit_float32(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr32(*(data))) +#define lcd_implementation_drawmenu_setting_edit_float43_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr43(*(data))) +#define lcd_implementation_drawmenu_setting_edit_float43(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr43(*(data))) #define lcd_implementation_drawmenu_setting_edit_float5_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_float5(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_float52_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr52(*(data))) @@ -711,6 +713,8 @@ static void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t row, cons #define lcd_implementation_drawmenu_setting_edit_callback_float3(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr3(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float32_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr32(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float32(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr32(*(data))) +#define lcd_implementation_drawmenu_setting_edit_callback_float43_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr43(*(data))) +#define lcd_implementation_drawmenu_setting_edit_callback_float43(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr43(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float5_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float5(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float52_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr52(*(data))) From d60efc3b5dcbf4e56afd6c37b8beac6188de90c3 Mon Sep 17 00:00:00 2001 From: wgm4321 Date: Sun, 28 Dec 2014 20:47:59 -0500 Subject: [PATCH 02/50] Fix syntax error caused by previous changes. --- Marlin/ConfigurationStore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/ConfigurationStore.cpp b/Marlin/ConfigurationStore.cpp index 0b3e485503..8e4a32805b 100644 --- a/Marlin/ConfigurationStore.cpp +++ b/Marlin/ConfigurationStore.cpp @@ -264,8 +264,8 @@ SERIAL_ECHOLNPGM("Scaling factors:"); } else { SERIAL_ECHOLNPGM("Filament settings: Disabled"); } -} #endif +} #endif From 6b82415c81ed0f87bba50d1bc80e9eaeac41fea1 Mon Sep 17 00:00:00 2001 From: Grogyan Date: Wed, 31 Dec 2014 13:04:16 +1300 Subject: [PATCH 03/50] Update pins.h Somehow the pin definitions for the MAX6675 Slave Select/Chip Select got changed back to the hardware SPI SS/CS. Pin 49 cannot be used as that is used by the SD card socket to detect if an SD card is present. Pin 53 is the Hardware SPI SS, which is dedicated, nicely, to the SD card SS and therefore cannot be used as the MAX6675 SS Pin 66 is in Aux2 port adjacent to the Hardware SPI interface port on RAMPS 1.4, and is currently not used for anything. --- Marlin/pins.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/pins.h b/Marlin/pins.h index 4d76fa1920..3bd6cb385a 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -904,9 +904,9 @@ #define SCK_PIN 52 #define MISO_PIN 50 #define MOSI_PIN 51 - #define MAX6675_SS 53 + #define MAX6675_SS 66// Do not use pin 53 if there is even the remote possibility of using Dsplay/SD card #else - #define MAX6675_SS 49 + #define MAX6675_SS 66// Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present #endif #endif // RAMPS_OLD || RAMPS_13_EFB || RAMPS_13_EEB || RAMPS_13_EFF || 3DRAG From 2701dd8a171fe2e3be013ed4f52d1637bbd7e5fd Mon Sep 17 00:00:00 2001 From: Lane Roberts Date: Wed, 31 Dec 2014 12:34:59 -0600 Subject: [PATCH 04/50] Due to the fix for #1248, X and Y probe offsets must not be floats. The compiler does not support comparing float values: "error: floating constant in preprocessor expression" The loss in X/Y precision shouldn't matter for Z probes, as most microswitches or inductive sensors are larger than 1mm square anyway. --- Marlin/Configuration.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 980efc5cdf..fe6e371c5c 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -392,6 +392,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // 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 From 6583bb781d31b64d0704dcef42a1967f7dea86cf Mon Sep 17 00:00:00 2001 From: David Forrest Date: Thu, 1 Jan 2015 19:11:42 -0500 Subject: [PATCH 05/50] temperature.cpp: Fix typo of MAX_BED_PID to MAX_BED_POWER. --- Marlin/temperature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index e7f640953c..ccf3f2b515 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -566,7 +566,7 @@ void manage_heater() temp_dState_bed = pid_input; pid_output = pTerm_bed + iTerm_bed - dTerm_bed; - if (pid_output > MAX_BED_PID) { + if (pid_output > MAX_BED_POWER) { if (pid_error_bed > 0 ) temp_iState_bed -= pid_error_bed; // conditional un-integration pid_output=PID_MAX; } else if (pid_output < 0){ From 625860f0868fd6dd642d25f5b9a5be44080f3175 Mon Sep 17 00:00:00 2001 From: David Forrest Date: Thu, 1 Jan 2015 19:24:42 -0500 Subject: [PATCH 06/50] temperature.cpp: Fix typo of PID_MAX to MAX_BED_POWER for the bed. --- Marlin/temperature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index ccf3f2b515..f4aa873cbc 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -568,7 +568,7 @@ void manage_heater() pid_output = pTerm_bed + iTerm_bed - dTerm_bed; if (pid_output > MAX_BED_POWER) { if (pid_error_bed > 0 ) temp_iState_bed -= pid_error_bed; // conditional un-integration - pid_output=PID_MAX; + pid_output=PID_BED_POWER; } else if (pid_output < 0){ if (pid_error_bed < 0 ) temp_iState_bed -= pid_error_bed; // conditional un-integration pid_output=0; From ae12ad0d6c4ecd7f0d5e476a1267034c4467640e Mon Sep 17 00:00:00 2001 From: Alexander Hirzel Date: Fri, 2 Jan 2015 01:36:27 -0500 Subject: [PATCH 07/50] Fix typo, PID_BED_POWER -> MAX_BED_POWER --- Marlin/temperature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index ce9bba3164..94d257d550 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -584,7 +584,7 @@ void manage_heater() pid_output = pTerm_bed + iTerm_bed - dTerm_bed; if (pid_output > MAX_BED_POWER) { if (pid_error_bed > 0 ) temp_iState_bed -= pid_error_bed; // conditional un-integration - pid_output=PID_BED_POWER; + pid_output=MAX_BED_POWER; } else if (pid_output < 0){ if (pid_error_bed < 0 ) temp_iState_bed -= pid_error_bed; // conditional un-integration pid_output=0; From 1d5d853c9a1959ee5e15e3e0f69a2d4e39673ffd Mon Sep 17 00:00:00 2001 From: David Forrest Date: Thu, 1 Jan 2015 19:11:42 -0500 Subject: [PATCH 08/50] temperature.cpp: Fix typo of MAX_BED_PID to MAX_BED_POWER. --- Marlin/temperature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 5b116d9147..4d17dca009 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -582,7 +582,7 @@ void manage_heater() temp_dState_bed = pid_input; pid_output = pTerm_bed + iTerm_bed - dTerm_bed; - if (pid_output > MAX_BED_PID) { + if (pid_output > MAX_BED_POWER) { if (pid_error_bed > 0 ) temp_iState_bed -= pid_error_bed; // conditional un-integration pid_output=PID_MAX; } else if (pid_output < 0){ From f3e503e7251b47c64955c72b81d28294a2700b62 Mon Sep 17 00:00:00 2001 From: David Forrest Date: Thu, 1 Jan 2015 19:24:42 -0500 Subject: [PATCH 09/50] temperature.cpp: Fix typo of PID_MAX to MAX_BED_POWER for the bed. --- Marlin/temperature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 4d17dca009..ce9bba3164 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -584,7 +584,7 @@ void manage_heater() pid_output = pTerm_bed + iTerm_bed - dTerm_bed; if (pid_output > MAX_BED_POWER) { if (pid_error_bed > 0 ) temp_iState_bed -= pid_error_bed; // conditional un-integration - pid_output=PID_MAX; + pid_output=PID_BED_POWER; } else if (pid_output < 0){ if (pid_error_bed < 0 ) temp_iState_bed -= pid_error_bed; // conditional un-integration pid_output=0; From ecda6cdc0a7691bfce4ffba242cd2b245f953981 Mon Sep 17 00:00:00 2001 From: Alexander Hirzel Date: Fri, 2 Jan 2015 01:36:27 -0500 Subject: [PATCH 10/50] Fix typo, PID_BED_POWER -> MAX_BED_POWER --- Marlin/temperature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index ce9bba3164..94d257d550 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -584,7 +584,7 @@ void manage_heater() pid_output = pTerm_bed + iTerm_bed - dTerm_bed; if (pid_output > MAX_BED_POWER) { if (pid_error_bed > 0 ) temp_iState_bed -= pid_error_bed; // conditional un-integration - pid_output=PID_BED_POWER; + pid_output=MAX_BED_POWER; } else if (pid_output < 0){ if (pid_error_bed < 0 ) temp_iState_bed -= pid_error_bed; // conditional un-integration pid_output=0; From edac64e7d2a54a201e6d819263b8b2b2d317800a Mon Sep 17 00:00:00 2001 From: wgm4321 Date: Sun, 28 Dec 2014 20:43:14 -0500 Subject: [PATCH 11/50] Add Filament menu and add Filament/Retract settings to config store. --- Marlin/ConfigurationStore.cpp | 124 ++++++++++++++++-- Marlin/Marlin.h | 4 + Marlin/Marlin_main.cpp | 78 ++++++++--- Marlin/language_en.h | 5 + Marlin/ultralcd.cpp | 45 ++++++- Marlin/ultralcd.h | 1 + .../ultralcd_implementation_hitachi_HD44780.h | 4 + 7 files changed, 232 insertions(+), 29 deletions(-) diff --git a/Marlin/ConfigurationStore.cpp b/Marlin/ConfigurationStore.cpp index 20e68d09e3..0b3e485503 100644 --- a/Marlin/ConfigurationStore.cpp +++ b/Marlin/ConfigurationStore.cpp @@ -38,15 +38,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) // wrong data being written to the variables. // ALSO: always make sure the variables in the Store and retrieve sections are in the same order. -#define EEPROM_VERSION "V10" -#ifdef DELTA - #undef EEPROM_VERSION - #define EEPROM_VERSION "V11" -#endif -#ifdef SCARA - #undef EEPROM_VERSION - #define EEPROM_VERSION "V12" -#endif +#define EEPROM_VERSION "V13" #ifdef EEPROM_SETTINGS void Config_StoreSettings() @@ -101,6 +93,31 @@ void Config_StoreSettings() #ifdef SCARA EEPROM_WRITE_VAR(i,axis_scaling); // Add scaling for SCARA #endif + #ifdef FWRETRACT + EEPROM_WRITE_VAR(i,autoretract_enabled); + EEPROM_WRITE_VAR(i,retract_length); + #if EXTRUDERS > 1 + EEPROM_WRITE_VAR(i,retract_length_swap); + #endif + EEPROM_WRITE_VAR(i,retract_feedrate); + EEPROM_WRITE_VAR(i,retract_zlift); + EEPROM_WRITE_VAR(i,retract_recover_length); + #if EXTRUDERS > 1 + EEPROM_WRITE_VAR(i,retract_recover_length_swap); + #endif + EEPROM_WRITE_VAR(i,retract_recover_feedrate); + #endif + + // Save filament sizes + EEPROM_WRITE_VAR(i, volumetric_enabled); + EEPROM_WRITE_VAR(i, filament_size[0]); + #if EXTRUDERS > 1 + EEPROM_WRITE_VAR(i, filament_size[1]); + #if EXTRUDERS > 2 + EEPROM_WRITE_VAR(i, filament_size[2]); + #endif + #endif + char ver2[4]=EEPROM_VERSION; i=EEPROM_OFFSET; EEPROM_WRITE_VAR(i,ver2); // validate data @@ -210,12 +227,46 @@ SERIAL_ECHOLNPGM("Scaling factors:"); SERIAL_ECHO_START; SERIAL_ECHOLNPGM("Recover: S=Extra length (mm) F:Speed (mm/m)"); SERIAL_ECHO_START; - SERIAL_ECHOPAIR(" M208 S",retract_recover_length); - SERIAL_ECHOPAIR(" F" ,retract_recover_feedrate*60); - SERIAL_ECHOLN(""); + SERIAL_ECHOPAIR(" M208 S",retract_recover_length); + SERIAL_ECHOPAIR(" F", retract_recover_feedrate*60); + SERIAL_ECHOLN(""); + SERIAL_ECHO_START; + SERIAL_ECHOLNPGM("Auto-Retract: S=0 to disable, 1 to interpret extrude-only moves as retracts or recoveries"); + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(" M209 S", (unsigned long)(autoretract_enabled ? 1 : 0)); + SERIAL_ECHOLN(""); +#if EXTRUDERS > 1 + SERIAL_ECHO_START; + SERIAL_ECHOLNPGM("Multi-extruder settings:"); + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(" Swap retract length (mm): ", retract_length_swap); + SERIAL_ECHOLN(""); + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(" Swap rec. addl. length (mm): ", retract_recover_length_swap); + SERIAL_ECHOLN(""); #endif + SERIAL_ECHO_START; + if (volumetric_enabled) { + SERIAL_ECHOLNPGM("Filament settings:"); + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(" M200 D", filament_size[0]); + SERIAL_ECHOLN(""); +#if EXTRUDERS > 1 + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(" M200 T1 D", filament_size[1]); + SERIAL_ECHOLN(""); +#if EXTRUDERS > 2 + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(" M200 T2 D", filament_size[2]); + SERIAL_ECHOLN(""); +#endif +#endif + } else { + SERIAL_ECHOLNPGM("Filament settings: Disabled"); + } } #endif +#endif #ifdef EEPROM_SETTINGS @@ -277,6 +328,30 @@ void Config_RetrieveSettings() EEPROM_READ_VAR(i,axis_scaling); #endif + #ifdef FWRETRACT + EEPROM_READ_VAR(i,autoretract_enabled); + EEPROM_READ_VAR(i,retract_length); + #if EXTRUDERS > 1 + EEPROM_READ_VAR(i,retract_length_swap); + #endif + EEPROM_READ_VAR(i,retract_feedrate); + EEPROM_READ_VAR(i,retract_zlift); + EEPROM_READ_VAR(i,retract_recover_length); + #if EXTRUDERS > 1 + EEPROM_READ_VAR(i,retract_recover_length_swap); + #endif + EEPROM_READ_VAR(i,retract_recover_feedrate); + #endif + + EEPROM_READ_VAR(i, volumetric_enabled); + EEPROM_READ_VAR(i, filament_size[0]); +#if EXTRUDERS > 1 + EEPROM_READ_VAR(i, filament_size[1]); +#if EXTRUDERS > 2 + EEPROM_READ_VAR(i, filament_size[2]); +#endif +#endif + calculate_volumetric_multipliers(); // Call updatePID (similar to when we have processed M301) updatePID(); SERIAL_ECHO_START; @@ -353,6 +428,31 @@ void Config_ResetDefault() #endif//PID_ADD_EXTRUSION_RATE #endif//PIDTEMP +#ifdef FWRETRACT + autoretract_enabled = false; + retract_length = RETRACT_LENGTH; +#if EXTRUDERS > 1 + retract_length_swap = RETRACT_LENGTH_SWAP; +#endif + retract_feedrate = RETRACT_FEEDRATE; + retract_zlift = RETRACT_ZLIFT; + retract_recover_length = RETRACT_RECOVER_LENGTH; +#if EXTRUDERS > 1 + retract_recover_length_swap = RETRACT_RECOVER_LENGTH_SWAP; +#endif + retract_recover_feedrate = RETRACT_RECOVER_FEEDRATE; +#endif + + volumetric_enabled = false; + filament_size[0] = DEFAULT_NOMINAL_FILAMENT_DIA; +#if EXTRUDERS > 1 + filament_size[1] = DEFAULT_NOMINAL_FILAMENT_DIA; +#if EXTRUDERS > 2 + filament_size[2] = DEFAULT_NOMINAL_FILAMENT_DIA; +#endif +#endif + calculate_volumetric_multipliers(); + SERIAL_ECHO_START; SERIAL_ECHOLNPGM("Hardcoded Default Settings Loaded"); diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 76b348e774..d8012976c4 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -209,7 +209,9 @@ extern float homing_feedrate[]; extern bool axis_relative_modes[]; extern int feedmultiply; extern int extrudemultiply; // Sets extrude multiply factor (in percent) for all extruders +extern bool volumetric_enabled; extern int extruder_multiply[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually +extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder. extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner extern float current_position[NUM_AXIS] ; extern float add_homing[3]; @@ -266,3 +268,5 @@ extern void digipot_i2c_init(); #endif #endif + +extern void calculate_volumetric_multipliers(); \ No newline at end of file diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index ef3cda04c9..e3e5ef3588 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -215,6 +215,15 @@ int extruder_multiply[EXTRUDERS] = {100 #endif #endif }; +bool volumetric_enabled = false; +float filament_size[EXTRUDERS] = { DEFAULT_NOMINAL_FILAMENT_DIA + #if EXTRUDERS > 1 + , DEFAULT_NOMINAL_FILAMENT_DIA + #if EXTRUDERS > 2 + , DEFAULT_NOMINAL_FILAMENT_DIA + #endif + #endif +}; float volumetric_multiplier[EXTRUDERS] = {1.0 #if EXTRUDERS > 1 , 1.0 @@ -2823,21 +2832,7 @@ Sigma_Exit: #endif //BLINKM case 200: // M200 D set filament diameter and set E axis units to cubic millimeters (use S0 to set back to millimeters). { - float area = .0; - float radius = .0; - if(code_seen('D')) { - radius = (float)code_value() * .5; - if(radius == 0) { - area = 1; - } else { - area = M_PI * pow(radius, 2); - } - } else { - //reserved for setting filament diameter via UFID or filament measuring device - break; - - - } + tmp_extruder = active_extruder; if(code_seen('T')) { tmp_extruder = code_value(); @@ -2847,7 +2842,32 @@ Sigma_Exit: break; } } - volumetric_multiplier[tmp_extruder] = 1 / area; + + float area = .0; + if(code_seen('D')) { + float diameter = (float)code_value(); + if (diameter == 0.0) { + // setting any extruder filament size disables volumetric on the assumption that + // slicers either generate in extruder values as cubic mm or as as filament feeds + // for all extruders + volumetric_enabled = false; + } else { + filament_size[tmp_extruder] = (float)code_value(); + // make sure all extruders have some sane value for the filament size + filament_size[0] = (filament_size[0] == 0.0 ? DEFAULT_NOMINAL_FILAMENT_DIA : filament_size[0]); + #if EXTRUDERS > 1 + filament_size[1] = (filament_size[1] == 0.0 ? DEFAULT_NOMINAL_FILAMENT_DIA : filament_size[1]); + #if EXTRUDERS > 2 + filament_size[2] = (filament_size[2] == 0.0 ? DEFAULT_NOMINAL_FILAMENT_DIA : filament_size[2]); + #endif + #endif + volumetric_enabled = true; + } + } else { + //reserved for setting filament diameter via UFID or filament measuring device + break; + } + calculate_volumetric_multipliers(); } break; case 201: // M201 @@ -4580,3 +4600,29 @@ bool setTargetedHotend(int code){ return false; } + +float calculate_volumetric_multiplier(float diameter) { + float area = .0; + float radius = .0; + + radius = diameter * .5; + if (! volumetric_enabled || radius == 0) { + area = 1; + } + else { + area = M_PI * pow(radius, 2); + } + + return 1.0 / area; +} + +void calculate_volumetric_multipliers() { + volumetric_multiplier[0] = calculate_volumetric_multiplier(filament_size[0]); +#if EXTRUDERS > 1 + volumetric_multiplier[1] = calculate_volumetric_multiplier(filament_size[1]); +#if EXTRUDERS > 2 + volumetric_multiplier[2] = calculate_volumetric_multiplier(filament_size[2]); +#endif +#endif +} + diff --git a/Marlin/language_en.h b/Marlin/language_en.h index c749e98254..014b42e51e 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "Esteps/mm" #define MSG_TEMPERATURE "Temperature" #define MSG_MOTION "Motion" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "LCD contrast" #define MSG_STORE_EPROM "Store memory" #define MSG_LOAD_EPROM "Load memory" diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 83895e2fda..42d4979583 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -59,6 +59,7 @@ static void lcd_control_temperature_menu(); static void lcd_control_temperature_preheat_pla_settings_menu(); static void lcd_control_temperature_preheat_abs_settings_menu(); static void lcd_control_motion_menu(); +static void lcd_control_volumetric_menu(); #ifdef DOGLCD static void lcd_set_contrast(); #endif @@ -82,6 +83,7 @@ static void menu_action_setting_edit_bool(const char* pstr, bool* ptr); static void menu_action_setting_edit_int3(const char* pstr, int* ptr, int minValue, int maxValue); static void menu_action_setting_edit_float3(const char* pstr, float* ptr, float minValue, float maxValue); static void menu_action_setting_edit_float32(const char* pstr, float* ptr, float minValue, float maxValue); +static void menu_action_setting_edit_float43(const char* pstr, float* ptr, float minValue, float maxValue); static void menu_action_setting_edit_float5(const char* pstr, float* ptr, float minValue, float maxValue); static void menu_action_setting_edit_float51(const char* pstr, float* ptr, float minValue, float maxValue); static void menu_action_setting_edit_float52(const char* pstr, float* ptr, float minValue, float maxValue); @@ -90,6 +92,7 @@ static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, static void menu_action_setting_edit_callback_int3(const char* pstr, int* ptr, int minValue, int maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_float3(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_float32(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); +static void menu_action_setting_edit_callback_float43(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_float5(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_float51(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_float52(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); @@ -742,6 +745,8 @@ static void lcd_control_menu() MENU_ITEM(back, MSG_MAIN, lcd_main_menu); MENU_ITEM(submenu, MSG_TEMPERATURE, lcd_control_temperature_menu); MENU_ITEM(submenu, MSG_MOTION, lcd_control_motion_menu); + MENU_ITEM(submenu, MSG_VOLUMETRIC, lcd_control_volumetric_menu); + #ifdef DOGLCD // MENU_ITEM_EDIT(int3, MSG_CONTRAST, &lcd_contrast, 0, 63); MENU_ITEM(submenu, MSG_CONTRAST, lcd_set_contrast); @@ -870,6 +875,26 @@ static void lcd_control_motion_menu() END_MENU(); } +static void lcd_control_volumetric_menu() +{ + START_MENU(); + MENU_ITEM(back, MSG_CONTROL, lcd_control_menu); + + MENU_ITEM_EDIT(bool, MSG_VOLUMETRIC_ENABLED, &volumetric_enabled); + + if (volumetric_enabled) { + MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_0, &filament_size[0], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers); +#if EXTRUDERS > 1 + MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_1, &filament_size[1], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers); +#if EXTRUDERS > 2 + MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_2, &filament_size[2], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers); +#endif +#endif + } + + END_MENU(); +} + #ifdef DOGLCD static void lcd_set_contrast() { @@ -1013,6 +1038,7 @@ void lcd_sdcard_menu() menu_edit_type(int, int3, itostr3, 1) menu_edit_type(float, float3, ftostr3, 1) menu_edit_type(float, float32, ftostr32, 100) +menu_edit_type(float, float43, ftostr43, 1000) menu_edit_type(float, float5, ftostr5, 0.01) menu_edit_type(float, float51, ftostr51, 10) menu_edit_type(float, float52, ftostr52, 100) @@ -1482,7 +1508,24 @@ char *ftostr32(const float &x) return conv; } -// Convert float to string with 1.23 format +// Convert float to string with 1.234 format +char *ftostr43(const float &x) +{ + long xx = x * 1000; + if (xx >= 0) + conv[0] = (xx / 1000) % 10 + '0'; + else + conv[0] = '-'; + xx = abs(xx); + conv[1] = '.'; + conv[2] = (xx / 100) % 10 + '0'; + conv[3] = (xx / 10) % 10 + '0'; + conv[4] = (xx) % 10 + '0'; + conv[5] = 0; + return conv; +} + +//Float to string with 1.23 format char *ftostr12ns(const float &x) { long xx=x*100; diff --git a/Marlin/ultralcd.h b/Marlin/ultralcd.h index 351a2654b4..a175f4a757 100644 --- a/Marlin/ultralcd.h +++ b/Marlin/ultralcd.h @@ -118,6 +118,7 @@ char *ftostr3(const float &x); char *ftostr31ns(const float &x); // float to string without sign character char *ftostr31(const float &x); char *ftostr32(const float &x); +char *ftostr43(const float &x); char *ftostr12ns(const float &x); char *ftostr32sp(const float &x); // remove zero-padding from ftostr32 char *ftostr5(const float &x); diff --git a/Marlin/ultralcd_implementation_hitachi_HD44780.h b/Marlin/ultralcd_implementation_hitachi_HD44780.h index 1a93fe3e6e..fe0953e56c 100644 --- a/Marlin/ultralcd_implementation_hitachi_HD44780.h +++ b/Marlin/ultralcd_implementation_hitachi_HD44780.h @@ -693,6 +693,8 @@ static void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t row, cons #define lcd_implementation_drawmenu_setting_edit_float3(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr3(*(data))) #define lcd_implementation_drawmenu_setting_edit_float32_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr32(*(data))) #define lcd_implementation_drawmenu_setting_edit_float32(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr32(*(data))) +#define lcd_implementation_drawmenu_setting_edit_float43_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr43(*(data))) +#define lcd_implementation_drawmenu_setting_edit_float43(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr43(*(data))) #define lcd_implementation_drawmenu_setting_edit_float5_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_float5(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_float52_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr52(*(data))) @@ -711,6 +713,8 @@ static void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t row, cons #define lcd_implementation_drawmenu_setting_edit_callback_float3(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr3(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float32_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr32(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float32(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr32(*(data))) +#define lcd_implementation_drawmenu_setting_edit_callback_float43_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr43(*(data))) +#define lcd_implementation_drawmenu_setting_edit_callback_float43(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr43(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float5_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float5(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float52_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr52(*(data))) From b32be2dc64cd3281b7ea9853824b71bcd3fca2de Mon Sep 17 00:00:00 2001 From: wgm4321 Date: Sun, 28 Dec 2014 20:47:59 -0500 Subject: [PATCH 12/50] Fix syntax error caused by previous changes. --- Marlin/ConfigurationStore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/ConfigurationStore.cpp b/Marlin/ConfigurationStore.cpp index 0b3e485503..8e4a32805b 100644 --- a/Marlin/ConfigurationStore.cpp +++ b/Marlin/ConfigurationStore.cpp @@ -264,8 +264,8 @@ SERIAL_ECHOLNPGM("Scaling factors:"); } else { SERIAL_ECHOLNPGM("Filament settings: Disabled"); } -} #endif +} #endif From 1f520a5a8c4f3bfdf373dd4b5e0b6b7a8ae30e9e Mon Sep 17 00:00:00 2001 From: Lane Roberts Date: Wed, 31 Dec 2014 12:34:59 -0600 Subject: [PATCH 13/50] Due to the fix for #1248, X and Y probe offsets must not be floats. The compiler does not support comparing float values: "error: floating constant in preprocessor expression" The loss in X/Y precision shouldn't matter for Z probes, as most microswitches or inductive sensors are larger than 1mm square anyway. --- Marlin/Configuration.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 980efc5cdf..fe6e371c5c 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -392,6 +392,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // 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 From eed451e03434488916a7135f105702980390e074 Mon Sep 17 00:00:00 2001 From: Alexander Hirzel Date: Fri, 2 Jan 2015 11:11:18 -0500 Subject: [PATCH 14/50] rework analogInputToDigitalPin definition --- Marlin/Marlin.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index d8012976c4..13e5552365 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -30,7 +30,10 @@ # include "Arduino.h" #else # include "WProgram.h" - //Arduino < 1.0.0 does not define this, so we need to do it ourselves +#endif + +// Arduino < 1.0.0 does not define this, so we need to do it ourselves +#ifndef analogInputToDigitalPin # define analogInputToDigitalPin(p) ((p) + A0) #endif @@ -240,9 +243,9 @@ extern unsigned char fanSpeedSoftPwm; #endif #ifdef FILAMENT_SENSOR - extern float filament_width_nominal; //holds the theoretical filament diameter ie., 3.00 or 1.75 - extern bool filament_sensor; //indicates that filament sensor readings should control extrusion - extern float filament_width_meas; //holds the filament diameter as accurately measured + extern float filament_width_nominal; //holds the theoretical filament diameter ie., 3.00 or 1.75 + extern bool filament_sensor; //indicates that filament sensor readings should control extrusion + extern float filament_width_meas; //holds the filament diameter as accurately measured extern signed char measurement_delay[]; //ring buffer to delay measurement extern int delay_index1, delay_index2; //index into ring buffer extern float delay_dist; //delay distance counter @@ -269,4 +272,5 @@ extern void digipot_i2c_init(); #endif -extern void calculate_volumetric_multipliers(); \ No newline at end of file +extern void calculate_volumetric_multipliers(); + From b5e50cdd4e8717caef23ffdd88825172a3c2c8b2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 2 Jan 2015 08:53:09 -0800 Subject: [PATCH 15/50] Move scripts and documentation to subfolders --- Marlin/{ => documentation}/LCD Menu Tree.pdf | Bin Marlin/{ => documentation}/Menu Plans.xlsx | Bin .../{ => scripts}/createTemperatureLookupMarlin.py | 0 Marlin/{ => scripts}/create_speed_lookuptable.py | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename Marlin/{ => documentation}/LCD Menu Tree.pdf (100%) rename Marlin/{ => documentation}/Menu Plans.xlsx (100%) rename Marlin/{ => scripts}/createTemperatureLookupMarlin.py (100%) rename Marlin/{ => scripts}/create_speed_lookuptable.py (100%) diff --git a/Marlin/LCD Menu Tree.pdf b/Marlin/documentation/LCD Menu Tree.pdf similarity index 100% rename from Marlin/LCD Menu Tree.pdf rename to Marlin/documentation/LCD Menu Tree.pdf diff --git a/Marlin/Menu Plans.xlsx b/Marlin/documentation/Menu Plans.xlsx similarity index 100% rename from Marlin/Menu Plans.xlsx rename to Marlin/documentation/Menu Plans.xlsx diff --git a/Marlin/createTemperatureLookupMarlin.py b/Marlin/scripts/createTemperatureLookupMarlin.py similarity index 100% rename from Marlin/createTemperatureLookupMarlin.py rename to Marlin/scripts/createTemperatureLookupMarlin.py diff --git a/Marlin/create_speed_lookuptable.py b/Marlin/scripts/create_speed_lookuptable.py similarity index 100% rename from Marlin/create_speed_lookuptable.py rename to Marlin/scripts/create_speed_lookuptable.py From 3f9707aa3315781c8214968b2cf2e6d34c4c688b Mon Sep 17 00:00:00 2001 From: monkeydave Date: Sat, 3 Jan 2015 10:56:10 +0000 Subject: [PATCH 16/50] Added .gitignore back into repo --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..a24cf93707 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*.o +applet/ +*~ +*.orig +*.rej +*.bak From 86cc22d63978cc72518dcc1541cfb280e46e21fc Mon Sep 17 00:00:00 2001 From: monkeydave Date: Sat, 3 Jan 2015 11:43:40 +0000 Subject: [PATCH 17/50] Readd .travis.yml, change build enviroment to use ino instead of gcc --- .travis.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..5d953fe1d1 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,38 @@ +--- +language: c + +before_install: + - pwd + - wget https://bootstrap.pypa.io/get-pip.py + - wget https://bintray.com/artifact/download/olikraus/u8glib/u8glib_arduino_v1.17.zip +install: + - sudo python get-pip.py + - sudo pip install ino + # add ppa for newer version of Arduino than available in ubuntu 12.04 + - sudo add-apt-repository ppa:michael-gruz/elektronik -y + - sudo apt-get update -q + - sudo apt-get install arduino +before_script: + # add U8glib, LiquidCrystal_I2C & LiquidTWI2 libraries + - sudo unzip u8glib_arduino_v1.17.zip -d /usr/share/arduino/libraries/ + - cd /usr/share/arduino/libraries/ + - sudo git clone https://github.com/kiyoshigawa/LiquidCrystal_I2C.git + - ls -la + - ls -la LiquidCrystal_I2C/ + - sudo git clone https://github.com/lincomatic/LiquidTWI2.git + # remove Robot_Control library to stop compile error! + - sudo rm -rf /usr/share/arduino/libraries/Robot_Control + # change back to home directory for compiling + - cd /home/travis/build/monkeydave/Marlin + # ino needs files in src directory + - ln -s Marlin src + # remove Marlin.pde as it confuses ino + - rm Marlin/Marlin.pde +script: + - ino build -m mega2560 + - cp Marlin/example_configurations/delta/Configuration* Marlin/ + - rm -rf .build/ + - ino build -m mega2560 + - sed -i 's/#define MOTHERBOARD BOARD_RAMPS_13_EFB/#define MOTHERBOARD BOARD_DUEMILANOVE_328P/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m atmega328 \ No newline at end of file From 21cc188272a68b89b30d969038acc2c3644bb677 Mon Sep 17 00:00:00 2001 From: monkeydave Date: Sat, 3 Jan 2015 12:09:12 +0000 Subject: [PATCH 18/50] Updated .travis.yml for ErikZalm branch pull request --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5d953fe1d1..2b34d7ee12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,10 +23,10 @@ before_script: # remove Robot_Control library to stop compile error! - sudo rm -rf /usr/share/arduino/libraries/Robot_Control # change back to home directory for compiling - - cd /home/travis/build/monkeydave/Marlin + - cd /home/travis/build/ErikZalm/Marlin # ino needs files in src directory - ln -s Marlin src - # remove Marlin.pde as it confuses ino + # remove Marlin.pde as it confuses ino after it finds Marlin.ino - rm Marlin/Marlin.pde script: - ino build -m mega2560 From 206b7f4e92fe974ea5923334fde531deb02ff449 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 3 Jan 2015 13:52:52 +0100 Subject: [PATCH 19/50] Update .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index a24cf93707..cd72efb10d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ applet/ *.orig *.rej *.bak +*.DS_Store +*.idea From be81dfa3de4bae956cbc210fb88ff40161169a74 Mon Sep 17 00:00:00 2001 From: monkeydave Date: Sat, 3 Jan 2015 16:50:05 +0000 Subject: [PATCH 20/50] Updated .travis.yml so others forks will also compile --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2b34d7ee12..94b1377a41 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ before_script: # remove Robot_Control library to stop compile error! - sudo rm -rf /usr/share/arduino/libraries/Robot_Control # change back to home directory for compiling - - cd /home/travis/build/ErikZalm/Marlin + - cd $TRAVIS_BUILD_DIR # ino needs files in src directory - ln -s Marlin src # remove Marlin.pde as it confuses ino after it finds Marlin.ino From 07b85f8b92a836e6c1566a4a52eaf80db3110392 Mon Sep 17 00:00:00 2001 From: monkeydave Date: Sat, 3 Jan 2015 19:29:04 +0000 Subject: [PATCH 21/50] Added compile checks for lots of defines in Configuration.h --- .travis.yml | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/.travis.yml b/.travis.yml index 94b1377a41..b877709a43 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,10 +29,132 @@ before_script: # remove Marlin.pde as it confuses ino after it finds Marlin.ino - rm Marlin/Marlin.pde script: + # build default config - ino build -m mega2560 + # backup configuration.h + - cp Marlin/Configuration.h Marlin/Configuration.h.backup + - cp Marlin/Configuration_adv.h Marlin/Configuration_adv.h.backup + # change extruder numbers from 1 to 2 + - sed -i 's/#define EXTRUDERS 1/#define EXTRUDERS 2/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # change extruder numbers from 2 to 3 + - sed -i 's/#define EXTRUDERS 2/#define EXTRUDERS 3/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # enable PIDTEMPBED + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define PIDTEMPBED/#define PIDTEMPBED/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # enable THERMAL RUNAWAY PROTECTION for extruders & bed + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define THERMAL_RUNAWAY_PROTECTION_PERIOD/#define THERMAL_RUNAWAY_PROTECTION_PERIOD/g' Marlin/Configuration.h + - sed -i 's/\/\/#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS/#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS/g' Marlin/Configuration.h + - sed -i 's/\/\/#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD/#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD/g' Marlin/Configuration.h + - sed -i 's/\/\/#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS/#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # enable AUTO_BED_LEVELING + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define ENABLE_AUTO_BED_LEVELING/#define ENABLE_AUTO_BED_LEVELING/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # enable EEPROM_SETTINGS & EEPROM_CHITCHAT + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define EEPROM_SETTINGS/#define EEPROM_SETTINGS/g' Marlin/Configuration.h + - sed -i 's/\/\/#define EEPROM_CHITCHAT/#define EEPROM_CHITCHAT/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + ### LCDS ### + # ULTIMAKERCONTROLLER + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define ULTIMAKERCONTROLLER/#define ULTIMAKERCONTROLLER/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # MAKRPANEL + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define MAKRPANEL/#define MAKRPANEL/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # REPRAP_DISCOUNT_SMART_CONTROLLER + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define REPRAP_DISCOUNT_SMART_CONTROLLER/#define REPRAP_DISCOUNT_SMART_CONTROLLER/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # G3D_PANE + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define G3D_PANEL/#define G3D_PANEL/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER/#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # REPRAPWORLD_KEYPAD + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define ULTRA_LCD/#define ULTRA_LCD/g' Marlin/Configuration.h + - sed -i 's/\/\/#define REPRAPWORLD_KEYPAD/#define REPRAPWORLD_KEYPAD/g' Marlin/Configuration.h + - sed -i 's/\/\/#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0/#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # RA_CONTROL_PANEL + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define RA_CONTROL_PANEL/#define RA_CONTROL_PANEL/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + ### I2C PANELS ### + # LCD_I2C_SAINSMART_YWROBOT + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define LCD_I2C_SAINSMART_YWROBOT/#define LCD_I2C_SAINSMART_YWROBOT/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # LCD_I2C_PANELOLU2 + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define LCD_I2C_PANELOLU2/#define LCD_I2C_PANELOLU2/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # LCD_I2C_VIKI + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define LCD_I2C_VIKI/#define LCD_I2C_VIKI/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # SAV_3DLCD + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define SAV_3DLCD/#define SAV_3DLCD/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # Enable filament sensor + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define FILAMENT_SENSOR/#define FILAMENT_SENSOR/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # Enable filament sensor with LCD display + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define ULTIMAKERCONTROLLER/#define ULTIMAKERCONTROLLER/g' Marlin/Configuration.h + - sed -i 's/\/\/#define FILAMENT_SENSOR/#define FILAMENT_SENSOR/g' Marlin/Configuration.h + - sed -i 's/\/\/#define FILAMENT_LCD_DISPLAY/#define FILAMENT_LCD_DISPLAY/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + ######## Example Configurations ############## + # Delta Config - cp Marlin/example_configurations/delta/Configuration* Marlin/ - rm -rf .build/ - ino build -m mega2560 + # Makibox Config need to check board type for Teensy++ 2.0 + #- cp Marlin/example_configurations/makibox/Configuration* Marlin/ + #- rm -rf .build/ + #- ino build -m mega2560 + # SCARA Config + - cp Marlin/example_configurations/SCARA/Configuration* Marlin/ + - rm -rf .build/ + - ino build -m mega2560 + # tvrrug Config need to check board type for sanguino atmega644p + #- cp Marlin/example_configurations/tvrrug/Round2/Configuration* Marlin/ + #- rm -rf .build/ + #- ino build -m mega2560 + ######## Board Types ############# - sed -i 's/#define MOTHERBOARD BOARD_RAMPS_13_EFB/#define MOTHERBOARD BOARD_DUEMILANOVE_328P/g' Marlin/Configuration.h - rm -rf .build/ - ino build -m atmega328 \ No newline at end of file From f8aa5ff771f6c81380bdabec02503a3377b93e8a Mon Sep 17 00:00:00 2001 From: wgm4321 Date: Sat, 3 Jan 2015 17:10:13 -0500 Subject: [PATCH 22/50] Fix for cant compile when REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER defined --- Marlin/dogm_lcd_implementation.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Marlin/dogm_lcd_implementation.h b/Marlin/dogm_lcd_implementation.h index 4fed3baf11..fafd249d67 100644 --- a/Marlin/dogm_lcd_implementation.h +++ b/Marlin/dogm_lcd_implementation.h @@ -366,6 +366,8 @@ static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char p #define lcd_implementation_drawmenu_setting_edit_float3(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr3(*(data))) #define lcd_implementation_drawmenu_setting_edit_float32_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr32(*(data))) #define lcd_implementation_drawmenu_setting_edit_float32(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr32(*(data))) +#define lcd_implementation_drawmenu_setting_edit_float43_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr43(*(data))) +#define lcd_implementation_drawmenu_setting_edit_float43(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr43(*(data))) #define lcd_implementation_drawmenu_setting_edit_float5_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_float5(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_float52_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr52(*(data))) @@ -384,6 +386,8 @@ static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char p #define lcd_implementation_drawmenu_setting_edit_callback_float3(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr3(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float32_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr32(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float32(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr32(*(data))) +#define lcd_implementation_drawmenu_setting_edit_callback_float43_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr43(*(data))) +#define lcd_implementation_drawmenu_setting_edit_callback_float43(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr43(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float5_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float5(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float52_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr52(*(data))) From 04fb34c7ff940228e8a65746f1794bf337cb5ada Mon Sep 17 00:00:00 2001 From: wgm4321 Date: Sat, 3 Jan 2015 17:28:05 -0500 Subject: [PATCH 23/50] Add English defines for filament menu to non-English to prevent compile errors until translated --- Marlin/language_an.h | 5 +++++ Marlin/language_ca.h | 5 +++++ Marlin/language_de.h | 5 +++++ Marlin/language_es.h | 5 +++++ Marlin/language_eu.h | 5 +++++ Marlin/language_fi.h | 5 +++++ Marlin/language_fr.h | 5 +++++ Marlin/language_it.h | 5 +++++ Marlin/language_nl.h | 5 +++++ Marlin/language_pl.h | 5 +++++ Marlin/language_pt.h | 5 +++++ Marlin/language_ru.h | 5 +++++ 12 files changed, 60 insertions(+) diff --git a/Marlin/language_an.h b/Marlin/language_an.h index 8c6820e1ab..39599b8bc1 100644 --- a/Marlin/language_an.h +++ b/Marlin/language_an.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "E trangos/mm" #define MSG_TEMPERATURE "Temperatura" #define MSG_MOTION "Movimiento" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "Contrast" #define MSG_STORE_EPROM "Alzar Memoria" #define MSG_LOAD_EPROM "Cargar Memoria" diff --git a/Marlin/language_ca.h b/Marlin/language_ca.h index 680c6eed01..ab87778534 100644 --- a/Marlin/language_ca.h +++ b/Marlin/language_ca.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "Epassos/mm" #define MSG_TEMPERATURE "Temperatura" #define MSG_MOTION "Moviment" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "Contrast de LCD" #define MSG_STORE_EPROM "Desar a memoria" #define MSG_LOAD_EPROM "Carregar de mem." diff --git a/Marlin/language_de.h b/Marlin/language_de.h index 801250b51d..7a8cb2f9d6 100644 --- a/Marlin/language_de.h +++ b/Marlin/language_de.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "Esteps/mm" #define MSG_TEMPERATURE "Temperatur" #define MSG_MOTION "Bewegung" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "LCD contrast" #define MSG_STORE_EPROM "EPROM speichern" #define MSG_LOAD_EPROM "EPROM laden" diff --git a/Marlin/language_es.h b/Marlin/language_es.h index eff9d6a8af..388b7a8401 100644 --- a/Marlin/language_es.h +++ b/Marlin/language_es.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "E pasos/mm" #define MSG_TEMPERATURE "Temperatura" #define MSG_MOTION "Movimiento" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "Contraste" #define MSG_STORE_EPROM "Guardar memoria" #define MSG_LOAD_EPROM "Cargar memoria" diff --git a/Marlin/language_eu.h b/Marlin/language_eu.h index 4b31b65672..4a2a04bdb5 100644 --- a/Marlin/language_eu.h +++ b/Marlin/language_eu.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "E pausoak/mm" #define MSG_TEMPERATURE "Tenperatura" #define MSG_MOTION "Mugimendua" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "LCD kontrastea" #define MSG_STORE_EPROM "Gorde memoria" #define MSG_LOAD_EPROM "Kargatu memoria" diff --git a/Marlin/language_fi.h b/Marlin/language_fi.h index b88c3759ad..57c1c0387b 100644 --- a/Marlin/language_fi.h +++ b/Marlin/language_fi.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "Esteps/mm" #define MSG_TEMPERATURE "Lampotila" #define MSG_MOTION "Liike" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "LCD contrast" #define MSG_STORE_EPROM "Tallenna muistiin" #define MSG_LOAD_EPROM "Lataa muistista" diff --git a/Marlin/language_fr.h b/Marlin/language_fr.h index ffcfeb4815..e6fd80f59c 100644 --- a/Marlin/language_fr.h +++ b/Marlin/language_fr.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "Epas/mm" #define MSG_TEMPERATURE "Temperature" #define MSG_MOTION "Mouvement" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "Contraste LCD" #define MSG_STORE_EPROM "Sauver config" #define MSG_LOAD_EPROM "Lire config" diff --git a/Marlin/language_it.h b/Marlin/language_it.h index b70a0841cc..c5621a4b19 100644 --- a/Marlin/language_it.h +++ b/Marlin/language_it.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "Epassi/mm" #define MSG_TEMPERATURE "Temperatura" #define MSG_MOTION "Movimento" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "LCD contrast" #define MSG_STORE_EPROM "Salva in EEPROM" #define MSG_LOAD_EPROM "Carica da EEPROM" diff --git a/Marlin/language_nl.h b/Marlin/language_nl.h index 56162d34d9..5af5a86aca 100644 --- a/Marlin/language_nl.h +++ b/Marlin/language_nl.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "Esteps/mm" #define MSG_TEMPERATURE "Temperatuur" #define MSG_MOTION "Beweging" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "LCD contrast" #define MSG_STORE_EPROM "Geheugen opslaan" #define MSG_LOAD_EPROM "Geheugen laden" diff --git a/Marlin/language_pl.h b/Marlin/language_pl.h index 430b900539..3a11565caf 100644 --- a/Marlin/language_pl.h +++ b/Marlin/language_pl.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "krokiE/mm" #define MSG_TEMPERATURE "Temperatura" #define MSG_MOTION "Ruch" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "Kontrast LCD" #define MSG_STORE_EPROM "Zapisz w pamieci" #define MSG_LOAD_EPROM "Wczytaj z pamieci" diff --git a/Marlin/language_pt.h b/Marlin/language_pt.h index 5c6f4fe7f9..bad02a2761 100644 --- a/Marlin/language_pt.h +++ b/Marlin/language_pt.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "Epasso/mm:" #define MSG_TEMPERATURE "Temperatura" #define MSG_MOTION "Movimento" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "Contrast" #define MSG_STORE_EPROM "Guardar memoria" #define MSG_LOAD_EPROM "Carregar memoria" diff --git a/Marlin/language_ru.h b/Marlin/language_ru.h index 844b3776b7..0fbb979744 100644 --- a/Marlin/language_ru.h +++ b/Marlin/language_ru.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "E шаг/mm:" #define MSG_TEMPERATURE "Температура \x7E" #define MSG_MOTION "СкороÑти \x7E" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "LCD contrast" #define MSG_STORE_EPROM "Сохранить в EPROM" #define MSG_LOAD_EPROM "Загруз. из EPROM" From 9d57c376db87f14ebd5b3f074b0af42d09664f11 Mon Sep 17 00:00:00 2001 From: monkeydave Date: Sat, 3 Jan 2015 22:46:15 +0000 Subject: [PATCH 24/50] Commented out configs that are failing with no easy fixes for the moment --- .travis.yml | 54 ++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/.travis.yml b/.travis.yml index b877709a43..8a378c7871 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,13 +35,15 @@ script: - cp Marlin/Configuration.h Marlin/Configuration.h.backup - cp Marlin/Configuration_adv.h Marlin/Configuration_adv.h.backup # change extruder numbers from 1 to 2 - - sed -i 's/#define EXTRUDERS 1/#define EXTRUDERS 2/g' Marlin/Configuration.h - - rm -rf .build/ - - ino build -m mega2560 - # change extruder numbers from 2 to 3 - - sed -i 's/#define EXTRUDERS 2/#define EXTRUDERS 3/g' Marlin/Configuration.h - - rm -rf .build/ - - ino build -m mega2560 + # commented out for the moment fails build but compiles fine in Arduino + #- sed -i 's/#define EXTRUDERS 1/#define EXTRUDERS 2/g' Marlin/Configuration.h + #- rm -rf .build/ + #- ino build -m mega2560 + # change extruder numbers from 2 to 3, needs to be a board with 3 extruders defined in pins.h + #- sed -i 's/#define MOTHERBOARD BOARD_ULTIMAKER/#define MOTHERBOARD BOARD_AZTEEG_X3_PRO/g' Marlin/Configuration.h + #- sed -i 's/#define EXTRUDERS 2/#define EXTRUDERS 3/g' Marlin/Configuration.h + #- rm -rf .build/ + #- ino build -m mega2560 # enable PIDTEMPBED - cp Marlin/Configuration.h.backup Marlin/Configuration.h - sed -i 's/\/\/#define PIDTEMPBED/#define PIDTEMPBED/g' Marlin/Configuration.h @@ -73,10 +75,11 @@ script: - rm -rf .build/ - ino build -m mega2560 # MAKRPANEL - - cp Marlin/Configuration.h.backup Marlin/Configuration.h - - sed -i 's/\/\/#define MAKRPANEL/#define MAKRPANEL/g' Marlin/Configuration.h - - rm -rf .build/ - - ino build -m mega2560 + # Needs to use melzi and sanguino hardware + #- cp Marlin/Configuration.h.backup Marlin/Configuration.h + #- sed -i 's/\/\/#define MAKRPANEL/#define MAKRPANEL/g' Marlin/Configuration.h + #- rm -rf .build/ + #- ino build -m mega2560 # REPRAP_DISCOUNT_SMART_CONTROLLER - cp Marlin/Configuration.h.backup Marlin/Configuration.h - sed -i 's/\/\/#define REPRAP_DISCOUNT_SMART_CONTROLLER/#define REPRAP_DISCOUNT_SMART_CONTROLLER/g' Marlin/Configuration.h @@ -92,13 +95,14 @@ script: - sed -i 's/\/\/#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER/#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER/g' Marlin/Configuration.h - rm -rf .build/ - ino build -m mega2560 - # REPRAPWORLD_KEYPAD - - cp Marlin/Configuration.h.backup Marlin/Configuration.h - - sed -i 's/\/\/#define ULTRA_LCD/#define ULTRA_LCD/g' Marlin/Configuration.h - - sed -i 's/\/\/#define REPRAPWORLD_KEYPAD/#define REPRAPWORLD_KEYPAD/g' Marlin/Configuration.h - - sed -i 's/\/\/#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0/#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0/g' Marlin/Configuration.h - - rm -rf .build/ - - ino build -m mega2560 + # REPRAPWORLD_KEYPAD + # Cant find configuration details to get it to compile + #- cp Marlin/Configuration.h.backup Marlin/Configuration.h + #- sed -i 's/\/\/#define ULTRA_LCD/#define ULTRA_LCD/g' Marlin/Configuration.h + #- sed -i 's/\/\/#define REPRAPWORLD_KEYPAD/#define REPRAPWORLD_KEYPAD/g' Marlin/Configuration.h + #- sed -i 's/\/\/#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0/#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0/g' Marlin/Configuration.h + #- rm -rf .build/ + #- ino build -m mega2560 # RA_CONTROL_PANEL - cp Marlin/Configuration.h.backup Marlin/Configuration.h - sed -i 's/\/\/#define RA_CONTROL_PANEL/#define RA_CONTROL_PANEL/g' Marlin/Configuration.h @@ -106,10 +110,11 @@ script: - ino build -m mega2560 ### I2C PANELS ### # LCD_I2C_SAINSMART_YWROBOT - - cp Marlin/Configuration.h.backup Marlin/Configuration.h - - sed -i 's/\/\/#define LCD_I2C_SAINSMART_YWROBOT/#define LCD_I2C_SAINSMART_YWROBOT/g' Marlin/Configuration.h - - rm -rf .build/ - - ino build -m mega2560 + # Failing at the moment needs different library + #- cp Marlin/Configuration.h.backup Marlin/Configuration.h + #- sed -i 's/\/\/#define LCD_I2C_SAINSMART_YWROBOT/#define LCD_I2C_SAINSMART_YWROBOT/g' Marlin/Configuration.h + #- rm -rf .build/ + #- ino build -m mega2560 # LCD_I2C_PANELOLU2 - cp Marlin/Configuration.h.backup Marlin/Configuration.h - sed -i 's/\/\/#define LCD_I2C_PANELOLU2/#define LCD_I2C_PANELOLU2/g' Marlin/Configuration.h @@ -120,11 +125,6 @@ script: - sed -i 's/\/\/#define LCD_I2C_VIKI/#define LCD_I2C_VIKI/g' Marlin/Configuration.h - rm -rf .build/ - ino build -m mega2560 - # SAV_3DLCD - - cp Marlin/Configuration.h.backup Marlin/Configuration.h - - sed -i 's/\/\/#define SAV_3DLCD/#define SAV_3DLCD/g' Marlin/Configuration.h - - rm -rf .build/ - - ino build -m mega2560 # Enable filament sensor - cp Marlin/Configuration.h.backup Marlin/Configuration.h - sed -i 's/\/\/#define FILAMENT_SENSOR/#define FILAMENT_SENSOR/g' Marlin/Configuration.h From 30248214c7fd52333d1c71bebe5ede40dbd76011 Mon Sep 17 00:00:00 2001 From: Philippe L Date: Sat, 3 Jan 2015 15:45:06 +0100 Subject: [PATCH 25/50] temp runaway: proper cast to prevent any overflow. --- Marlin/temperature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 94d257d550..7acc5ffd87 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -1049,7 +1049,7 @@ void thermal_runaway_protection(int *state, unsigned long *timer, float temperat { *timer = millis(); } - else if ( (millis() - *timer) > period_seconds*1000) + else if ( (millis() - *timer) > ((unsigned long) period_seconds) * 1000) { SERIAL_ERROR_START; SERIAL_ERRORLNPGM("Thermal Runaway, system stopped! Heater_ID: "); From 9472bbe51d091f3099bf2a2db5a4a21133667393 Mon Sep 17 00:00:00 2001 From: Dan Royer Date: Sun, 4 Jan 2015 12:17:46 -0800 Subject: [PATCH 26/50] issue 968 for dev branch try, try again. If 'OK' is garbled on sending PC won't receive it. Both machines will wait on each other forever. This resends OK if nothing is heard from PC for a while to avoid this bad case. --- Marlin/Marlin_main.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index e3e5ef3588..b8ab94fa88 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -376,6 +376,7 @@ const int sensitive_pins[] = SENSITIVE_PINS; // Sensitive pin list for M42 //Inactivity shutdown variables static unsigned long previous_millis_cmd = 0; +static unsigned long previous_millis_ok = 0; static unsigned long max_inactive_time = 0; static unsigned long stepper_inactive_time = DEFAULT_STEPPER_DEACTIVE_TIME*1000l; @@ -645,6 +646,7 @@ void loop() else { SERIAL_PROTOCOLLNPGM(MSG_OK); + previous_millis_ok = millis(); } } else @@ -3155,12 +3157,13 @@ Sigma_Exit: } } else if (servo_index >= 0) { - SERIAL_PROTOCOL(MSG_OK); + SERIAL_PROTOCOL(MSG_OK); SERIAL_PROTOCOL(" Servo "); SERIAL_PROTOCOL(servo_index); SERIAL_PROTOCOL(": "); SERIAL_PROTOCOL(servos[servo_index].read()); SERIAL_PROTOCOLLN(""); + previous_millis_ok = millis(); } } break; @@ -3235,6 +3238,7 @@ Sigma_Exit: SERIAL_PROTOCOL(" d:"); SERIAL_PROTOCOL(unscalePID_d(bedKd)); SERIAL_PROTOCOLLN(""); + previous_millis_ok = millis(); } break; #endif //PIDTEMP @@ -3525,6 +3529,7 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp SERIAL_ECHO_START; SERIAL_ECHOLNPGM(MSG_ZPROBE_ZOFFSET " " MSG_OK); SERIAL_PROTOCOLLN(""); + previous_millis_ok = millis(); } else { @@ -3911,6 +3916,7 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp ClearToSend(); } + void FlushSerialRequestResend() { //char cmdbuffer[bufindr][100]="Resend:"; @@ -3928,6 +3934,7 @@ void ClearToSend() return; #endif //SDSUPPORT SERIAL_PROTOCOLLNPGM(MSG_OK); + previous_millis_ok = millis(); } void get_coordinates() @@ -4352,6 +4359,14 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s if( (millis() - previous_millis_cmd) > max_inactive_time ) if(max_inactive_time) kill(); + + // If 'OK' is garbled on sending PC won't receive it. Both machines will wait on each other forever. + // This resends OK if nothing is heard from PC for a while to avoid this bad case. + if( (millis() - previous_millis_ok) > max_inactive_time/4 ) { + SERIAL_PROTOCOL(MSG_OK); + previous_millis_ok=millis(); + } + if(stepper_inactive_time) { if( (millis() - previous_millis_cmd) > stepper_inactive_time ) { From 2b9722f38713bbe4bb664013fa157e5a32ec3e16 Mon Sep 17 00:00:00 2001 From: wgm4321 Date: Sun, 4 Jan 2015 21:42:16 -0500 Subject: [PATCH 27/50] Add "Detailed Z Probe" menu item with ABL is defined. --- Marlin/language_an.h | 1 + Marlin/language_ca.h | 1 + Marlin/language_de.h | 1 + Marlin/language_en.h | 1 + Marlin/language_es.h | 1 + Marlin/language_eu.h | 1 + Marlin/language_fi.h | 1 + Marlin/language_fr.h | 1 + Marlin/language_it.h | 1 + Marlin/language_nl.h | 1 + Marlin/language_pl.h | 1 + Marlin/language_pt.h | 1 + Marlin/language_ru.h | 1 + Marlin/ultralcd.cpp | 3 +++ 14 files changed, 16 insertions(+) diff --git a/Marlin/language_an.h b/Marlin/language_an.h index f0b3fa2738..26cda9bce5 100644 --- a/Marlin/language_an.h +++ b/Marlin/language_an.h @@ -15,6 +15,7 @@ #define MSG_AUTOSTART " Autostart" #define MSG_DISABLE_STEPPERS "Amortar motors" #define MSG_AUTO_HOME "Levar a l'orichen" +#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Establir zero" #define MSG_PREHEAT_PLA "Precalentar PLA" diff --git a/Marlin/language_ca.h b/Marlin/language_ca.h index ba5d37127f..b5612a5c15 100644 --- a/Marlin/language_ca.h +++ b/Marlin/language_ca.h @@ -15,6 +15,7 @@ #define MSG_AUTOSTART "Inici automatic" #define MSG_DISABLE_STEPPERS "Apagar motors" #define MSG_AUTO_HOME "Home global" +#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Establir origen" #define MSG_PREHEAT_PLA "Preescalfar PLA" diff --git a/Marlin/language_de.h b/Marlin/language_de.h index e442448af6..5521ad6f0a 100644 --- a/Marlin/language_de.h +++ b/Marlin/language_de.h @@ -15,6 +15,7 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Stepper abschalt." #define MSG_AUTO_HOME "Auto Nullpunkt" +#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Setze Nullpunkt" #define MSG_PREHEAT_PLA "Vorwärmen PLA" diff --git a/Marlin/language_en.h b/Marlin/language_en.h index 014b42e51e..e05b0a3a1b 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -15,6 +15,7 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Disable steppers" #define MSG_AUTO_HOME "Auto home" +#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Set origin" #define MSG_PREHEAT_PLA "Preheat PLA" diff --git a/Marlin/language_es.h b/Marlin/language_es.h index 064c770604..8b56e0245d 100644 --- a/Marlin/language_es.h +++ b/Marlin/language_es.h @@ -15,6 +15,7 @@ #define MSG_AUTOSTART " Autostart" #define MSG_DISABLE_STEPPERS "Apagar motores" #define MSG_AUTO_HOME "Llevar al origen" +#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Ajustar offsets" #define MSG_SET_ORIGIN "Establecer cero" #define MSG_PREHEAT_PLA "Precalentar PLA" diff --git a/Marlin/language_eu.h b/Marlin/language_eu.h index 7e65ca59d1..207c6c0e9b 100644 --- a/Marlin/language_eu.h +++ b/Marlin/language_eu.h @@ -15,6 +15,7 @@ #define MSG_AUTOSTART "Auto hasiera" #define MSG_DISABLE_STEPPERS "Itzali motoreak" #define MSG_AUTO_HOME "Hasierara joan" +#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Hasiera ipini" #define MSG_PREHEAT_PLA "Aurreberotu PLA" diff --git a/Marlin/language_fi.h b/Marlin/language_fi.h index 0b1ac9cad9..77c2ce59c9 100644 --- a/Marlin/language_fi.h +++ b/Marlin/language_fi.h @@ -15,6 +15,7 @@ #define MSG_AUTOSTART "Automaatti" #define MSG_DISABLE_STEPPERS "Vapauta moottorit" #define MSG_AUTO_HOME "Aja referenssiin" +#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Aseta origo" #define MSG_PREHEAT_PLA "Esilammita PLA" diff --git a/Marlin/language_fr.h b/Marlin/language_fr.h index 59066b1268..c70d3de432 100644 --- a/Marlin/language_fr.h +++ b/Marlin/language_fr.h @@ -15,6 +15,7 @@ #define MSG_AUTOSTART "Demarrage auto" #define MSG_DISABLE_STEPPERS "Arreter moteurs" #define MSG_AUTO_HOME "Home auto." +#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Regler origine" #define MSG_PREHEAT_PLA "Prechauffage PLA" diff --git a/Marlin/language_it.h b/Marlin/language_it.h index 76845e3bcd..1ae525eb79 100644 --- a/Marlin/language_it.h +++ b/Marlin/language_it.h @@ -15,6 +15,7 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Disabilita Motori" #define MSG_AUTO_HOME "Auto Home" +#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Imposta Origine" #define MSG_PREHEAT_PLA "Preriscalda PLA" diff --git a/Marlin/language_nl.h b/Marlin/language_nl.h index e9dc380605..5e3b1f1c3a 100644 --- a/Marlin/language_nl.h +++ b/Marlin/language_nl.h @@ -15,6 +15,7 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Motoren uit" #define MSG_AUTO_HOME "Auto home" +#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Nulpunt instellen" #define MSG_PREHEAT_PLA "PLA voorverwarmen" diff --git a/Marlin/language_pl.h b/Marlin/language_pl.h index 55ec20ee36..bea39aae7c 100644 --- a/Marlin/language_pl.h +++ b/Marlin/language_pl.h @@ -15,6 +15,7 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Wylacz silniki" #define MSG_AUTO_HOME "Auto. poz. zerowa" +#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Ustaw punkt zero" #define MSG_PREHEAT_PLA "Rozgrzej PLA" diff --git a/Marlin/language_pt.h b/Marlin/language_pt.h index 09e346748f..9b386e1626 100644 --- a/Marlin/language_pt.h +++ b/Marlin/language_pt.h @@ -15,6 +15,7 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS " Apagar motores" #define MSG_AUTO_HOME "Ir para origen" +#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Estabelecer orig." #define MSG_PREHEAT_PLA "Pre-aquecer PLA" diff --git a/Marlin/language_ru.h b/Marlin/language_ru.h index ec666f186b..38f0dbef85 100644 --- a/Marlin/language_ru.h +++ b/Marlin/language_ru.h @@ -17,6 +17,7 @@ #define MSG_AUTOSTART "ÐвтоÑтарт" #define MSG_DISABLE_STEPPERS "Выкл. двигатели" #define MSG_AUTO_HOME "Парковка" +#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Запомнить ноль" #define MSG_PREHEAT_PLA "Преднагрев PLA" diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 42d4979583..8a38c82a5e 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -614,6 +614,9 @@ static void lcd_prepare_menu() #endif MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84")); MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); +#ifdef ENABLE_AUTO_BED_LEVELING + MENU_ITEM(gcode, MSG_DETAILED_Z_PROBE, PSTR("G29")); +#endif MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets); //MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0")); #if TEMP_SENSOR_0 != 0 From dd7e4ee97f69c835aa26b92fa42056502bd3eac9 Mon Sep 17 00:00:00 2001 From: wgm4321 Date: Sun, 4 Jan 2015 21:44:55 -0500 Subject: [PATCH 28/50] Make sure volumetric multipliers are recalc'ed during menu enable/disable of mm3 --- Marlin/ultralcd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 8a38c82a5e..b97a5b5d68 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -883,7 +883,7 @@ static void lcd_control_volumetric_menu() START_MENU(); MENU_ITEM(back, MSG_CONTROL, lcd_control_menu); - MENU_ITEM_EDIT(bool, MSG_VOLUMETRIC_ENABLED, &volumetric_enabled); + MENU_ITEM_EDIT_CALLBACK(bool, MSG_VOLUMETRIC_ENABLED, &volumetric_enabled, calculate_volumetric_multipliers); if (volumetric_enabled) { MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_0, &filament_size[0], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers); From ec4681ab6b7d50ae80ea72f7964e51ea563cd019 Mon Sep 17 00:00:00 2001 From: wgm4321 Date: Sun, 4 Jan 2015 21:53:37 -0500 Subject: [PATCH 29/50] Revert "Add "Detailed Z Probe" menu item with ABL is defined." This reverts commit 2b9722f38713bbe4bb664013fa157e5a32ec3e16. --- Marlin/language_an.h | 1 - Marlin/language_ca.h | 1 - Marlin/language_de.h | 1 - Marlin/language_en.h | 1 - Marlin/language_es.h | 1 - Marlin/language_eu.h | 1 - Marlin/language_fi.h | 1 - Marlin/language_fr.h | 1 - Marlin/language_it.h | 1 - Marlin/language_nl.h | 1 - Marlin/language_pl.h | 1 - Marlin/language_pt.h | 1 - Marlin/language_ru.h | 1 - Marlin/ultralcd.cpp | 3 --- 14 files changed, 16 deletions(-) diff --git a/Marlin/language_an.h b/Marlin/language_an.h index 26cda9bce5..f0b3fa2738 100644 --- a/Marlin/language_an.h +++ b/Marlin/language_an.h @@ -15,7 +15,6 @@ #define MSG_AUTOSTART " Autostart" #define MSG_DISABLE_STEPPERS "Amortar motors" #define MSG_AUTO_HOME "Levar a l'orichen" -#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Establir zero" #define MSG_PREHEAT_PLA "Precalentar PLA" diff --git a/Marlin/language_ca.h b/Marlin/language_ca.h index b5612a5c15..ba5d37127f 100644 --- a/Marlin/language_ca.h +++ b/Marlin/language_ca.h @@ -15,7 +15,6 @@ #define MSG_AUTOSTART "Inici automatic" #define MSG_DISABLE_STEPPERS "Apagar motors" #define MSG_AUTO_HOME "Home global" -#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Establir origen" #define MSG_PREHEAT_PLA "Preescalfar PLA" diff --git a/Marlin/language_de.h b/Marlin/language_de.h index 5521ad6f0a..e442448af6 100644 --- a/Marlin/language_de.h +++ b/Marlin/language_de.h @@ -15,7 +15,6 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Stepper abschalt." #define MSG_AUTO_HOME "Auto Nullpunkt" -#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Setze Nullpunkt" #define MSG_PREHEAT_PLA "Vorwärmen PLA" diff --git a/Marlin/language_en.h b/Marlin/language_en.h index e05b0a3a1b..014b42e51e 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -15,7 +15,6 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Disable steppers" #define MSG_AUTO_HOME "Auto home" -#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Set origin" #define MSG_PREHEAT_PLA "Preheat PLA" diff --git a/Marlin/language_es.h b/Marlin/language_es.h index 8b56e0245d..064c770604 100644 --- a/Marlin/language_es.h +++ b/Marlin/language_es.h @@ -15,7 +15,6 @@ #define MSG_AUTOSTART " Autostart" #define MSG_DISABLE_STEPPERS "Apagar motores" #define MSG_AUTO_HOME "Llevar al origen" -#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Ajustar offsets" #define MSG_SET_ORIGIN "Establecer cero" #define MSG_PREHEAT_PLA "Precalentar PLA" diff --git a/Marlin/language_eu.h b/Marlin/language_eu.h index 207c6c0e9b..7e65ca59d1 100644 --- a/Marlin/language_eu.h +++ b/Marlin/language_eu.h @@ -15,7 +15,6 @@ #define MSG_AUTOSTART "Auto hasiera" #define MSG_DISABLE_STEPPERS "Itzali motoreak" #define MSG_AUTO_HOME "Hasierara joan" -#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Hasiera ipini" #define MSG_PREHEAT_PLA "Aurreberotu PLA" diff --git a/Marlin/language_fi.h b/Marlin/language_fi.h index 77c2ce59c9..0b1ac9cad9 100644 --- a/Marlin/language_fi.h +++ b/Marlin/language_fi.h @@ -15,7 +15,6 @@ #define MSG_AUTOSTART "Automaatti" #define MSG_DISABLE_STEPPERS "Vapauta moottorit" #define MSG_AUTO_HOME "Aja referenssiin" -#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Aseta origo" #define MSG_PREHEAT_PLA "Esilammita PLA" diff --git a/Marlin/language_fr.h b/Marlin/language_fr.h index c70d3de432..59066b1268 100644 --- a/Marlin/language_fr.h +++ b/Marlin/language_fr.h @@ -15,7 +15,6 @@ #define MSG_AUTOSTART "Demarrage auto" #define MSG_DISABLE_STEPPERS "Arreter moteurs" #define MSG_AUTO_HOME "Home auto." -#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Regler origine" #define MSG_PREHEAT_PLA "Prechauffage PLA" diff --git a/Marlin/language_it.h b/Marlin/language_it.h index 1ae525eb79..76845e3bcd 100644 --- a/Marlin/language_it.h +++ b/Marlin/language_it.h @@ -15,7 +15,6 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Disabilita Motori" #define MSG_AUTO_HOME "Auto Home" -#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Imposta Origine" #define MSG_PREHEAT_PLA "Preriscalda PLA" diff --git a/Marlin/language_nl.h b/Marlin/language_nl.h index 5e3b1f1c3a..e9dc380605 100644 --- a/Marlin/language_nl.h +++ b/Marlin/language_nl.h @@ -15,7 +15,6 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Motoren uit" #define MSG_AUTO_HOME "Auto home" -#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Nulpunt instellen" #define MSG_PREHEAT_PLA "PLA voorverwarmen" diff --git a/Marlin/language_pl.h b/Marlin/language_pl.h index bea39aae7c..55ec20ee36 100644 --- a/Marlin/language_pl.h +++ b/Marlin/language_pl.h @@ -15,7 +15,6 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Wylacz silniki" #define MSG_AUTO_HOME "Auto. poz. zerowa" -#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Ustaw punkt zero" #define MSG_PREHEAT_PLA "Rozgrzej PLA" diff --git a/Marlin/language_pt.h b/Marlin/language_pt.h index 9b386e1626..09e346748f 100644 --- a/Marlin/language_pt.h +++ b/Marlin/language_pt.h @@ -15,7 +15,6 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS " Apagar motores" #define MSG_AUTO_HOME "Ir para origen" -#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Estabelecer orig." #define MSG_PREHEAT_PLA "Pre-aquecer PLA" diff --git a/Marlin/language_ru.h b/Marlin/language_ru.h index 38f0dbef85..ec666f186b 100644 --- a/Marlin/language_ru.h +++ b/Marlin/language_ru.h @@ -17,7 +17,6 @@ #define MSG_AUTOSTART "ÐвтоÑтарт" #define MSG_DISABLE_STEPPERS "Выкл. двигатели" #define MSG_AUTO_HOME "Парковка" -#define MSG_DETAILED_Z_PROBE "Detailed Z probe" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Запомнить ноль" #define MSG_PREHEAT_PLA "Преднагрев PLA" diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index b97a5b5d68..795d9f2c82 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -614,9 +614,6 @@ static void lcd_prepare_menu() #endif MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84")); MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); -#ifdef ENABLE_AUTO_BED_LEVELING - MENU_ITEM(gcode, MSG_DETAILED_Z_PROBE, PSTR("G29")); -#endif MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets); //MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0")); #if TEMP_SENSOR_0 != 0 From f24dda970054ffd03842ca2a473faea1332db9d8 Mon Sep 17 00:00:00 2001 From: wgm4321 Date: Sun, 4 Jan 2015 22:08:41 -0500 Subject: [PATCH 30/50] Revert "Make sure volumetric multipliers are recalc'ed during menu enable/disable of mm3" This reverts commit dd7e4ee97f69c835aa26b92fa42056502bd3eac9. --- Marlin/ultralcd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 795d9f2c82..42d4979583 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -880,7 +880,7 @@ static void lcd_control_volumetric_menu() START_MENU(); MENU_ITEM(back, MSG_CONTROL, lcd_control_menu); - MENU_ITEM_EDIT_CALLBACK(bool, MSG_VOLUMETRIC_ENABLED, &volumetric_enabled, calculate_volumetric_multipliers); + MENU_ITEM_EDIT(bool, MSG_VOLUMETRIC_ENABLED, &volumetric_enabled); if (volumetric_enabled) { MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_0, &filament_size[0], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers); From a19f2f8ae72552b40af7789d2f31e5120da45e18 Mon Sep 17 00:00:00 2001 From: wgm4321 Date: Sun, 4 Jan 2015 22:15:16 -0500 Subject: [PATCH 31/50] Disable volumetric menu item due to missing recalc of of multipliers when enabled/disabled --- Marlin/ultralcd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 42d4979583..b1c61e80f0 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -745,7 +745,7 @@ static void lcd_control_menu() MENU_ITEM(back, MSG_MAIN, lcd_main_menu); MENU_ITEM(submenu, MSG_TEMPERATURE, lcd_control_temperature_menu); MENU_ITEM(submenu, MSG_MOTION, lcd_control_motion_menu); - MENU_ITEM(submenu, MSG_VOLUMETRIC, lcd_control_volumetric_menu); + //MENU_ITEM(submenu, MSG_VOLUMETRIC, lcd_control_volumetric_menu); #ifdef DOGLCD // MENU_ITEM_EDIT(int3, MSG_CONTRAST, &lcd_contrast, 0, 63); From 067b509479f8114d47693551c87a3a90c4295da9 Mon Sep 17 00:00:00 2001 From: wgm4321 Date: Mon, 5 Jan 2015 22:29:29 -0500 Subject: [PATCH 32/50] Re-enable filament menu with recalc fix when enabling/disabling mm3 --- Marlin/ultralcd.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index b1c61e80f0..d790266d92 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -745,7 +745,7 @@ static void lcd_control_menu() MENU_ITEM(back, MSG_MAIN, lcd_main_menu); MENU_ITEM(submenu, MSG_TEMPERATURE, lcd_control_temperature_menu); MENU_ITEM(submenu, MSG_MOTION, lcd_control_motion_menu); - //MENU_ITEM(submenu, MSG_VOLUMETRIC, lcd_control_volumetric_menu); + MENU_ITEM(submenu, MSG_VOLUMETRIC, lcd_control_volumetric_menu); #ifdef DOGLCD // MENU_ITEM_EDIT(int3, MSG_CONTRAST, &lcd_contrast, 0, 63); @@ -880,7 +880,7 @@ static void lcd_control_volumetric_menu() START_MENU(); MENU_ITEM(back, MSG_CONTROL, lcd_control_menu); - MENU_ITEM_EDIT(bool, MSG_VOLUMETRIC_ENABLED, &volumetric_enabled); + MENU_ITEM_EDIT_CALLBACK(bool, MSG_VOLUMETRIC_ENABLED, &volumetric_enabled, calculate_volumetric_multipliers); if (volumetric_enabled) { MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_0, &filament_size[0], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers); @@ -1114,6 +1114,11 @@ static void menu_action_setting_edit_bool(const char* pstr, bool* ptr) { *ptr = !(*ptr); } +static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, menuFunc_t callback) +{ + menu_action_setting_edit_bool(pstr, ptr); + (*callback)(); +} #endif//ULTIPANEL /** LCD API **/ From 538231edfdd1b30debdaa7afe53e9da34fe8985f Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 6 Jan 2015 08:20:20 +0100 Subject: [PATCH 33/50] cosmetic whitespace cleanup and comments added/updated --- .../scripts/createTemperatureLookupMarlin.py | 47 +++++++++---------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/Marlin/scripts/createTemperatureLookupMarlin.py b/Marlin/scripts/createTemperatureLookupMarlin.py index 01c602dffa..372a5b5133 100755 --- a/Marlin/scripts/createTemperatureLookupMarlin.py +++ b/Marlin/scripts/createTemperatureLookupMarlin.py @@ -1,12 +1,8 @@ #!/usr/bin/python -# -# Creates a C code lookup table for doing ADC to temperature conversion -# on a microcontroller -# based on: http://hydraraptor.blogspot.com/2007/10/measuring-temperature-easy-way.html """Thermistor Value Lookup Table Generator Generates lookup to temperature values for use in a microcontroller in C format based on: -http://hydraraptor.blogspot.com/2007/10/measuring-temperature-easy-way.html +http://en.wikipedia.org/wiki/Steinhart-Hart_equation The main use is for Arduino programs that read data from the circuit board described here: http://make.rrrf.org/ts-1.0 @@ -19,7 +15,7 @@ Options: --t1=ttt:rrr low temperature temperature:resistance point (around 25C) --t2=ttt:rrr middle temperature temperature:resistance point (around 150C) --t3=ttt:rrr high temperature temperature:resistance point (around 250C) - --num-temps=... the number of temperature points to calculate (default: 20) + --num-temps=... the number of temperature points to calculate (default: 36) """ from math import * @@ -86,15 +82,15 @@ class Thermistor: return (r / (self.rp + r)) * (1024) def main(argv): - - rp = 4700; - t1 = 25; - r1 = 100000; - t2 = 150; - r2 = 1641.9; - t3 = 250; - r3 = 226.15; - num_temps = int(36); + "Default values" + t1 = 25 # low temperature in Kelvin (25 degC) + r1 = 100000 # resistance at low temperature (10 kOhm) + t2 = 150 # middle temperature in Kelvin (150 degC) + r2 = 1641.9 # resistance at middle temperature (1.6 KOhm) + t3 = 250 # high temperature in Kelvin (250 degC) + r3 = 226.15 # resistance at high temperature (226.15 Ohm) + rp = 4700; # pull-up resistor (4.7 kOhm) + num_temps = int(36); # number of entries for look-up table try: opts, args = getopt.getopt(argv, "h", ["help", "rp=", "t1=", "t2=", "t3=", "num-temps="]) @@ -102,7 +98,7 @@ def main(argv): print str(err) usage() sys.exit(2) - + for opt, arg in opts: if opt in ("-h", "--help"): usage() @@ -111,16 +107,16 @@ def main(argv): rp = int(arg) elif opt == "--t1": arg = arg.split(':') - t1 = float( arg[0]) - r1 = float( arg[1]) + t1 = float(arg[0]) + r1 = float(arg[1]) elif opt == "--t2": arg = arg.split(':') - t2 = float( arg[0]) - r2 = float( arg[1]) + t2 = float(arg[0]) + r2 = float(arg[1]) elif opt == "--t3": arg = arg.split(':') - t3 = float( arg[0]) - r3 = float( arg[1]) + t3 = float(arg[0]) + r3 = float(arg[1]) elif opt == "--num-temps": num_temps = int(arg) @@ -136,8 +132,9 @@ def main(argv): print "// Thermistor lookup table for Marlin" print "// ./createTemperatureLookupMarlin.py --rp=%s --t1=%s:%s --t2=%s:%s --t3=%s:%s --num-temps=%s" % (rp, t1, r1, t2, r2, t3, r3, num_temps) - print "// Steinhart-Hart Coefficients: %.15g, %.15g, %.15g " % (t.c1, t.c2, t.c3) - print "//#define NUMTEMPS %s" % (len(temps)) + print "// Steinhart-Hart Coefficients: a=%.15g, b=%.15g, c=%.15g " % (t.c1, t.c2, t.c3) + print + print "#define NUMTEMPS %s" % (len(temps)) print "const short temptable[NUMTEMPS][2] PROGMEM = {" counter = 0 @@ -148,7 +145,7 @@ def main(argv): else: print " {(short)(%.2f*OVERSAMPLENR), %s}, // v=%s r=%s res=%s C/count" % ((t.adc(temp)), temp, t.v(t.adc(temp)), t.r(t.adc(temp)),t.res(t.adc(temp))) print "};" - + def usage(): print __doc__ From fb0996b5db92415afad74d9a39e5e6f89bf831b8 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 6 Jan 2015 08:20:52 +0100 Subject: [PATCH 34/50] improved output aligment and precision --- Marlin/scripts/createTemperatureLookupMarlin.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Marlin/scripts/createTemperatureLookupMarlin.py b/Marlin/scripts/createTemperatureLookupMarlin.py index 372a5b5133..93b5bd7dde 100755 --- a/Marlin/scripts/createTemperatureLookupMarlin.py +++ b/Marlin/scripts/createTemperatureLookupMarlin.py @@ -137,13 +137,13 @@ def main(argv): print "#define NUMTEMPS %s" % (len(temps)) print "const short temptable[NUMTEMPS][2] PROGMEM = {" - counter = 0 for temp in temps: - counter = counter +1 - if counter == len(temps): - print " {(short)(%.2f*OVERSAMPLENR), %s} // v=%s r=%s res=%s C/count" % ((t.adc(temp)), temp, t.v(t.adc(temp)), t.r(t.adc(temp)),t.res(t.adc(temp))) - else: - print " {(short)(%.2f*OVERSAMPLENR), %s}, // v=%s r=%s res=%s C/count" % ((t.adc(temp)), temp, t.v(t.adc(temp)), t.r(t.adc(temp)),t.res(t.adc(temp))) + print " { (short) (%7.2f * OVERSAMPLENR ), %s\t}%s // v=%.3f\tr=%.3f\tres=%.3f degC/count" % ( t.adc(temp), temp, \ + ',' if temp != temps[-1] else ' ', \ + t.v( t.adc(temp)), \ + t.r( t.adc(temp)), \ + t.res(t.adc(temp)) \ + ) print "};" def usage(): From 21205cc3d88ed9bc39801873e63349612172bc81 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 6 Jan 2015 08:23:51 +0100 Subject: [PATCH 35/50] more cleanups in the termistorTable generation script --- Marlin/scripts/createTemperatureLookupMarlin.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Marlin/scripts/createTemperatureLookupMarlin.py b/Marlin/scripts/createTemperatureLookupMarlin.py index 93b5bd7dde..d08abce397 100755 --- a/Marlin/scripts/createTemperatureLookupMarlin.py +++ b/Marlin/scripts/createTemperatureLookupMarlin.py @@ -22,6 +22,11 @@ from math import * import sys import getopt +"Constants" +ARES = pow(2,10) # 10 Bit ADC resolution +TMIN = 0 # lowest temperature in table +TMAX = 350 # highest temperature in table + class Thermistor: "Class to do the thermistor maths" def __init__(self, rp, t1, r1, t2, r2, t3, r3): @@ -120,15 +125,10 @@ def main(argv): elif opt == "--num-temps": num_temps = int(arg) - max_adc = (1024 ) - 1 - min_temp = 0 - max_temp = 350 - increment = int(max_adc/(num_temps-1)); - + increment = int((ARES-1)/(num_temps-1)); t = Thermistor(rp, t1, r1, t2, r2, t3, r3) - tmp = (min_temp - max_temp) / (num_temps-1) - print tmp - temps = range(max_temp, min_temp + tmp, tmp); + tmp = (TMIN-TMAX) / (num_temps-1) + temps = range(TMAX, TMIN+tmp, tmp); print "// Thermistor lookup table for Marlin" print "// ./createTemperatureLookupMarlin.py --rp=%s --t1=%s:%s --t2=%s:%s --t3=%s:%s --num-temps=%s" % (rp, t1, r1, t2, r2, t3, r3, num_temps) From 95f4a55820662c7ce87c1a08b52dc281d9afda38 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 6 Jan 2015 08:24:59 +0100 Subject: [PATCH 36/50] refactored termistor table calculation to be in line with wikipedia's article about Steinhart-Hart coefficients --- .../scripts/createTemperatureLookupMarlin.py | 72 +++++++++---------- 1 file changed, 32 insertions(+), 40 deletions(-) diff --git a/Marlin/scripts/createTemperatureLookupMarlin.py b/Marlin/scripts/createTemperatureLookupMarlin.py index d08abce397..f23db1393c 100755 --- a/Marlin/scripts/createTemperatureLookupMarlin.py +++ b/Marlin/scripts/createTemperatureLookupMarlin.py @@ -23,68 +23,60 @@ import sys import getopt "Constants" +ZERO = 273.15 # zero point of Kelvin scale +VADC = 5 # ADC voltage +VCC = 5 # supply voltage ARES = pow(2,10) # 10 Bit ADC resolution +VSTEP = VADC / ARES # ADC voltage resolution TMIN = 0 # lowest temperature in table TMAX = 350 # highest temperature in table class Thermistor: "Class to do the thermistor maths" def __init__(self, rp, t1, r1, t2, r2, t3, r3): - t1 = t1 + 273.15 # low temperature (25C) - r1 = r1 # resistance at low temperature - t2 = t2 + 273.15 # middle temperature (150C) - r2 = r2 # resistance at middle temperature - t3 = t3 + 273.15 # high temperature (250C) - r3 = r3 # resistance at high temperature - self.rp = rp # pull-up resistance - self.vadc = 5.0 # ADC reference - self.vcc = 5.0 # supply voltage to potential divider - a1 = log(r1) - a2 = log(r2) - a3 = log(r3) - z = a1 - a2 - y = a1 - a3 - x = 1/t1 - 1/t2 - w = 1/t1 - 1/t3 - v = pow(a1,3) - pow(a2,3) - u = pow(a1,3) - pow(a3,3) - c3 = (x-z*w/y)/(v-z*u/y) - c2 = (x-c3*v)/z - c1 = 1/t1-c3*pow(a1,3)-c2*a1 - self.c1 = c1 - self.c2 = c2 - self.c3 = c3 + l1 = log(r1) + l2 = log(r2) + l3 = log(r3) + y1 = 1.0 / (t1 + ZERO) # adjust scale + y2 = 1.0 / (t2 + ZERO) + y3 = 1.0 / (t3 + ZERO) + x = (y2 - y1) / (l2 - l1) + y = (y3 - y1) / (l3 - l1) + c = (y - x) / ((l3 - l2) * (l1 + l2 + l3)) + b = x - c * (pow(l1,2) + pow(l2,2) + l1*l2) + a = y1 - (b + pow(l1,2)*c)*l1 + self.c1 = a # Steinhart-Hart coefficients + self.c2 = b + self.c3 = c + self.rp = rp # pull-up resistance - def res(self,adc): + def res(self, adc): "Convert ADC reading into a resolution" res = self.temp(adc)-self.temp(adc+1) return res - def v(self,adc): + def v(self, adc): "Convert ADC reading into a Voltage" - v = adc * self.vadc / (1024 ) # convert the 10 bit ADC value to a voltage - return v + return adc * VSTEP # convert the 10 bit ADC value to a voltage - def r(self,adc): + def r(self, adc): "Convert ADC reading into a resistance in Ohms" - v = adc * self.vadc / (1024 ) # convert the 10 bit ADC value to a voltage - r = self.rp * v / (self.vcc - v) # resistance of thermistor + r = self.rp * self.v(adc) / (VCC - self.v(adc)) # resistance of thermistor return r - def temp(self,adc): + def temp(self, adc): "Convert ADC reading into a temperature in Celcius" - v = adc * self.vadc / (1024 ) # convert the 10 bit ADC value to a voltage - r = self.rp * v / (self.vcc - v) # resistance of thermistor + r = self.rp * self.v(adc) / (VCC - self.v(adc)) # resistance of thermistor lnr = log(r) Tinv = self.c1 + (self.c2*lnr) + (self.c3*pow(lnr,3)) - return (1/Tinv) - 273.15 # temperature + return (1/Tinv) - ZERO # temperature - def adc(self,temp): + def adc(self, temp): "Convert temperature into a ADC reading" - y = (self.c1 - (1/(temp+273.15))) / (2*self.c3) - x = sqrt(pow(self.c2 / (3*self.c3),3) + pow(y,2)) - r = exp(pow(x-y,1.0/3) - pow(x+y,1.0/3)) # resistance of thermistor - return (r / (self.rp + r)) * (1024) + x = (self.c1 - (1.0 / (temp+ZERO))) / (2*self.c3) + y = sqrt(pow(self.c2 / (3*self.c3),3) + pow(x,2)) + r = exp(pow(y-x,1.0/3) - pow(y+x,1.0/3)) # resistance of thermistor + return (r / (self.rp + r)) * ARES def main(argv): "Default values" From 81363bc4414d538544c93cb681ab4ebc93fb8883 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 6 Jan 2015 10:27:40 +0100 Subject: [PATCH 37/50] more cleanups --- .../scripts/createTemperatureLookupMarlin.py | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Marlin/scripts/createTemperatureLookupMarlin.py b/Marlin/scripts/createTemperatureLookupMarlin.py index f23db1393c..f71c87b358 100755 --- a/Marlin/scripts/createTemperatureLookupMarlin.py +++ b/Marlin/scripts/createTemperatureLookupMarlin.py @@ -12,9 +12,9 @@ Usage: python createTemperatureLookup.py [options] Options: -h, --help show this help --rp=... pull-up resistor - --t1=ttt:rrr low temperature temperature:resistance point (around 25C) - --t2=ttt:rrr middle temperature temperature:resistance point (around 150C) - --t3=ttt:rrr high temperature temperature:resistance point (around 250C) + --t1=ttt:rrr low temperature temperature:resistance point (around 25 degC) + --t2=ttt:rrr middle temperature temperature:resistance point (around 150 degC) + --t3=ttt:rrr high temperature temperature:resistance point (around 250 degC) --num-temps=... the number of temperature points to calculate (default: 36) """ @@ -50,25 +50,24 @@ class Thermistor: self.c3 = c self.rp = rp # pull-up resistance - def res(self, adc): + def resol(self, adc): "Convert ADC reading into a resolution" res = self.temp(adc)-self.temp(adc+1) return res - def v(self, adc): + def voltage(self, adc): "Convert ADC reading into a Voltage" return adc * VSTEP # convert the 10 bit ADC value to a voltage - def r(self, adc): + def resist(self, adc): "Convert ADC reading into a resistance in Ohms" - r = self.rp * self.v(adc) / (VCC - self.v(adc)) # resistance of thermistor + r = self.rp * self.voltage(adc) / (VCC - self.voltage(adc)) # resistance of thermistor return r def temp(self, adc): "Convert ADC reading into a temperature in Celcius" - r = self.rp * self.v(adc) / (VCC - self.v(adc)) # resistance of thermistor - lnr = log(r) - Tinv = self.c1 + (self.c2*lnr) + (self.c3*pow(lnr,3)) + l = log(self.resist(adc)) + Tinv = self.c1 + self.c2*l + self.c3*pow(l,3) # inverse temperature return (1/Tinv) - ZERO # temperature def adc(self, temp): @@ -87,7 +86,7 @@ def main(argv): t3 = 250 # high temperature in Kelvin (250 degC) r3 = 226.15 # resistance at high temperature (226.15 Ohm) rp = 4700; # pull-up resistor (4.7 kOhm) - num_temps = int(36); # number of entries for look-up table + num_temps = 36; # number of entries for look-up table try: opts, args = getopt.getopt(argv, "h", ["help", "rp=", "t1=", "t2=", "t3=", "num-temps="]) @@ -130,11 +129,12 @@ def main(argv): print "const short temptable[NUMTEMPS][2] PROGMEM = {" for temp in temps: - print " { (short) (%7.2f * OVERSAMPLENR ), %s\t}%s // v=%.3f\tr=%.3f\tres=%.3f degC/count" % ( t.adc(temp), temp, \ + adc = t.adc(temp) + print " { (short) (%7.2f * OVERSAMPLENR ), %4s }%s // v=%.3f\tr=%.3f\tres=%.3f degC/count" % (adc , temp, \ ',' if temp != temps[-1] else ' ', \ - t.v( t.adc(temp)), \ - t.r( t.adc(temp)), \ - t.res(t.adc(temp)) \ + t.voltage(adc), \ + t.resist( adc), \ + t.resol( adc) \ ) print "};" From 4e02aff9b50ea2e55db7419a1ffdbfe8fa865f02 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 6 Jan 2015 10:28:19 +0100 Subject: [PATCH 38/50] automatically determine min/max temp for terminator --- Marlin/scripts/createTemperatureLookupMarlin.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Marlin/scripts/createTemperatureLookupMarlin.py b/Marlin/scripts/createTemperatureLookupMarlin.py index f71c87b358..80c9be52f9 100755 --- a/Marlin/scripts/createTemperatureLookupMarlin.py +++ b/Marlin/scripts/createTemperatureLookupMarlin.py @@ -114,16 +114,21 @@ def main(argv): t3 = float(arg[0]) r3 = float(arg[1]) elif opt == "--num-temps": - num_temps = int(arg) + num_temps = int(arg) - increment = int((ARES-1)/(num_temps-1)); t = Thermistor(rp, t1, r1, t2, r2, t3, r3) - tmp = (TMIN-TMAX) / (num_temps-1) - temps = range(TMAX, TMIN+tmp, tmp); + increment = int((ARES-1)/(num_temps-1)); + step = (TMIN-TMAX) / (num_temps-1) + low_bound = t.temp(ARES-1); + up_bound = t.temp(1); + min_temp = int(TMIN if TMIN > low_bound else low_bound) + max_temp = int(TMAX if TMAX < up_bound else up_bound) + temps = range(max_temp, TMIN+step, step); print "// Thermistor lookup table for Marlin" print "// ./createTemperatureLookupMarlin.py --rp=%s --t1=%s:%s --t2=%s:%s --t3=%s:%s --num-temps=%s" % (rp, t1, r1, t2, r2, t3, r3, num_temps) print "// Steinhart-Hart Coefficients: a=%.15g, b=%.15g, c=%.15g " % (t.c1, t.c2, t.c3) + print "// Theoretical limits of termistor: %.2f to %.2f degC" % (low_bound, up_bound) print print "#define NUMTEMPS %s" % (len(temps)) print "const short temptable[NUMTEMPS][2] PROGMEM = {" From f7e65935fbd394a952c102928ee33958c2b2e076 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 6 Jan 2015 10:28:43 +0100 Subject: [PATCH 39/50] make use of power operator --- Marlin/scripts/createTemperatureLookupMarlin.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Marlin/scripts/createTemperatureLookupMarlin.py b/Marlin/scripts/createTemperatureLookupMarlin.py index 80c9be52f9..0e05981a19 100755 --- a/Marlin/scripts/createTemperatureLookupMarlin.py +++ b/Marlin/scripts/createTemperatureLookupMarlin.py @@ -26,7 +26,7 @@ import getopt ZERO = 273.15 # zero point of Kelvin scale VADC = 5 # ADC voltage VCC = 5 # supply voltage -ARES = pow(2,10) # 10 Bit ADC resolution +ARES = 2**10 # 10 Bit ADC resolution VSTEP = VADC / ARES # ADC voltage resolution TMIN = 0 # lowest temperature in table TMAX = 350 # highest temperature in table @@ -43,8 +43,6 @@ class Thermistor: x = (y2 - y1) / (l2 - l1) y = (y3 - y1) / (l3 - l1) c = (y - x) / ((l3 - l2) * (l1 + l2 + l3)) - b = x - c * (pow(l1,2) + pow(l2,2) + l1*l2) - a = y1 - (b + pow(l1,2)*c)*l1 self.c1 = a # Steinhart-Hart coefficients self.c2 = b self.c3 = c @@ -67,14 +65,14 @@ class Thermistor: def temp(self, adc): "Convert ADC reading into a temperature in Celcius" l = log(self.resist(adc)) - Tinv = self.c1 + self.c2*l + self.c3*pow(l,3) # inverse temperature + Tinv = self.c1 + self.c2*l + self.c3* l**3) # inverse temperature return (1/Tinv) - ZERO # temperature def adc(self, temp): "Convert temperature into a ADC reading" x = (self.c1 - (1.0 / (temp+ZERO))) / (2*self.c3) - y = sqrt(pow(self.c2 / (3*self.c3),3) + pow(x,2)) - r = exp(pow(y-x,1.0/3) - pow(y+x,1.0/3)) # resistance of thermistor + y = sqrt((self.c2 / (3*self.c3)**3 + x**2) + r = exp((y-x)**(1.0/3) - (y+x)**(1.0/3)) return (r / (self.rp + r)) * ARES def main(argv): From df17a6a1b44176fe571d21e79bb7b682f1b71c8b Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 6 Jan 2015 10:29:26 +0100 Subject: [PATCH 40/50] fix #1305 by proposed workaround (thanks gaby64) --- Marlin/scripts/createTemperatureLookupMarlin.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Marlin/scripts/createTemperatureLookupMarlin.py b/Marlin/scripts/createTemperatureLookupMarlin.py index 0e05981a19..4f54c2833d 100755 --- a/Marlin/scripts/createTemperatureLookupMarlin.py +++ b/Marlin/scripts/createTemperatureLookupMarlin.py @@ -43,6 +43,14 @@ class Thermistor: x = (y2 - y1) / (l2 - l1) y = (y3 - y1) / (l3 - l1) c = (y - x) / ((l3 - l2) * (l1 + l2 + l3)) + b = x - c * (l1**2 + l2**2 + l1*l2) + a = y1 - (b + l1**2 *c)*l1 + + if c < 0: + print "//////////////////////////////////////////////////////////////////////////////////////" + print "// WARNING: negative coefficient 'c'! Something may be wrong with the measurements! //" + print "//////////////////////////////////////////////////////////////////////////////////////" + c = -c self.c1 = a # Steinhart-Hart coefficients self.c2 = b self.c3 = c From f25e793cff5ddbdddd733df94a2351ccc804052c Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 6 Jan 2015 10:30:20 +0100 Subject: [PATCH 41/50] rename stepper lookup table scipt to be consistent with termistor lookup table script --- .../{create_speed_lookuptable.py => createSpeedLookupTable.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Marlin/scripts/{create_speed_lookuptable.py => createSpeedLookupTable.py} (100%) diff --git a/Marlin/scripts/create_speed_lookuptable.py b/Marlin/scripts/createSpeedLookupTable.py similarity index 100% rename from Marlin/scripts/create_speed_lookuptable.py rename to Marlin/scripts/createSpeedLookupTable.py From 672f764b4d2599a32ddbc565df0c68ebea040aae Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 6 Jan 2015 11:35:53 +0100 Subject: [PATCH 42/50] replaced ASCII GPL v3 license by markdown version moved new COPYING file to top-level directory to make it more visible and remove clutter from Marlin subduer --- COPYING.md | 596 +++++++++++++++++++++++++++++++++++++++++++++++++ Marlin/COPYING | 188 ---------------- 2 files changed, 596 insertions(+), 188 deletions(-) create mode 100644 COPYING.md delete mode 100644 Marlin/COPYING diff --git a/COPYING.md b/COPYING.md new file mode 100644 index 0000000000..16d89e0a34 --- /dev/null +++ b/COPYING.md @@ -0,0 +1,596 @@ +GNU GENERAL PUBLIC LICENSE +========================== + +Version 3, 29 June 2007 + +Copyright © 2007 Free Software Foundation, Inc. <> + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +## Preamble + +The GNU General Public License is a free, copyleft license for software and other +kinds of works. + +The licenses for most software and other practical works are designed to take away +your freedom to share and change the works. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change all versions of a +program--to make sure it remains free software for all its users. We, the Free +Software Foundation, use the GNU General Public License for most of our software; it +applies also to any other work released this way by its authors. You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General +Public Licenses are designed to make sure that you have the freedom to distribute +copies of free software (and charge for them if you wish), that you receive source +code or can get it if you want it, that you can change the software or use pieces of +it in new free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you these rights or +asking you to surrender the rights. Therefore, you have certain responsibilities if +you distribute copies of the software, or if you modify it: responsibilities to +respect the freedom of others. + +For example, if you distribute copies of such a program, whether gratis or for a fee, +you must pass on to the recipients the same freedoms that you received. You must make +sure that they, too, receive or can get the source code. And you must show them these +terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: (1) assert +copyright on the software, and (2) offer you this License giving you legal permission +to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains that there is +no warranty for this free software. For both users' and authors' sake, the GPL +requires that modified versions be marked as changed, so that their problems will not +be attributed erroneously to authors of previous versions. + +Some devices are designed to deny users access to install or run modified versions of +the software inside them, although the manufacturer can do so. This is fundamentally +incompatible with the aim of protecting users' freedom to change the software. The +systematic pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we have designed +this version of the GPL to prohibit the practice for those products. If such problems +arise substantially in other domains, we stand ready to extend this provision to +those domains in future versions of the GPL, as needed to protect the freedom of +users. + +Finally, every program is threatened constantly by software patents. States should +not allow patents to restrict development and use of software on general-purpose +computers, but in those that do, we wish to avoid the special danger that patents +applied to a free program could make it effectively proprietary. To prevent this, the +GPL assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and modification follow. + +## TERMS AND CONDITIONS + +### 0. Definitions. + +“This License” refers to version 3 of the GNU General Public License. + +“Copyright” also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + +“The Program” refers to any copyrightable work licensed under this +License. Each licensee is addressed as “you”. “Licensees” and +“recipients” may be individuals or organizations. + +To “modify” a work means to copy from or adapt all or part of the work in +a fashion requiring copyright permission, other than the making of an exact copy. The +resulting work is called a “modified version” of the earlier work or a +work “based on” the earlier work. + +A “covered work” means either the unmodified Program or a work based on +the Program. + +To “propagate” a work means to do anything with it that, without +permission, would make you directly or secondarily liable for infringement under +applicable copyright law, except executing it on a computer or modifying a private +copy. Propagation includes copying, distribution (with or without modification), +making available to the public, and in some countries other activities as well. + +To “convey” a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through a computer +network, with no transfer of a copy, is not conveying. + +An interactive user interface displays “Appropriate Legal Notices” to the +extent that it includes a convenient and prominently visible feature that (1) +displays an appropriate copyright notice, and (2) tells the user that there is no +warranty for the work (except to the extent that warranties are provided), that +licensees may convey the work under this License, and how to view a copy of this +License. If the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + +### 1. Source Code. + +The “source code” for a work means the preferred form of the work for +making modifications to it. “Object code” means any non-source form of a +work. + +A “Standard Interface” means an interface that either is an official +standard defined by a recognized standards body, or, in the case of interfaces +specified for a particular programming language, one that is widely used among +developers working in that language. + +The “System Libraries” of an executable work include anything, other than +the work as a whole, that (a) is included in the normal form of packaging a Major +Component, but which is not part of that Major Component, and (b) serves only to +enable use of the work with that Major Component, or to implement a Standard +Interface for which an implementation is available to the public in source code form. +A “Major Component”, in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system (if any) on which +the executable work runs, or a compiler used to produce the work, or an object code +interpreter used to run it. + +The “Corresponding Source” for a work in object code form means all the +source code needed to generate, install, and (for an executable work) run the object +code and to modify the work, including scripts to control those activities. However, +it does not include the work's System Libraries, or general-purpose tools or +generally available free programs which are used unmodified in performing those +activities but which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for the work, and +the source code for shared libraries and dynamically linked subprograms that the work +is specifically designed to require, such as by intimate data communication or +control flow between those subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate +automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + +### 2. Basic Permissions. + +All rights granted under this License are granted for the term of copyright on the +Program, and are irrevocable provided the stated conditions are met. This License +explicitly affirms your unlimited permission to run the unmodified Program. The +output from running a covered work is covered by this License only if the output, +given its content, constitutes a covered work. This License acknowledges your rights +of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without +conditions so long as your license otherwise remains in force. You may convey covered +works to others for the sole purpose of having them make modifications exclusively +for you, or provide you with facilities for running those works, provided that you +comply with the terms of this License in conveying all material for which you do not +control copyright. Those thus making or running the covered works for you must do so +exclusively on your behalf, under your direction and control, on terms that prohibit +them from making any copies of your copyrighted material outside their relationship +with you. + +Conveying under any other circumstances is permitted solely under the conditions +stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + +### 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + +No covered work shall be deemed part of an effective technological measure under any +applicable law fulfilling obligations under article 11 of the WIPO copyright treaty +adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention +of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of +technological measures to the extent such circumvention is effected by exercising +rights under this License with respect to the covered work, and you disclaim any +intention to limit operation or modification of the work as a means of enforcing, +against the work's users, your or third parties' legal rights to forbid circumvention +of technological measures. + +### 4. Conveying Verbatim Copies. + +You may convey verbatim copies of the Program's source code as you receive it, in any +medium, provided that you conspicuously and appropriately publish on each copy an +appropriate copyright notice; keep intact all notices stating that this License and +any non-permissive terms added in accord with section 7 apply to the code; keep +intact all notices of the absence of any warranty; and give all recipients a copy of +this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer +support or warranty protection for a fee. + +### 5. Conveying Modified Source Versions. + +You may convey a work based on the Program, or the modifications to produce it from +the Program, in the form of source code under the terms of section 4, provided that +you also meet all of these conditions: + +* **a)** The work must carry prominent notices stating that you modified it, and giving a +relevant date. +* **b)** The work must carry prominent notices stating that it is released under this +License and any conditions added under section 7. This requirement modifies the +requirement in section 4 to “keep intact all notices”. +* **c)** You must license the entire work, as a whole, under this License to anyone who +comes into possession of a copy. This License will therefore apply, along with any +applicable section 7 additional terms, to the whole of the work, and all its parts, +regardless of how they are packaged. This License gives no permission to license the +work in any other way, but it does not invalidate such permission if you have +separately received it. +* **d)** If the work has interactive user interfaces, each must display Appropriate Legal +Notices; however, if the Program has interactive interfaces that do not display +Appropriate Legal Notices, your work need not make them do so. + +A compilation of a covered work with other separate and independent works, which are +not by their nature extensions of the covered work, and which are not combined with +it such as to form a larger program, in or on a volume of a storage or distribution +medium, is called an “aggregate” if the compilation and its resulting +copyright are not used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work in an aggregate +does not cause this License to apply to the other parts of the aggregate. + +### 6. Conveying Non-Source Forms. + +You may convey a covered work in object code form under the terms of sections 4 and +5, provided that you also convey the machine-readable Corresponding Source under the +terms of this License, in one of these ways: + +* **a)** Convey the object code in, or embodied in, a physical product (including a +physical distribution medium), accompanied by the Corresponding Source fixed on a +durable physical medium customarily used for software interchange. +* **b)** Convey the object code in, or embodied in, a physical product (including a +physical distribution medium), accompanied by a written offer, valid for at least +three years and valid for as long as you offer spare parts or customer support for +that product model, to give anyone who possesses the object code either (1) a copy of +the Corresponding Source for all the software in the product that is covered by this +License, on a durable physical medium customarily used for software interchange, for +a price no more than your reasonable cost of physically performing this conveying of +source, or (2) access to copy the Corresponding Source from a network server at no +charge. +* **c)** Convey individual copies of the object code with a copy of the written offer to +provide the Corresponding Source. This alternative is allowed only occasionally and +noncommercially, and only if you received the object code with such an offer, in +accord with subsection 6b. +* **d)** Convey the object code by offering access from a designated place (gratis or for +a charge), and offer equivalent access to the Corresponding Source in the same way +through the same place at no further charge. You need not require recipients to copy +the Corresponding Source along with the object code. If the place to copy the object +code is a network server, the Corresponding Source may be on a different server +(operated by you or a third party) that supports equivalent copying facilities, +provided you maintain clear directions next to the object code saying where to find +the Corresponding Source. Regardless of what server hosts the Corresponding Source, +you remain obligated to ensure that it is available for as long as needed to satisfy +these requirements. +* **e)** Convey the object code using peer-to-peer transmission, provided you inform +other peers where the object code and Corresponding Source of the work are being +offered to the general public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded from the +Corresponding Source as a System Library, need not be included in conveying the +object code work. + +A “User Product” is either (1) a “consumer product”, which +means any tangible personal property which is normally used for personal, family, or +household purposes, or (2) anything designed or sold for incorporation into a +dwelling. In determining whether a product is a consumer product, doubtful cases +shall be resolved in favor of coverage. For a particular product received by a +particular user, “normally used” refers to a typical or common use of +that class of product, regardless of the status of the particular user or of the way +in which the particular user actually uses, or expects or is expected to use, the +product. A product is a consumer product regardless of whether the product has +substantial commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + +“Installation Information” for a User Product means any methods, +procedures, authorization keys, or other information required to install and execute +modified versions of a covered work in that User Product from a modified version of +its Corresponding Source. The information must suffice to ensure that the continued +functioning of the modified object code is in no case prevented or interfered with +solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for +use in, a User Product, and the conveying occurs as part of a transaction in which +the right of possession and use of the User Product is transferred to the recipient +in perpetuity or for a fixed term (regardless of how the transaction is +characterized), the Corresponding Source conveyed under this section must be +accompanied by the Installation Information. But this requirement does not apply if +neither you nor any third party retains the ability to install modified object code +on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to +continue to provide support service, warranty, or updates for a work that has been +modified or installed by the recipient, or for the User Product in which it has been +modified or installed. Access to a network may be denied when the modification itself +materially and adversely affects the operation of the network or violates the rules +and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with +this section must be in a format that is publicly documented (and with an +implementation available to the public in source code form), and must require no +special password or key for unpacking, reading or copying. + +### 7. Additional Terms. + +“Additional permissions” are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. Additional +permissions that are applicable to the entire Program shall be treated as though they +were included in this License, to the extent that they are valid under applicable +law. If additional permissions apply only to part of the Program, that part may be +used separately under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any +additional permissions from that copy, or from any part of it. (Additional +permissions may be written to require their own removal in certain cases when you +modify the work.) You may place additional permissions on material, added by you to a +covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a +covered work, you may (if authorized by the copyright holders of that material) +supplement the terms of this License with terms: + +* **a)** Disclaiming warranty or limiting liability differently from the terms of +sections 15 and 16 of this License; or +* **b)** Requiring preservation of specified reasonable legal notices or author +attributions in that material or in the Appropriate Legal Notices displayed by works +containing it; or +* **c)** Prohibiting misrepresentation of the origin of that material, or requiring that +modified versions of such material be marked in reasonable ways as different from the +original version; or +* **d)** Limiting the use for publicity purposes of names of licensors or authors of the +material; or +* **e)** Declining to grant rights under trademark law for use of some trade names, +trademarks, or service marks; or +* **f)** Requiring indemnification of licensors and authors of that material by anyone +who conveys the material (or modified versions of it) with contractual assumptions of +liability to the recipient, for any liability that these contractual assumptions +directly impose on those licensors and authors. + +All other non-permissive additional terms are considered “further +restrictions” within the meaning of section 10. If the Program as you received +it, or any part of it, contains a notice stating that it is governed by this License +along with a term that is a further restriction, you may remove that term. If a +license document contains a further restriction but permits relicensing or conveying +under this License, you may add to a covered work material governed by the terms of +that license document, provided that the further restriction does not survive such +relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in +the relevant source files, a statement of the additional terms that apply to those +files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a +separately written license, or stated as exceptions; the above requirements apply +either way. + +### 8. Termination. + +You may not propagate or modify a covered work except as expressly provided under +this License. Any attempt otherwise to propagate or modify it is void, and will +automatically terminate your rights under this License (including any patent licenses +granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a +particular copyright holder is reinstated (a) provisionally, unless and until the +copyright holder explicitly and finally terminates your license, and (b) permanently, +if the copyright holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently +if the copyright holder notifies you of the violation by some reasonable means, this +is the first time you have received notice of violation of this License (for any +work) from that copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of +parties who have received copies or rights from you under this License. If your +rights have been terminated and not permanently reinstated, you do not qualify to +receive new licenses for the same material under section 10. + +### 9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or run a copy of the +Program. Ancillary propagation of a covered work occurring solely as a consequence of +using peer-to-peer transmission to receive a copy likewise does not require +acceptance. However, nothing other than this License grants you permission to +propagate or modify any covered work. These actions infringe copyright if you do not +accept this License. Therefore, by modifying or propagating a covered work, you +indicate your acceptance of this License to do so. + +### 10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically receives a license +from the original licensors, to run, modify and propagate that work, subject to this +License. You are not responsible for enforcing compliance by third parties with this +License. + +An “entity transaction” is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an organization, or +merging organizations. If propagation of a covered work results from an entity +transaction, each party to that transaction who receives a copy of the work also +receives whatever licenses to the work the party's predecessor in interest had or +could give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if the predecessor +has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or +affirmed under this License. For example, you may not impose a license fee, royalty, +or other charge for exercise of rights granted under this License, and you may not +initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging +that any patent claim is infringed by making, using, selling, offering for sale, or +importing the Program or any portion of it. + +### 11. Patents. + +A “contributor” is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The work thus +licensed is called the contributor's “contributor version”. + +A contributor's “essential patent claims” are all patent claims owned or +controlled by the contributor, whether already acquired or hereafter acquired, that +would be infringed by some manner, permitted by this License, of making, using, or +selling its contributor version, but do not include claims that would be infringed +only as a consequence of further modification of the contributor version. For +purposes of this definition, “control” includes the right to grant patent +sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license +under the contributor's essential patent claims, to make, use, sell, offer for sale, +import and otherwise run, modify and propagate the contents of its contributor +version. + +In the following three paragraphs, a “patent license” is any express +agreement or commitment, however denominated, not to enforce a patent (such as an +express permission to practice a patent or covenant not to sue for patent +infringement). To “grant” such a patent license to a party means to make +such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the +Corresponding Source of the work is not available for anyone to copy, free of charge +and under the terms of this License, through a publicly available network server or +other readily accessible means, then you must either (1) cause the Corresponding +Source to be so available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner consistent with +the requirements of this License, to extend the patent license to downstream +recipients. “Knowingly relying” means you have actual knowledge that, but +for the patent license, your conveying the covered work in a country, or your +recipient's use of the covered work in a country, would infringe one or more +identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you +convey, or propagate by procuring conveyance of, a covered work, and grant a patent +license to some of the parties receiving the covered work authorizing them to use, +propagate, modify or convey a specific copy of the covered work, then the patent +license you grant is automatically extended to all recipients of the covered work and +works based on it. + +A patent license is “discriminatory” if it does not include within the +scope of its coverage, prohibits the exercise of, or is conditioned on the +non-exercise of one or more of the rights that are specifically granted under this +License. You may not convey a covered work if you are a party to an arrangement with +a third party that is in the business of distributing software, under which you make +payment to the third party based on the extent of your activity of conveying the +work, and under which the third party grants, to any of the parties who would receive +the covered work from you, a discriminatory patent license (a) in connection with +copies of the covered work conveyed by you (or copies made from those copies), or (b) +primarily for and in connection with specific products or compilations that contain +the covered work, unless you entered into that arrangement, or that patent license +was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied +license or other defenses to infringement that may otherwise be available to you +under applicable patent law. + +### 12. No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or otherwise) +that contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot convey a covered work so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not convey it at all. For example, if you +agree to terms that obligate you to collect a royalty for further conveying from +those to whom you convey the Program, the only way you could satisfy both those terms +and this License would be to refrain entirely from conveying the Program. + +### 13. Use with the GNU Affero General Public License. + +Notwithstanding any other provision of this License, you have permission to link or +combine any covered work with a work licensed under version 3 of the GNU Affero +General Public License into a single combined work, and to convey the resulting work. +The terms of this License will continue to apply to the part which is the covered +work, but the special requirements of the GNU Affero General Public License, section +13, concerning interaction through a network will apply to the combination as such. + +### 14. Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions of the GNU +General Public License from time to time. Such new versions will be similar in spirit +to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that +a certain numbered version of the GNU General Public License “or any later +version” applies to it, you have the option of following the terms and +conditions either of that numbered version or of any later version published by the +Free Software Foundation. If the Program does not specify a version number of the GNU +General Public License, you may choose any version ever published by the Free +Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU +General Public License can be used, that proxy's public statement of acceptance of a +version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no +additional obligations are imposed on any author or copyright holder as a result of +your choosing to follow a later version. + +### 15. Disclaimer of Warranty. + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE +QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE +DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +### 16. Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY +COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS +PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, +INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE +OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE +WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +### 17. Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided above cannot be +given local legal effect according to their terms, reviewing courts shall apply local +law that most closely approximates an absolute waiver of all civil liability in +connection with the Program, unless a warranty or assumption of liability accompanies +a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS + +## How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to +the public, the best way to achieve this is to make it free software which everyone +can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them +to the start of each source file to most effectively state the exclusion of warranty; +and each file should have at least the “copyright” line and a pointer to +where the full notice is found. + + + Copyright (C) + + 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 . + +Also add information on how to contact you by electronic and paper mail. + +If the program does terminal interaction, make it output a short notice like this +when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate parts of +the General Public License. Of course, your program's commands might be different; +for a GUI interface, you would use an “about box”. + +You should also get your employer (if you work as a programmer) or school, if any, to +sign a “copyright disclaimer” for the program, if necessary. For more +information on this, and how to apply and follow the GNU GPL, see +<>. + +The GNU General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may consider it +more useful to permit linking proprietary applications with the library. If this is +what you want to do, use the GNU Lesser General Public License instead of this +License. But first, please read +<>. \ No newline at end of file diff --git a/Marlin/COPYING b/Marlin/COPYING deleted file mode 100644 index 2b194fadc4..0000000000 --- a/Marlin/COPYING +++ /dev/null @@ -1,188 +0,0 @@ -GNU GENERAL PUBLIC LICENSE - -Version 3, 29 June 2007 - -Copyright © 2007 Free Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -Preamble - -The GNU General Public License is a free, copyleft license for software and other kinds of works. - -The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. - -When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. - -To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. - -For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. - -Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. - -For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. - -Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. - -Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. - -The precise terms and conditions for copying, distribution and modification follow. -TERMS AND CONDITIONS -0. Definitions. - -“This License” refers to version 3 of the GNU General Public License. - -“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. - -“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. - -To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. - -A “covered work” means either the unmodified Program or a work based on the Program. - -To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. - -To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. - -An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. -1. Source Code. - -The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. - -A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. - -The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. - -The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. - -The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. - -The Corresponding Source for a work in source code form is that same work. -2. Basic Permissions. - -All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. - -You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. - -Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. -3. Protecting Users' Legal Rights From Anti-Circumvention Law. - -No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. - -When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. -4. Conveying Verbatim Copies. - -You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. - -You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. -5. Conveying Modified Source Versions. - -You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified it, and giving a relevant date. - b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. - c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. - d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. - -A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. -6. Conveying Non-Source Forms. - -You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: - - a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. - b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. - c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. - d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. - e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. - -A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. - -A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. - -“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. - -If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). - -The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. - -Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. -7. Additional Terms. - -“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. - -When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. - -Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or - b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or - c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or - d) Limiting the use for publicity purposes of names of licensors or authors of the material; or - e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or - f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. - -All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. - -If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. - -Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. -8. Termination. - -You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). - -However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. -9. Acceptance Not Required for Having Copies. - -You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. -10. Automatic Licensing of Downstream Recipients. - -Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. - -An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. - -You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. -11. Patents. - -A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. - -A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. - -Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. - -In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. - -If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. - -If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. - -A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. - -Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. -12. No Surrender of Others' Freedom. - -If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. -13. Use with the GNU Affero General Public License. - -Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. -14. Revised Versions of this License. - -The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. - -If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. - -Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. -15. Disclaimer of Warranty. - -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. -16. Limitation of Liability. - -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -17. Interpretation of Sections 15 and 16. - -If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. - From 93c8b2a40b81c680f7d3a147f8b27f508d719ff6 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Tue, 6 Jan 2015 11:59:11 +0100 Subject: [PATCH 43/50] added irc channel --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b33005b81f..f94e35e120 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ Current Status: Bug Fixing What bugs are we working on: https://github.com/ErikZalm/Marlin/milestones +IRC channel on freenode: #marlin-firmware + Developer Notes =================== From 358759cb52e11dd1cfeddef0dab24c4bc7003225 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Tue, 6 Jan 2015 12:02:42 +0100 Subject: [PATCH 44/50] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f94e35e120..7f6d26cf4a 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ What bugs are we working on: https://github.com/ErikZalm/Marlin/milestones IRC channel on freenode: #marlin-firmware +(baaaah, #marlin was taken) + Developer Notes =================== From b3f2b30347bc760cb6c2256764a55d6ebe0b2253 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Tue, 6 Jan 2015 15:44:26 +0100 Subject: [PATCH 45/50] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f6d26cf4a..8685ee658d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Current Status: Bug Fixing =================== -What bugs are we working on: https://github.com/ErikZalm/Marlin/milestones +What bugs are we working on: https://github.com/MarlinFirmware/Development/milestones/Bug%20Fixing%20Round%201 IRC channel on freenode: #marlin-firmware From d7a2dd676e7d567788c79eee3ed4c8e721c77a7f Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Tue, 6 Jan 2015 15:45:51 +0100 Subject: [PATCH 46/50] Update README.md --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8685ee658d..c67e9e4b1f 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,11 @@ IRC channel on freenode: #marlin-firmware Developer Notes =================== -- There are now 2 branches: The __development__ branch is where new features and code changes will be sorted out. This branch may have untested code in it, so please let us know if you find any bugs. When the __development__ branch has reached a state where it is stable, it will be moved to the __stable__ branch. - -- We are doing a kind of cleanup in the list of Issues and Pull Requests, the aim is to get to a state where we can certify the code as stable. To get the code tested as widely as possible we require several volunteers with a wide variety of hardware configurations willing to test the firmware and help us to certify it as stable. If you want to help out testing go to this issue and let us know: https://github.com/ErikZalm/Marlin/issues/1209 +- We are doing a kind of cleanup in the list of Issues and Pull Requests, the aim is to get to a state where we can certify the code as stable. To get the code tested as widely as possible we require several volunteers with a wide variety of hardware configurations willing to test the firmware and help us to certify it as stable. If you want to help out testing go to this issue and let us know: https://github.com/MarlinFirmware/Development/issues/1209 - Before you submit any pull request, we ask that you _PLEASE_ test your code before submission, even if the change seems innocuous. When creating the pull request, please include the hardware you used for testing and a short synopsis of your testing procedure. Untested pull requests are less likely to be merged, as even slight changes create the risk of breaking the main branch. -- If you have a fix don't open an issue telling about it, but test the code and submit a pull request. Use the __development__ branch when you submit. +- If you have a fix don't open an issue telling about it, but test the code and submit a pull request. ========================== Marlin 3D Printer Firmware From 028fe129a54488eeb27f32b4576d86d058525702 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Tue, 6 Jan 2015 17:09:19 +0100 Subject: [PATCH 47/50] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c67e9e4b1f..3d652c562f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Current Status: Bug Fixing =================== -What bugs are we working on: https://github.com/MarlinFirmware/Development/milestones/Bug%20Fixing%20Round%201 +What bugs are we working on: https://github.com/MarlinFirmware/Marlin/milestones/Bug%20Fixing%20Round%201 IRC channel on freenode: #marlin-firmware From 80afded132cf13b3951ef6945253f76c2f427c9e Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Tue, 6 Jan 2015 17:10:05 +0100 Subject: [PATCH 48/50] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d652c562f..78f020795a 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ IRC channel on freenode: #marlin-firmware Developer Notes =================== -- We are doing a kind of cleanup in the list of Issues and Pull Requests, the aim is to get to a state where we can certify the code as stable. To get the code tested as widely as possible we require several volunteers with a wide variety of hardware configurations willing to test the firmware and help us to certify it as stable. If you want to help out testing go to this issue and let us know: https://github.com/MarlinFirmware/Development/issues/1209 +- We are doing a kind of cleanup in the list of Issues and Pull Requests, the aim is to get to a state where we can certify the code as stable. To get the code tested as widely as possible we require several volunteers with a wide variety of hardware configurations willing to test the firmware and help us to certify it as stable. If you want to help out testing go to this issue and let us know: https://github.com/MarlinFirmware/Marlin/issues/1209 - Before you submit any pull request, we ask that you _PLEASE_ test your code before submission, even if the change seems innocuous. When creating the pull request, please include the hardware you used for testing and a short synopsis of your testing procedure. Untested pull requests are less likely to be merged, as even slight changes create the risk of breaking the main branch. From 1a57644b0c62f5a8efde40f2b45915b65155d00e Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Tue, 6 Jan 2015 17:12:17 +0100 Subject: [PATCH 49/50] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 78f020795a..f0213b8a0b 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,13 @@ IRC channel on freenode: #marlin-firmware Developer Notes =================== +- There are now 2 branches: The __development__ branch is where new features and code changes will be sorted out. This branch may have untested code in it, so please let us know if you find any bugs. When the __development__ branch has reached a state where it is stable, it will be moved to the __stable__ branch. + - We are doing a kind of cleanup in the list of Issues and Pull Requests, the aim is to get to a state where we can certify the code as stable. To get the code tested as widely as possible we require several volunteers with a wide variety of hardware configurations willing to test the firmware and help us to certify it as stable. If you want to help out testing go to this issue and let us know: https://github.com/MarlinFirmware/Marlin/issues/1209 - Before you submit any pull request, we ask that you _PLEASE_ test your code before submission, even if the change seems innocuous. When creating the pull request, please include the hardware you used for testing and a short synopsis of your testing procedure. Untested pull requests are less likely to be merged, as even slight changes create the risk of breaking the main branch. -- If you have a fix don't open an issue telling about it, but test the code and submit a pull request. +- If you have a fix don't open an issue telling about it, but test the code and submit a pull request. Use the __development__ branch when you submit. ========================== Marlin 3D Printer Firmware From 422a958a34a415af196a40db90096206fe3b8c91 Mon Sep 17 00:00:00 2001 From: Alex Borro Date: Tue, 6 Jan 2015 16:39:48 -0200 Subject: [PATCH 50/50] Fix CoreXY speed calculation For cartesian bots, the X_AXIS is the real X movement and same for Y_AXIS. But for corexy bots, that is not true. The "X_AXIS" and "Y_AXIS" motors (that should be named to A_AXIS and B_AXIS) cannot be used for X and Y length, because A=X+Y and B=X-Y. So we need to create other 2 "AXIS", named X_HEAD and Y_HEAD, meaning the real displacement of the Head. Having the real displacement of the head, we can calculate the total movement length and apply the desired speed. --- Marlin/Marlin.h | 2 +- Marlin/planner.cpp | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 13e5552365..7a1afa3517 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -171,7 +171,7 @@ void manage_inactivity(bool ignore_stepper_queue=false); #endif -enum AxisEnum {X_AXIS=0, Y_AXIS=1, Z_AXIS=2, E_AXIS=3}; +enum AxisEnum {X_AXIS=0, Y_AXIS=1, Z_AXIS=2, E_AXIS=3, X_HEAD=4, Y_HEAD=5}; void FlushSerialRequestResend(); diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index c8942251e4..5d9fba948d 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -715,11 +715,21 @@ block->steps_y = labs((target[X_AXIS]-position[X_AXIS]) - (target[Y_AXIS]-positi if(feed_ratesteps_y = labs((target[X_AXIS]-position[X_AXIS]) - (target[Y_AXIS]-positi } else { - block->millimeters = sqrt(square(delta_mm[X_AXIS]) + square(delta_mm[Y_AXIS]) + square(delta_mm[Z_AXIS])); + #ifndef COREXY + block->millimeters = sqrt(square(delta_mm[X_AXIS]) + square(delta_mm[Y_AXIS]) + square(delta_mm[Z_AXIS])); + #else + block->millimeters = sqrt(square(delta_mm[X_HEAD]) + square(delta_mm[Y_HEAD]) + square(delta_mm[Z_AXIS])); + #endif } float inverse_millimeters = 1.0/block->millimeters; // Inverse millimeters to remove multiple divides