From 93400ea4e072b57d267ea9fff7e12b5b02478c0f Mon Sep 17 00:00:00 2001 From: Aaron Yourk Date: Sun, 25 Dec 2016 02:49:34 -0700 Subject: [PATCH 01/12] Fix ENCODER steps in Configuration.h Add temp tables for the E3D PT100 with Amplifier in thermistortables.h Make it easier to switch to the PT100 temperature sensor with appropriate PID values for the Extruder. --- Firmware/Configuration.h | 4 +- Firmware/thermistortables.h | 87 +++++++++++++++++++ .../variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h | 31 +++++++ 3 files changed, 120 insertions(+), 2 deletions(-) diff --git a/Firmware/Configuration.h b/Firmware/Configuration.h index ca7bdb58..306ba2e0 100644 --- a/Firmware/Configuration.h +++ b/Firmware/Configuration.h @@ -455,8 +455,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of #define SDSUPPORT // Enable SD Card Support in Hardware Console //#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error) #define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication -#define ENCODER_PULSES_PER_STEP 2 // Increase if you have a high resolution encoder -#define ENCODER_STEPS_PER_MENU_ITEM 2 // Set according to ENCODER_PULSES_PER_STEP or your liking +#define ENCODER_PULSES_PER_STEP 4 // Increase if you have a high resolution encoder +#define ENCODER_STEPS_PER_MENU_ITEM 1 // Set according to ENCODER_PULSES_PER_STEP or your liking //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store. //#define ULTIPANEL //the UltiPanel as on Thingiverse //#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click diff --git a/Firmware/thermistortables.h b/Firmware/thermistortables.h index ac1dea73..2b0f6ee6 100644 --- a/Firmware/thermistortables.h +++ b/Firmware/thermistortables.h @@ -1059,6 +1059,93 @@ const short temptable_147[][2] PROGMEM = { PtLine(200,100,4700) PtLine(250,100,4700) PtLine(300,100,4700) + PtLine(350,100,4700) + PtLine(400,100,4700) + PtLine(450,100,4700) + PtLine(500,100,4700) + PtLine(550,100,4700) + PtLine(600,100,4700) + PtLine(650,100,4700) + PtLine(700,100,4700) + PtLine(750,100,4700) + PtLine(800,100,4700) + PtLine(850,100,4700) + PtLine(900,100,4700) + PtLine(950,100,4700) + PtLine(1000,100,4700) + PtLine(1050,100,4700) + PtLine(1100,100,4700) +}; +#endif +#if (THERMISTORHEATER_0 == 148) || (THERMISTORHEATER_1 == 148) || (THERMISTORHEATER_2 == 148) || (THERMISTORBED == 148) // Pt100 with 4k7 MiniRambo pullup, no Amp. +const short temptable_148[][2] PROGMEM = { +// More raw data values avaliable via http://www.micropik.com/PDF/pt100.pdf +// This information is taken from http://shop.prusa3d.com/forum/improvements-f14/mini-rambo-1-3-and-e3d-with-pt100-t700-s40.html#p20938 +{0,0}, // first two entries are bogus, just to get the heater running +{286,50}, +{469,100}, +{531,150}, +{590,200}, +{649,250}, +{708,300}, +{763,350}, +{819,400}, +{872,450}, +}; +#endif +#if (THERMISTORHEATER_0 == 247) || (THERMISTORHEATER_1 == 247) || (THERMISTORHEATER_2 == 247) || (THERMISTORBED == 247) // Pt100 with 4k7 MiniRambo pullup & PT100 Amplifier +const short temptable_247[][2] PROGMEM = { +// Calculated from Bob-the-Kuhn's PT100 calculator listed in https://github.com/MarlinFirmware/Marlin/issues/5543 +// and the table provided by E3D at http://wiki.e3d-online.com/wiki/E3D_PT100_Amplifier_Documentation#Output_Characteristics. +{ 0 * OVERSAMPLENR, 0 }, +{ 244 * OVERSAMPLENR, 1 }, +{ 252 * OVERSAMPLENR, 10 }, +{ 262 * OVERSAMPLENR, 20 }, +{ 270 * OVERSAMPLENR, 30 }, +{ 278 * OVERSAMPLENR, 40 }, +{ 286 * OVERSAMPLENR, 50 }, +{ 294 * OVERSAMPLENR, 60 }, +{ 302 * OVERSAMPLENR, 70 }, +{ 310 * OVERSAMPLENR, 80 }, +{ 318 * OVERSAMPLENR, 90 }, +{ 326 * OVERSAMPLENR, 100 }, +{ 334 * OVERSAMPLENR, 110 }, +{ 344 * OVERSAMPLENR, 120 }, +{ 352 * OVERSAMPLENR, 130 }, +{ 358 * OVERSAMPLENR, 140 }, +{ 366 * OVERSAMPLENR, 150 }, +{ 374 * OVERSAMPLENR, 160 }, +{ 382 * OVERSAMPLENR, 170 }, +{ 390 * OVERSAMPLENR, 180 }, +{ 398 * OVERSAMPLENR, 190 }, +{ 406 * OVERSAMPLENR, 200 }, +{ 414 * OVERSAMPLENR, 210 }, +{ 422 * OVERSAMPLENR, 220 }, +{ 430 * OVERSAMPLENR, 230 }, +{ 436 * OVERSAMPLENR, 240 }, +{ 444 * OVERSAMPLENR, 250 }, +{ 452 * OVERSAMPLENR, 260 }, +{ 458 * OVERSAMPLENR, 270 }, +{ 466 * OVERSAMPLENR, 280 }, +{ 474 * OVERSAMPLENR, 290 }, +{ 480 * OVERSAMPLENR, 300 }, +{ 488 * OVERSAMPLENR, 310 }, +{ 496 * OVERSAMPLENR, 320 }, +{ 504 * OVERSAMPLENR, 330 }, +{ 510 * OVERSAMPLENR, 340 }, +{ 518 * OVERSAMPLENR, 350 }, +{ 524 * OVERSAMPLENR, 360 }, +{ 532 * OVERSAMPLENR, 370 }, +{ 538 * OVERSAMPLENR, 380 }, +{ 546 * OVERSAMPLENR, 390 }, +{ 554 * OVERSAMPLENR, 400 }, +{ 622 * OVERSAMPLENR, 500 }, +{ 688 * OVERSAMPLENR, 600 }, +{ 749 * OVERSAMPLENR, 700 }, +{ 809 * OVERSAMPLENR, 800 }, +{ 865 * OVERSAMPLENR, 900 }, +{ 919 * OVERSAMPLENR, 1000 }, +{ 969 * OVERSAMPLENR, 1100 }, }; #endif #if (THERMISTORHEATER_0 == 1010) || (THERMISTORHEATER_1 == 1010) || (THERMISTORHEATER_2 == 1010) || (THERMISTORBED == 1010) // Pt1000 with 1k0 pullup diff --git a/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h b/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h index c7e3ecb8..43973fb1 100644 --- a/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h @@ -18,6 +18,12 @@ GENERAL SETTINGS // Electronics #define MOTHERBOARD BOARD_RAMBO_MINI_1_3 +// Uncomment the below for the E3D PT100 temperature sensor (with or without PT100 Amplifier) +//#define E3D_PT100_EXTRUDER_WITH_AMP +//#define E3D_PT100_EXTRUDER_NO_AMP +//#define E3D_PT100_BED_WITH_AMP +//#define E3D_PT100_BED_NO_AMP + /*------------------------------------ AXIS SETTINGS @@ -73,15 +79,26 @@ EXTRUDER SETTINGS #define BED_MINTEMP 15 // Maxtemps +#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP) +#define HEATER_0_MAXTEMP 410 +#else #define HEATER_0_MAXTEMP 305 +#endif #define HEATER_1_MAXTEMP 305 #define HEATER_2_MAXTEMP 305 #define BED_MAXTEMP 150 +#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP) +// Define PID constants for extruder with PT100 +#define DEFAULT_Kp 21.70 +#define DEFAULT_Ki 1.60 +#define DEFAULT_Kd 73.76 +#else // Define PID constants for extruder #define DEFAULT_Kp 40.925 #define DEFAULT_Ki 4.875 #define DEFAULT_Kd 86.085 +#endif // Extrude mintemp #define EXTRUDE_MINTEMP 130 @@ -305,12 +322,26 @@ THERMISTORS SETTINGS // 1047 is Pt1000 with 4k7 pullup // 1010 is Pt1000 with 1k pullup (non standard) // 147 is Pt100 with 4k7 pullup +// 148 is Pt100 with 4k7 pullup and no PT100 Amplifier (in case type 147 doesn't work) +// 247 is Pt100 with 4k7 pullup and PT100 Amplifier // 110 is Pt100 with 1k pullup (non standard) +#if defined(E3D_PT100_EXTRUDER_WITH_AMP) +#define TEMP_SENSOR_0 247 +#elif defined(E3D_PT100_EXTRUDER_NO_AMP) +#define TEMP_SENSOR_0 147 +#else #define TEMP_SENSOR_0 5 +#endif #define TEMP_SENSOR_1 0 #define TEMP_SENSOR_2 0 +#if defined(E3D_PT100_BED_WITH_AMP) +#define TEMP_SENSOR_BED 247 +#elif defined(E3D_PT100_BED_NO_AMP) +#define TEMP_SENSOR_BED 147 +#else #define TEMP_SENSOR_BED 1 +#endif #endif //__CONFIGURATION_PRUSA_H From ad5567480183d6e0525d971deea633a9a8ece38d Mon Sep 17 00:00:00 2001 From: Aaron Yourk Date: Sun, 25 Dec 2016 03:03:33 -0700 Subject: [PATCH 02/12] Added PT100 bed PID values (copied from extruder PID and untested) --- Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h b/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h index 43973fb1..60b74d41 100644 --- a/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h @@ -243,9 +243,16 @@ BED SETTINGS #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) +#if defined(E3D_PT100_BED_WITH_AMP) || defined(E3D_PT100_BED_NO_AMP) +// Define PID constants for extruder with PT100 +#define DEFAULT_bedKp 21.70 +#define DEFAULT_bedKi 1.60 +#define DEFAULT_bedKd 73.76 +#else #define DEFAULT_bedKp 126.13 #define DEFAULT_bedKi 4.30 #define DEFAULT_bedKd 924.76 +#endif //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from pidautotune From 0af1945d5e9194bb141143c99e9a7499180bf06a Mon Sep 17 00:00:00 2001 From: ayourk Date: Sun, 25 Dec 2016 04:20:39 -0700 Subject: [PATCH 03/12] Update thermistortables.h Update thermistortables.h to be more in line with the forum post. --- Firmware/thermistortables.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/thermistortables.h b/Firmware/thermistortables.h index 2b0f6ee6..28d0b867 100644 --- a/Firmware/thermistortables.h +++ b/Firmware/thermistortables.h @@ -1081,8 +1081,8 @@ const short temptable_147[][2] PROGMEM = { const short temptable_148[][2] PROGMEM = { // More raw data values avaliable via http://www.micropik.com/PDF/pt100.pdf // This information is taken from http://shop.prusa3d.com/forum/improvements-f14/mini-rambo-1-3-and-e3d-with-pt100-t700-s40.html#p20938 -{0,0}, // first two entries are bogus, just to get the heater running -{286,50}, +{292,0}, // first two entries are bogus, just to get the heater running +{356,50}, {469,100}, {531,150}, {590,200}, From d5ce8dfa9617307019cc16d3c2f86a6fe3090898 Mon Sep 17 00:00:00 2001 From: Aaron Yourk Date: Tue, 27 Dec 2016 15:19:18 -0700 Subject: [PATCH 04/12] Renamed fpos_t to filepos_t as per Github issue #9 to be more compatible with versions of Arduino newer than v1.6.8. --- Firmware/SdBaseFile.cpp | 6 +++--- Firmware/SdBaseFile.h | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Firmware/SdBaseFile.cpp b/Firmware/SdBaseFile.cpp index dbcf77fb..be04ab1a 100644 --- a/Firmware/SdBaseFile.cpp +++ b/Firmware/SdBaseFile.cpp @@ -294,7 +294,7 @@ bool SdBaseFile::getFilename(char* name) { return true; } //------------------------------------------------------------------------------ -void SdBaseFile::getpos(fpos_t* pos) { +void SdBaseFile::getpos(filepos_t* pos) { pos->position = curPosition_; pos->cluster = curCluster_; } @@ -925,7 +925,7 @@ bool SdBaseFile::openRoot(SdVolume* vol) { * \return The byte if no error and not at eof else -1; */ int SdBaseFile::peek() { - fpos_t pos; + filepos_t pos; getpos(&pos); int c = read(); if (c >= 0) setpos(&pos); @@ -1492,7 +1492,7 @@ bool SdBaseFile::seekSet(uint32_t pos) { return false; } //------------------------------------------------------------------------------ -void SdBaseFile::setpos(fpos_t* pos) { +void SdBaseFile::setpos(filepos_t* pos) { curPosition_ = pos->position; curCluster_ = pos->cluster; } diff --git a/Firmware/SdBaseFile.h b/Firmware/SdBaseFile.h index dea299a6..923a391d 100644 --- a/Firmware/SdBaseFile.h +++ b/Firmware/SdBaseFile.h @@ -31,16 +31,16 @@ #include "SdVolume.h" //------------------------------------------------------------------------------ /** - * \struct fpos_t + * \struct filepos_t * \brief internal type for istream * do not use in user apps */ -struct fpos_t { +struct filepos_t { /** stream position */ uint32_t position; /** cluster for position */ uint32_t cluster; - fpos_t() : position(0), cluster(0) {} + filepos_t() : position(0), cluster(0) {} }; // use the gnu style oflag in open() @@ -196,11 +196,11 @@ class SdBaseFile { /** get position for streams * \param[out] pos struct to receive position */ - void getpos(fpos_t* pos); + void getpos(filepos_t* pos); /** set position for streams * \param[out] pos struct with value for new position */ - void setpos(fpos_t* pos); + void setpos(filepos_t* pos); //---------------------------------------------------------------------------- bool close(); bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock); From 6129c9167d342cf09413a04b837c58c76d10a9e5 Mon Sep 17 00:00:00 2001 From: Aaron Yourk Date: Tue, 27 Dec 2016 16:43:43 -0700 Subject: [PATCH 05/12] Make an attempt at resuming previous fan speed when resuming from a paused SD card print via the menu. --- Firmware/ultralcd.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 6827a60c..63d0ac71 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -97,6 +97,7 @@ int8_t SilentModeMenu = 0; int lcd_commands_type=LCD_COMMAND_IDLE; int lcd_commands_step=0; bool isPrintPaused = false; +int oldFanSpeed = 0; bool farm_mode = false; int farm_no = 0; int farm_timer = 30; @@ -662,12 +663,19 @@ static void lcd_return_to_status() { } static void lcd_sdcard_pause() { + oldFanSpeed = fanSpeed; card.pauseSDPrint(); isPrintPaused = true; lcdDrawUpdate = 3; } static void lcd_sdcard_resume() { + if (oldFanSpeed) { + fanSpeed = oldFanSpeed; + SET_OUTPUT(FAN_PIN); + WRITE(FAN_PIN, fanSpeed); + oldFanSpeed = 0; + } card.startFileprint(); isPrintPaused = false; lcdDrawUpdate = 3; From 2db00510c2964e6feb80a7fc8c5c732b9eef4bd8 Mon Sep 17 00:00:00 2001 From: Aaron Yourk Date: Sat, 31 Dec 2016 07:20:15 -0700 Subject: [PATCH 06/12] Add modifications from the Mini Rambo 1.3a header to the Mini Rambo 1.0a header. --- .../variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h index 2c49e68a..a4b0f784 100644 --- a/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h @@ -18,6 +18,12 @@ GENERAL SETTINGS // Electronics #define MOTHERBOARD BOARD_RAMBO_MINI_1_0 +// Uncomment the below for the E3D PT100 temperature sensor (with or without PT100 Amplifier) +//#define E3D_PT100_EXTRUDER_WITH_AMP +//#define E3D_PT100_EXTRUDER_NO_AMP +//#define E3D_PT100_BED_WITH_AMP +//#define E3D_PT100_BED_NO_AMP + /*------------------------------------ AXIS SETTINGS @@ -73,15 +79,26 @@ EXTRUDER SETTINGS #define BED_MINTEMP 15 // Maxtemps +#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP) +#define HEATER_0_MAXTEMP 410 +#else #define HEATER_0_MAXTEMP 305 +#endif #define HEATER_1_MAXTEMP 305 #define HEATER_2_MAXTEMP 305 #define BED_MAXTEMP 150 +#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP) +// Define PID constants for extruder with PT100 +#define DEFAULT_Kp 21.70 +#define DEFAULT_Ki 1.60 +#define DEFAULT_Kd 73.76 +#else // Define PID constants for extruder #define DEFAULT_Kp 40.925 #define DEFAULT_Ki 4.875 #define DEFAULT_Kd 86.085 +#endif // Extrude mintemp #define EXTRUDE_MINTEMP 130 @@ -226,9 +243,16 @@ BED SETTINGS #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) +#if defined(E3D_PT100_BED_WITH_AMP) || defined(E3D_PT100_BED_NO_AMP) +// Define PID constants for extruder with PT100 +#define DEFAULT_bedKp 21.70 +#define DEFAULT_bedKi 1.60 +#define DEFAULT_bedKd 73.76 +#else #define DEFAULT_bedKp 126.13 #define DEFAULT_bedKi 4.30 #define DEFAULT_bedKd 924.76 +#endif //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from pidautotune @@ -305,12 +329,26 @@ THERMISTORS SETTINGS // 1047 is Pt1000 with 4k7 pullup // 1010 is Pt1000 with 1k pullup (non standard) // 147 is Pt100 with 4k7 pullup +// 148 is Pt100 with 4k7 pullup and no PT100 Amplifier (in case type 147 doesn't work) +// 247 is Pt100 with 4k7 pullup and PT100 Amplifier // 110 is Pt100 with 1k pullup (non standard) +#if defined(E3D_PT100_EXTRUDER_WITH_AMP) +#define TEMP_SENSOR_0 247 +#elif defined(E3D_PT100_EXTRUDER_NO_AMP) +#define TEMP_SENSOR_0 147 +#else #define TEMP_SENSOR_0 5 +#endif #define TEMP_SENSOR_1 0 #define TEMP_SENSOR_2 0 +#if defined(E3D_PT100_BED_WITH_AMP) +#define TEMP_SENSOR_BED 247 +#elif defined(E3D_PT100_BED_NO_AMP) +#define TEMP_SENSOR_BED 147 +#else #define TEMP_SENSOR_BED 1 +#endif #endif //__CONFIGURATION_PRUSA_H From 3afe6d09e28822f0cf58b47e0236d0e982ac987c Mon Sep 17 00:00:00 2001 From: Aaron Yourk Date: Sat, 31 Dec 2016 16:24:33 -0700 Subject: [PATCH 07/12] Rebase to upstream changes. --- Firmware/Marlin_main.cpp | 126 ++++++++++++++++++++++++++++++++++----- Firmware/stepper.cpp | 2 +- Firmware/ultralcd.cpp | 56 ++++++++++++++++- 3 files changed, 167 insertions(+), 17 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 7d276cd8..9891d3c2 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -874,6 +874,88 @@ static void lcd_language_menu(); enum MeshLevelingState { MeshReport, MeshStart, MeshNext, MeshSet }; #endif + +// Factory reset function +// This function is used to erase parts or whole EEPROM memory which is used for storing calibration and and so on. +// Level input parameter sets depth of reset +// Quiet parameter masks all waitings for user interact. +int er_progress = 0; +void factory_reset(char level, bool quiet) +{ + + switch (level) { + + // Level 0: erase everything, whole EEPROM will be set to 0xFF + case 0: + + lcd_print_at_PGM(1,2,PSTR("ERASING all data")); + + WRITE(BEEPER, HIGH); + _delay_ms(100); + WRITE(BEEPER, LOW); + _delay_ms(100); + WRITE(BEEPER, HIGH); + _delay_ms(100); + WRITE(BEEPER, LOW); + _delay_ms(200); + + er_progress = 0; + lcd_print_at_PGM(3,3,PSTR(" ")); + lcd_implementation_print_at(3,3, er_progress); + + // Erase EEPROM + for (int i = 0; i < 4096; i++) { + eeprom_write_byte((uint8_t*)i, 0xFF); + + if (i % 41 == 0) { + er_progress++; + lcd_print_at_PGM(3,3,PSTR(" ")); + lcd_implementation_print_at(3,3, er_progress); + lcd_printPGM(PSTR("%")); + } + + } + + + break; + + + // Level 1: Language reset + case 1: + WRITE(BEEPER, HIGH); + _delay_ms(100); + WRITE(BEEPER, LOW); + + lcd_force_language_selection(); + break; + + + // Level 2: Prepare for shipping + case 2: + lcd_print_at_PGM(1,2,PSTR("Shipping prep")); + + // Force language selection at the next boot up. + lcd_force_language_selection(); + // Force the "Follow calibration flow" message at the next boot up. + calibration_status_store(CALIBRATION_STATUS_Z_CALIBRATION); + farm_no = 0; + EEPROM_save_B(EEPROM_FARM_MODE, &farm_no); + farm_mode = false; + + WRITE(BEEPER, HIGH); + _delay_ms(100); + WRITE(BEEPER, LOW); + + break; + + default: + break; + } + + +} + + // "Setup" function is called by the Arduino framework on startup. // Before startup, the Timers-functions (PWM)/Analog RW and HardwareSerial provided by the Arduino-code // are initialized by the main() routine provided by the Arduino framework. @@ -948,21 +1030,33 @@ void setup() _delay_ms(1000); if (!READ(BTN_ENC)) { + lcd_implementation_clear(); + lcd_printPGM(PSTR("Factory RESET")); + SET_OUTPUT(BEEPER); WRITE(BEEPER, HIGH); + + while (!READ(BTN_ENC)); + + WRITE(BEEPER, LOW); + + - // Force language selection at the next boot up. - lcd_force_language_selection(); - // Force the "Follow calibration flow" message at the next boot up. - calibration_status_store(CALIBRATION_STATUS_Z_CALIBRATION); - farm_no = 0; - EEPROM_save_B(EEPROM_FARM_MODE, &farm_no); - farm_mode = false; - - while (!READ(BTN_ENC)); - - WRITE(BEEPER, LOW); - + _delay_ms(2000); + if (!READ(BTN_ENC)) + { + + factory_reset(0,false); + } + else + { + factory_reset(2,false); + + } + + _delay_ms(2000); + +/* #ifdef MESH_BED_LEVELING _delay_ms(2000); @@ -989,8 +1083,8 @@ void setup() _delay_ms(100); WRITE(BEEPER, LOW); } -#endif // mesh - +#endif // mesh */ + } } else @@ -1806,6 +1900,10 @@ void process_commands() // Kick farm link timer kicktime = millis(); + } else if(code_seen("FR")) { + // Factory full reset + factory_reset(0,true); + } //else if (code_seen('Cal')) { // lcd_calibration(); diff --git a/Firmware/stepper.cpp b/Firmware/stepper.cpp index 783299b9..919c5591 100644 --- a/Firmware/stepper.cpp +++ b/Firmware/stepper.cpp @@ -1017,7 +1017,7 @@ void digipot_init() //Initialize Digipot Motor Current pinMode(MOTOR_CURRENT_PWM_XY_PIN, OUTPUT); pinMode(MOTOR_CURRENT_PWM_Z_PIN, OUTPUT); pinMode(MOTOR_CURRENT_PWM_E_PIN, OUTPUT); - if(SilentMode == 0){ + if((SilentMode == 0) || (farm_mode) ){ motor_current_setting[0] = motor_current_setting_loud[0]; motor_current_setting[1] = motor_current_setting_loud[1]; diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 63d0ac71..f8553881 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -25,6 +25,8 @@ extern int lcd_change_fil_state; //Function pointer to menu functions. typedef void (*menuFunc_t)(); +static void lcd_sd_updir(); + struct EditMenuParentState { //prevMenu and prevEncoderPosition are used to store the previous menu location when editing settings. @@ -2155,7 +2157,7 @@ static void lcd_settings_menu() MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84")); } - if (SilentModeMenu == 0) { + if ((SilentModeMenu == 0) || (farm_mode) ) { MENU_ITEM(function, MSG_SILENT_MODE_OFF, lcd_silent_mode_set); } else { MENU_ITEM(function, MSG_SILENT_MODE_ON, lcd_silent_mode_set); @@ -2518,7 +2520,57 @@ static void lcd_main_menu() MENU_ITEM(back, MSG_WATCH, lcd_status_screen); - + if (farm_mode && !IS_SD_PRINTING ) + { + + int tempScrool = 0; + if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) + //delay(100); + return; // nothing to do (so don't thrash the SD card) + uint16_t fileCnt = card.getnrfilenames(); + + card.getWorkDirName(); + if (card.filename[0] == '/') + { +#if SDCARDDETECT == -1 + MENU_ITEM(function, MSG_REFRESH, lcd_sd_refresh); +#endif + } else { + MENU_ITEM(function, PSTR(LCD_STR_FOLDER ".."), lcd_sd_updir); + } + + for (uint16_t i = 0; i < fileCnt; i++) + { + if (_menuItemNr == _lineNr) + { +#ifndef SDCARD_RATHERRECENTFIRST + card.getfilename(i); +#else + card.getfilename(fileCnt - 1 - i); +#endif + if (card.filenameIsDir) + { + MENU_ITEM(sddirectory, MSG_CARD_MENU, card.filename, card.longFilename); + } else { + + MENU_ITEM(sdfile, MSG_CARD_MENU, card.filename, card.longFilename); + + + + + } + } else { + MENU_ITEM_DUMMY(); + } + } + + MENU_ITEM(back, PSTR("- - - - - - - - -"), lcd_status_screen); + + + } + + + if ( ( IS_SD_PRINTING || is_usb_printing ) && (current_position[Z_AXIS] < Z_HEIGHT_HIDE_LIVE_ADJUST_MENU) ) { MENU_ITEM(submenu, MSG_BABYSTEP_Z, lcd_babystep_z);//8 From 0181a17263ae37d6a0a0418e2f60355370b7d4d2 Mon Sep 17 00:00:00 2001 From: Aaron Yourk Date: Mon, 9 Jan 2017 17:11:47 -0700 Subject: [PATCH 08/12] Revert "Rebase to upstream changes." This reverts commit 3afe6d09e28822f0cf58b47e0236d0e982ac987c. Resolves conflicts with upstream Pull request. --- Firmware/Marlin_main.cpp | 126 +++++---------------------------------- Firmware/stepper.cpp | 2 +- Firmware/ultralcd.cpp | 56 +---------------- 3 files changed, 17 insertions(+), 167 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 9891d3c2..7d276cd8 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -874,88 +874,6 @@ static void lcd_language_menu(); enum MeshLevelingState { MeshReport, MeshStart, MeshNext, MeshSet }; #endif - -// Factory reset function -// This function is used to erase parts or whole EEPROM memory which is used for storing calibration and and so on. -// Level input parameter sets depth of reset -// Quiet parameter masks all waitings for user interact. -int er_progress = 0; -void factory_reset(char level, bool quiet) -{ - - switch (level) { - - // Level 0: erase everything, whole EEPROM will be set to 0xFF - case 0: - - lcd_print_at_PGM(1,2,PSTR("ERASING all data")); - - WRITE(BEEPER, HIGH); - _delay_ms(100); - WRITE(BEEPER, LOW); - _delay_ms(100); - WRITE(BEEPER, HIGH); - _delay_ms(100); - WRITE(BEEPER, LOW); - _delay_ms(200); - - er_progress = 0; - lcd_print_at_PGM(3,3,PSTR(" ")); - lcd_implementation_print_at(3,3, er_progress); - - // Erase EEPROM - for (int i = 0; i < 4096; i++) { - eeprom_write_byte((uint8_t*)i, 0xFF); - - if (i % 41 == 0) { - er_progress++; - lcd_print_at_PGM(3,3,PSTR(" ")); - lcd_implementation_print_at(3,3, er_progress); - lcd_printPGM(PSTR("%")); - } - - } - - - break; - - - // Level 1: Language reset - case 1: - WRITE(BEEPER, HIGH); - _delay_ms(100); - WRITE(BEEPER, LOW); - - lcd_force_language_selection(); - break; - - - // Level 2: Prepare for shipping - case 2: - lcd_print_at_PGM(1,2,PSTR("Shipping prep")); - - // Force language selection at the next boot up. - lcd_force_language_selection(); - // Force the "Follow calibration flow" message at the next boot up. - calibration_status_store(CALIBRATION_STATUS_Z_CALIBRATION); - farm_no = 0; - EEPROM_save_B(EEPROM_FARM_MODE, &farm_no); - farm_mode = false; - - WRITE(BEEPER, HIGH); - _delay_ms(100); - WRITE(BEEPER, LOW); - - break; - - default: - break; - } - - -} - - // "Setup" function is called by the Arduino framework on startup. // Before startup, the Timers-functions (PWM)/Analog RW and HardwareSerial provided by the Arduino-code // are initialized by the main() routine provided by the Arduino framework. @@ -1030,33 +948,21 @@ void setup() _delay_ms(1000); if (!READ(BTN_ENC)) { - lcd_implementation_clear(); - lcd_printPGM(PSTR("Factory RESET")); - SET_OUTPUT(BEEPER); WRITE(BEEPER, HIGH); - - while (!READ(BTN_ENC)); - - WRITE(BEEPER, LOW); - - - _delay_ms(2000); - if (!READ(BTN_ENC)) - { - - factory_reset(0,false); - } - else - { - factory_reset(2,false); - - } - - _delay_ms(2000); - -/* + // Force language selection at the next boot up. + lcd_force_language_selection(); + // Force the "Follow calibration flow" message at the next boot up. + calibration_status_store(CALIBRATION_STATUS_Z_CALIBRATION); + farm_no = 0; + EEPROM_save_B(EEPROM_FARM_MODE, &farm_no); + farm_mode = false; + + while (!READ(BTN_ENC)); + + WRITE(BEEPER, LOW); + #ifdef MESH_BED_LEVELING _delay_ms(2000); @@ -1083,8 +989,8 @@ void setup() _delay_ms(100); WRITE(BEEPER, LOW); } -#endif // mesh */ - +#endif // mesh + } } else @@ -1900,10 +1806,6 @@ void process_commands() // Kick farm link timer kicktime = millis(); - } else if(code_seen("FR")) { - // Factory full reset - factory_reset(0,true); - } //else if (code_seen('Cal')) { // lcd_calibration(); diff --git a/Firmware/stepper.cpp b/Firmware/stepper.cpp index 919c5591..783299b9 100644 --- a/Firmware/stepper.cpp +++ b/Firmware/stepper.cpp @@ -1017,7 +1017,7 @@ void digipot_init() //Initialize Digipot Motor Current pinMode(MOTOR_CURRENT_PWM_XY_PIN, OUTPUT); pinMode(MOTOR_CURRENT_PWM_Z_PIN, OUTPUT); pinMode(MOTOR_CURRENT_PWM_E_PIN, OUTPUT); - if((SilentMode == 0) || (farm_mode) ){ + if(SilentMode == 0){ motor_current_setting[0] = motor_current_setting_loud[0]; motor_current_setting[1] = motor_current_setting_loud[1]; diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index f8553881..63d0ac71 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -25,8 +25,6 @@ extern int lcd_change_fil_state; //Function pointer to menu functions. typedef void (*menuFunc_t)(); -static void lcd_sd_updir(); - struct EditMenuParentState { //prevMenu and prevEncoderPosition are used to store the previous menu location when editing settings. @@ -2157,7 +2155,7 @@ static void lcd_settings_menu() MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84")); } - if ((SilentModeMenu == 0) || (farm_mode) ) { + if (SilentModeMenu == 0) { MENU_ITEM(function, MSG_SILENT_MODE_OFF, lcd_silent_mode_set); } else { MENU_ITEM(function, MSG_SILENT_MODE_ON, lcd_silent_mode_set); @@ -2520,57 +2518,7 @@ static void lcd_main_menu() MENU_ITEM(back, MSG_WATCH, lcd_status_screen); - if (farm_mode && !IS_SD_PRINTING ) - { - - int tempScrool = 0; - if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) - //delay(100); - return; // nothing to do (so don't thrash the SD card) - uint16_t fileCnt = card.getnrfilenames(); - - card.getWorkDirName(); - if (card.filename[0] == '/') - { -#if SDCARDDETECT == -1 - MENU_ITEM(function, MSG_REFRESH, lcd_sd_refresh); -#endif - } else { - MENU_ITEM(function, PSTR(LCD_STR_FOLDER ".."), lcd_sd_updir); - } - - for (uint16_t i = 0; i < fileCnt; i++) - { - if (_menuItemNr == _lineNr) - { -#ifndef SDCARD_RATHERRECENTFIRST - card.getfilename(i); -#else - card.getfilename(fileCnt - 1 - i); -#endif - if (card.filenameIsDir) - { - MENU_ITEM(sddirectory, MSG_CARD_MENU, card.filename, card.longFilename); - } else { - - MENU_ITEM(sdfile, MSG_CARD_MENU, card.filename, card.longFilename); - - - - - } - } else { - MENU_ITEM_DUMMY(); - } - } - - MENU_ITEM(back, PSTR("- - - - - - - - -"), lcd_status_screen); - - - } - - - + if ( ( IS_SD_PRINTING || is_usb_printing ) && (current_position[Z_AXIS] < Z_HEIGHT_HIDE_LIVE_ADJUST_MENU) ) { MENU_ITEM(submenu, MSG_BABYSTEP_Z, lcd_babystep_z);//8 From 7d5affa12e39f67fc58888c8feaaa3627bab0884 Mon Sep 17 00:00:00 2001 From: Aaron Yourk Date: Thu, 12 Jan 2017 15:46:17 -0700 Subject: [PATCH 09/12] Add additional debugging information for temerature sensor calibration. --- Firmware/Marlin_main.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 7d276cd8..c7b2fbdc 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -3520,11 +3520,18 @@ Sigma_Exit: #endif #ifdef SHOW_TEMP_ADC_VALUES + {float raw = 0.0; + #if defined(TEMP_BED_PIN) && TEMP_BED_PIN > -1 SERIAL_PROTOCOLPGM(" ADC B:"); SERIAL_PROTOCOL_F(degBed(),1); SERIAL_PROTOCOLPGM("C->"); - SERIAL_PROTOCOL_F(rawBedTemp()/OVERSAMPLENR,0); + raw = rawBedTemp(); + SERIAL_PROTOCOL_F(raw/OVERSAMPLENR,5); + SERIAL_PROTOCOLPGM(" Rb->"); + SERIAL_PROTOCOL_F(100 * (1 + (PtA * (raw/OVERSAMPLENR)) + (PtB * sq((raw/OVERSAMPLENR)))), 5); + SERIAL_PROTOCOLPGM(" Rxb->"); + SERIAL_PROTOCOL_F(raw, 5); #endif for (int8_t cur_extruder = 0; cur_extruder < EXTRUDERS; ++cur_extruder) { SERIAL_PROTOCOLPGM(" T"); @@ -3532,8 +3539,17 @@ Sigma_Exit: SERIAL_PROTOCOLPGM(":"); SERIAL_PROTOCOL_F(degHotend(cur_extruder),1); SERIAL_PROTOCOLPGM("C->"); - SERIAL_PROTOCOL_F(rawHotendTemp(cur_extruder)/OVERSAMPLENR,0); - } + raw = rawHotendTemp(cur_extruder); + SERIAL_PROTOCOL_F(raw/OVERSAMPLENR,5); + SERIAL_PROTOCOLPGM(" Rt"); + SERIAL_PROTOCOL(cur_extruder); + SERIAL_PROTOCOLPGM("->"); + SERIAL_PROTOCOL_F(100 * (1 + (PtA * (raw/OVERSAMPLENR)) + (PtB * sq((raw/OVERSAMPLENR)))), 5); + SERIAL_PROTOCOLPGM(" Rx"); + SERIAL_PROTOCOL(cur_extruder); + SERIAL_PROTOCOLPGM("->"); + SERIAL_PROTOCOL_F(raw, 5); + }} #endif SERIAL_PROTOCOLLN(""); From bcc0e83d76e88987a00b28e7b58a094f6aeab908 Mon Sep 17 00:00:00 2001 From: Aaron Yourk Date: Thu, 12 Jan 2017 15:49:48 -0700 Subject: [PATCH 10/12] Fix up some accuracy issues with PT100 temp sensors in relation to the Rambo v1.3a --- Firmware/thermistortables.h | 189 ++++++++++-------- .../variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h | 4 +- .../variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h | 6 +- 3 files changed, 116 insertions(+), 83 deletions(-) diff --git a/Firmware/thermistortables.h b/Firmware/thermistortables.h index 28d0b867..faa7e566 100644 --- a/Firmware/thermistortables.h +++ b/Firmware/thermistortables.h @@ -1033,7 +1033,9 @@ const short temptable_12[][2] PROGMEM = { #define PtA 3.9083E-3 #define PtB -5.775E-7 +#define PtC -4.183E-12 #define PtRt(T,R0) ((R0)*(1.0+(PtA)*(T)+(PtB)*(T)*(T))) +#define PtRtNew(T,R0) ((R0)*(1.0+(PtA)*(T)+(PtB)*(T)*(T) + (T-100)*PtC*(T)*(T)*(T))) #define PtAdVal(T,R0,Rup) (short)(1024/(Rup/PtRt(T,R0)+1)) #define PtLine(T,R0,Rup) { PtAdVal(T,R0,Rup)*OVERSAMPLENR, T }, @@ -1059,93 +1061,124 @@ const short temptable_147[][2] PROGMEM = { PtLine(200,100,4700) PtLine(250,100,4700) PtLine(300,100,4700) - PtLine(350,100,4700) - PtLine(400,100,4700) - PtLine(450,100,4700) - PtLine(500,100,4700) - PtLine(550,100,4700) - PtLine(600,100,4700) - PtLine(650,100,4700) - PtLine(700,100,4700) - PtLine(750,100,4700) - PtLine(800,100,4700) - PtLine(850,100,4700) - PtLine(900,100,4700) - PtLine(950,100,4700) - PtLine(1000,100,4700) - PtLine(1050,100,4700) - PtLine(1100,100,4700) }; #endif -#if (THERMISTORHEATER_0 == 148) || (THERMISTORHEATER_1 == 148) || (THERMISTORHEATER_2 == 148) || (THERMISTORBED == 148) // Pt100 with 4k7 MiniRambo pullup, no Amp. +// E3D Pt100 with 4k7 MiniRambo pullup, no Amp on the MiniRambo v1.3a +#if (THERMISTORHEATER_0 == 148) || (THERMISTORHEATER_1 == 148) || (THERMISTORHEATER_2 == 148) || (THERMISTORBED == 148) const short temptable_148[][2] PROGMEM = { -// More raw data values avaliable via http://www.micropik.com/PDF/pt100.pdf -// This information is taken from http://shop.prusa3d.com/forum/improvements-f14/mini-rambo-1-3-and-e3d-with-pt100-t700-s40.html#p20938 -{292,0}, // first two entries are bogus, just to get the heater running -{356,50}, -{469,100}, -{531,150}, -{590,200}, -{649,250}, -{708,300}, -{763,350}, -{819,400}, -{872,450}, +// These values have been calculated and tested over many days. See https://docs.google.com/spreadsheets/d/1MJXa6feEe0mGVCT2TrBwLxVOMoLDkJlvfQ4JXhAdV_E +// Values that are missing from the 5C gap are missing due to resolution limits. +{19.00000 * OVERSAMPLENR, 0}, +{19.25000 * OVERSAMPLENR, 5}, +{19.50000 * OVERSAMPLENR, 10}, +{19.87500 * OVERSAMPLENR, 15}, +{20.25000 * OVERSAMPLENR, 20}, +{21.00000 * OVERSAMPLENR, 25}, +{21.75000 * OVERSAMPLENR, 35}, +{22.00000 * OVERSAMPLENR, 40}, +{23.00000 * OVERSAMPLENR, 50}, // 55C is more commonly used. +{23.75000 * OVERSAMPLENR, 60}, +{24.00000 * OVERSAMPLENR, 65}, +{24.06250 * OVERSAMPLENR, 70}, +{25.00000 * OVERSAMPLENR, 75}, +{25.50000 * OVERSAMPLENR, 85}, +{26.00000 * OVERSAMPLENR, 90}, +{26.93750 * OVERSAMPLENR,100}, +{27.00000 * OVERSAMPLENR,105}, +{27.37500 * OVERSAMPLENR,110}, +{28.00000 * OVERSAMPLENR,115}, +{29.00000 * OVERSAMPLENR,125}, +{29.25000 * OVERSAMPLENR,135}, +{30.00000 * OVERSAMPLENR,140}, +{35.50000 * OVERSAMPLENR,150}, +{31.00000 * OVERSAMPLENR,155}, +{32.00000 * OVERSAMPLENR,165}, +{32.18750 * OVERSAMPLENR,175}, +{33.00000 * OVERSAMPLENR,180}, +{33.62500 * OVERSAMPLENR,190}, +{34.00000 * OVERSAMPLENR,195}, +{35.00000 * OVERSAMPLENR,205}, +{35.50000 * OVERSAMPLENR,215}, +{36.00000 * OVERSAMPLENR,220}, +{36.75000 * OVERSAMPLENR,230}, +{37.00000 * OVERSAMPLENR,235}, +{37.75000 * OVERSAMPLENR,245}, +{38.00000 * OVERSAMPLENR,250}, +{38.12500 * OVERSAMPLENR,255}, +{39.00000 * OVERSAMPLENR,260}, +{40.00000 * OVERSAMPLENR,275}, +{40.25000 * OVERSAMPLENR,285}, +{41.00000 * OVERSAMPLENR,290}, +{41.25000 * OVERSAMPLENR,300}, +{42.00000 * OVERSAMPLENR,305}, +{43.00000 * OVERSAMPLENR,315}, +{43.25000 * OVERSAMPLENR,325}, +{44.00000 * OVERSAMPLENR,330}, +{44.18750 * OVERSAMPLENR,340}, +{45.00000 * OVERSAMPLENR,345}, +{45.25000 * OVERSAMPLENR,355}, +{46.00000 * OVERSAMPLENR,360}, +{46.62500 * OVERSAMPLENR,370}, +{47.00000 * OVERSAMPLENR,375}, +{47.25000 * OVERSAMPLENR,385}, +{48.00000 * OVERSAMPLENR,390}, +{48.75000 * OVERSAMPLENR,400}, +{49.00000 * OVERSAMPLENR,405}, }; #endif #if (THERMISTORHEATER_0 == 247) || (THERMISTORHEATER_1 == 247) || (THERMISTORHEATER_2 == 247) || (THERMISTORBED == 247) // Pt100 with 4k7 MiniRambo pullup & PT100 Amplifier const short temptable_247[][2] PROGMEM = { // Calculated from Bob-the-Kuhn's PT100 calculator listed in https://github.com/MarlinFirmware/Marlin/issues/5543 // and the table provided by E3D at http://wiki.e3d-online.com/wiki/E3D_PT100_Amplifier_Documentation#Output_Characteristics. -{ 0 * OVERSAMPLENR, 0 }, -{ 244 * OVERSAMPLENR, 1 }, -{ 252 * OVERSAMPLENR, 10 }, -{ 262 * OVERSAMPLENR, 20 }, -{ 270 * OVERSAMPLENR, 30 }, -{ 278 * OVERSAMPLENR, 40 }, -{ 286 * OVERSAMPLENR, 50 }, -{ 294 * OVERSAMPLENR, 60 }, -{ 302 * OVERSAMPLENR, 70 }, -{ 310 * OVERSAMPLENR, 80 }, -{ 318 * OVERSAMPLENR, 90 }, -{ 326 * OVERSAMPLENR, 100 }, -{ 334 * OVERSAMPLENR, 110 }, -{ 344 * OVERSAMPLENR, 120 }, -{ 352 * OVERSAMPLENR, 130 }, -{ 358 * OVERSAMPLENR, 140 }, -{ 366 * OVERSAMPLENR, 150 }, -{ 374 * OVERSAMPLENR, 160 }, -{ 382 * OVERSAMPLENR, 170 }, -{ 390 * OVERSAMPLENR, 180 }, -{ 398 * OVERSAMPLENR, 190 }, -{ 406 * OVERSAMPLENR, 200 }, -{ 414 * OVERSAMPLENR, 210 }, -{ 422 * OVERSAMPLENR, 220 }, -{ 430 * OVERSAMPLENR, 230 }, -{ 436 * OVERSAMPLENR, 240 }, -{ 444 * OVERSAMPLENR, 250 }, -{ 452 * OVERSAMPLENR, 260 }, -{ 458 * OVERSAMPLENR, 270 }, -{ 466 * OVERSAMPLENR, 280 }, -{ 474 * OVERSAMPLENR, 290 }, -{ 480 * OVERSAMPLENR, 300 }, -{ 488 * OVERSAMPLENR, 310 }, -{ 496 * OVERSAMPLENR, 320 }, -{ 504 * OVERSAMPLENR, 330 }, -{ 510 * OVERSAMPLENR, 340 }, -{ 518 * OVERSAMPLENR, 350 }, -{ 524 * OVERSAMPLENR, 360 }, -{ 532 * OVERSAMPLENR, 370 }, -{ 538 * OVERSAMPLENR, 380 }, -{ 546 * OVERSAMPLENR, 390 }, -{ 554 * OVERSAMPLENR, 400 }, -{ 622 * OVERSAMPLENR, 500 }, -{ 688 * OVERSAMPLENR, 600 }, -{ 749 * OVERSAMPLENR, 700 }, -{ 809 * OVERSAMPLENR, 800 }, -{ 865 * OVERSAMPLENR, 900 }, -{ 919 * OVERSAMPLENR, 1000 }, -{ 969 * OVERSAMPLENR, 1100 }, +{ 0 * OVERSAMPLENR, 0}, +{241 * OVERSAMPLENR, 1}, +{249 * OVERSAMPLENR, 10}, +{259 * OVERSAMPLENR, 20}, +{267 * OVERSAMPLENR, 30}, +{275 * OVERSAMPLENR, 40}, +{283 * OVERSAMPLENR, 50}, +{291 * OVERSAMPLENR, 60}, +{299 * OVERSAMPLENR, 70}, +{307 * OVERSAMPLENR, 80}, +{315 * OVERSAMPLENR, 90}, +{323 * OVERSAMPLENR, 100}, +{331 * OVERSAMPLENR, 110}, +{340 * OVERSAMPLENR, 120}, +{348 * OVERSAMPLENR, 130}, +{354 * OVERSAMPLENR, 140}, +{362 * OVERSAMPLENR, 150}, +{370 * OVERSAMPLENR, 160}, +{378 * OVERSAMPLENR, 170}, +{386 * OVERSAMPLENR, 180}, +{394 * OVERSAMPLENR, 190}, +{402 * OVERSAMPLENR, 200}, +{410 * OVERSAMPLENR, 210}, +{418 * OVERSAMPLENR, 220}, +{426 * OVERSAMPLENR, 230}, +{432 * OVERSAMPLENR, 240}, +{440 * OVERSAMPLENR, 250}, +{448 * OVERSAMPLENR, 260}, +{454 * OVERSAMPLENR, 270}, +{462 * OVERSAMPLENR, 280}, +{469 * OVERSAMPLENR, 290}, +{475 * OVERSAMPLENR, 300}, +{483 * OVERSAMPLENR, 310}, +{491 * OVERSAMPLENR, 320}, +{499 * OVERSAMPLENR, 330}, +{505 * OVERSAMPLENR, 340}, +{513 * OVERSAMPLENR, 350}, +{519 * OVERSAMPLENR, 360}, +{527 * OVERSAMPLENR, 370}, +{533 * OVERSAMPLENR, 380}, +{541 * OVERSAMPLENR, 390}, +{549 * OVERSAMPLENR, 400}, +{616 * OVERSAMPLENR, 500}, +{682 * OVERSAMPLENR, 600}, +{741 * OVERSAMPLENR, 700}, +{801 * OVERSAMPLENR, 800}, +{856 * OVERSAMPLENR, 900}, +{910 * OVERSAMPLENR, 1000}, +{960 * OVERSAMPLENR, 1100}, }; #endif #if (THERMISTORHEATER_0 == 1010) || (THERMISTORHEATER_1 == 1010) || (THERMISTORHEATER_2 == 1010) || (THERMISTORBED == 1010) // Pt1000 with 1k0 pullup diff --git a/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h index a4b0f784..506495b0 100644 --- a/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h @@ -336,7 +336,7 @@ THERMISTORS SETTINGS #if defined(E3D_PT100_EXTRUDER_WITH_AMP) #define TEMP_SENSOR_0 247 #elif defined(E3D_PT100_EXTRUDER_NO_AMP) -#define TEMP_SENSOR_0 147 +#define TEMP_SENSOR_0 148 #else #define TEMP_SENSOR_0 5 #endif @@ -345,7 +345,7 @@ THERMISTORS SETTINGS #if defined(E3D_PT100_BED_WITH_AMP) #define TEMP_SENSOR_BED 247 #elif defined(E3D_PT100_BED_NO_AMP) -#define TEMP_SENSOR_BED 147 +#define TEMP_SENSOR_BED 148 #else #define TEMP_SENSOR_BED 1 #endif diff --git a/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h b/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h index 60b74d41..b0e1b9ae 100644 --- a/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h @@ -329,14 +329,14 @@ THERMISTORS SETTINGS // 1047 is Pt1000 with 4k7 pullup // 1010 is Pt1000 with 1k pullup (non standard) // 147 is Pt100 with 4k7 pullup -// 148 is Pt100 with 4k7 pullup and no PT100 Amplifier (in case type 147 doesn't work) +// 148 is E3D Pt100 with 4k7 pullup and no PT100 Amplifier on a MiniRambo 1.3a // 247 is Pt100 with 4k7 pullup and PT100 Amplifier // 110 is Pt100 with 1k pullup (non standard) #if defined(E3D_PT100_EXTRUDER_WITH_AMP) #define TEMP_SENSOR_0 247 #elif defined(E3D_PT100_EXTRUDER_NO_AMP) -#define TEMP_SENSOR_0 147 +#define TEMP_SENSOR_0 148 #else #define TEMP_SENSOR_0 5 #endif @@ -345,7 +345,7 @@ THERMISTORS SETTINGS #if defined(E3D_PT100_BED_WITH_AMP) #define TEMP_SENSOR_BED 247 #elif defined(E3D_PT100_BED_NO_AMP) -#define TEMP_SENSOR_BED 147 +#define TEMP_SENSOR_BED 148 #else #define TEMP_SENSOR_BED 1 #endif From 822fbc00cb986fcccda9106e04983ef5c3ceda70 Mon Sep 17 00:00:00 2001 From: Aaron Yourk Date: Sat, 4 Mar 2017 18:35:49 -0700 Subject: [PATCH 11/12] Fixing conficts due to recent changes involving "Farm Mode". --- Firmware/ultralcd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 63d0ac71..0982a958 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -97,8 +97,8 @@ int8_t SilentModeMenu = 0; int lcd_commands_type=LCD_COMMAND_IDLE; int lcd_commands_step=0; bool isPrintPaused = false; -int oldFanSpeed = 0; -bool farm_mode = false; +uint8_t oldFanSpeed = 0; +uint8_t farm_mode = 0; int farm_no = 0; int farm_timer = 30; int farm_status = 0; From f7a18d3a4ed8efe9c7372e1e8b213d6666d5709f Mon Sep 17 00:00:00 2001 From: Aaron Yourk Date: Sun, 5 Mar 2017 17:47:51 -0700 Subject: [PATCH 12/12] Attempt #2 at resolving conflicts with upstream for pull request. --- Firmware/ultralcd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 0982a958..b75e09eb 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -94,10 +94,10 @@ int8_t SDscrool = 0; int8_t SilentModeMenu = 0; +uint8_t oldFanSpeed = 0; int lcd_commands_type=LCD_COMMAND_IDLE; int lcd_commands_step=0; bool isPrintPaused = false; -uint8_t oldFanSpeed = 0; uint8_t farm_mode = 0; int farm_no = 0; int farm_timer = 30;