Commit 9c53b44c authored by MagoKimbra's avatar MagoKimbra

Update 4.2.1 dev

parent 92818d98
......@@ -44,7 +44,7 @@
//#define FIRMWARE_TEST // ONLY BAUDRATE 115200
// Some particular clients re-start sending commands only after receiving a 'wait' when there is a bed serial-connection.
#define NO_TIMEOUTS 1000 // Milliseconds
//#define NO_TIMEOUTS 1000 // Milliseconds
//#define ADVANCED_OK // Uncomment to include more info in ok command
/***********************************************************************/
......
......@@ -48,13 +48,13 @@
// and processor overload (too many expensive sqrt calls).
// The new function do not use segments per second but segments per mm
// if you want use new function comment this (using // at the start of the line)
#define DELTA_SEGMENTS_PER_SECOND 150
#define DELTA_SEGMENTS_PER_SECOND 200
// Center-to-center distance of the holes in the diagonal push rods.
#define DEFAULT_DELTA_DIAGONAL_ROD 217.0 // mm
#define DEFAULT_DELTA_DIAGONAL_ROD 220.0 // mm
// Horizontal offset from middle of printer to smooth rod center.
#define DELTA_SMOOTH_ROD_OFFSET 145.0 // mm
#define DELTA_SMOOTH_ROD_OFFSET 150.0 // mm
// Horizontal offset of the universal joints on the end effector.
#define DELTA_EFFECTOR_OFFSET 20.0 // mm
......
......@@ -361,9 +361,9 @@
#define PREVENT_DANGEROUS_EXTRUDE
#define EXTRUDE_MINTEMP 170 // degC
//if PREVENT DANGEROUS EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately.
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
// if PREVENT DANGEROUS EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately.
//#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH + Y_MAX_LENGTH) // prevent extrusion of very large distances.
/***********************************************************************/
......
......@@ -8,7 +8,7 @@
// #error "You must specify the following parameters related to your distribution"
#if true
#define SHORT_BUILD_VERSION "4.2.0 dev"
#define SHORT_BUILD_VERSION "4.2.1 dev"
#define STRING_DISTRIBUTION_DATE __DATE__ " " __TIME__ // build date and time
// It might also be appropriate to define a location where additional information can be found
#define SOURCE_CODE_URL "https://github.com/MagoKimbra/MarlinKimbra"
......
This diff is collapsed.
......@@ -61,7 +61,8 @@ enum DebugFlags {
DEBUG_INFO = BIT(1),
DEBUG_ERRORS = BIT(2),
DEBUG_DRYRUN = BIT(3),
DEBUG_COMMUNICATION = BIT(4)
DEBUG_COMMUNICATION = BIT(4),
DEBUG_DEBUG = BIT(5)
};
void clamp_to_software_endstops(float target[3]);
......@@ -101,6 +102,11 @@ extern float home_offset[3];
extern float hotend_offset[3][HOTENDS];
#endif // HOTENDS > 1
#if HEATER_USES_AD595
extern float ad595_offset[HOTENDS];
extern float ad595_gain[HOTENDS];
#endif
#if ENABLED(NPR2)
extern int old_color; // old color for system NPR2
#endif
......@@ -111,7 +117,6 @@ extern float home_offset[3];
extern float tower_adj[6];
extern float delta_radius;
extern float delta_diagonal_rod;
extern float delta_segments_per_second;
#elif ENABLED(Z_DUAL_ENDSTOPS)
extern float z_endstop_adj;
#endif
......@@ -207,6 +212,10 @@ extern uint8_t active_driver;
extern void digipot_i2c_init();
#endif
#if HAS(TEMP_0) || HAS(TEMP_BED) || ENABLED(HEATER_0_USES_MAX6675)
void print_heaterstates();
#endif
#if ENABLED(FIRMWARE_TEST)
void FirmwareTest();
#endif
......
......@@ -146,23 +146,30 @@
#define NEWPANEL
#endif
#if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display
#if DISABLED(LCD_WIDTH)
#define LCD_WIDTH 22
#endif
#if DISABLED(LCD_HEIGHT)
#define LCD_HEIGHT 5
#endif
#endif
#if ENABLED(ULTIPANEL)
#define NEWPANEL //enable this if you have a click-encoder panel
#define ULTRA_LCD
#if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display
#define LCD_WIDTH 22
#define LCD_HEIGHT 5
#else
#if DISABLED(LCD_WIDTH)
#define LCD_WIDTH 20
#endif
#if DISABLED(LCD_HEIGHT)
#define LCD_HEIGHT 4
#endif
#else //no panel but just LCD
#if ENABLED(ULTRA_LCD)
#if ENABLED(DOGLCD) // Change number of lines to match the 128x64 graphics display
#define LCD_WIDTH 22
#define LCD_HEIGHT 5
#else
#if DISABLED(LCD_WIDTH)
#define LCD_WIDTH 16
#endif
#if DISABLED(LCD_HEIGHT)
#define LCD_HEIGHT 2
#endif
#endif
......@@ -502,33 +509,33 @@
#define BED_USES_THERMISTOR
#endif
#define HEATER_USES_AD595 (ENABLED(HEATER_0_USES_AD595) || ENABLED(HEATER_1_USES_AD595) || ENABLED(HEATER_2_USES_AD595) || ENABLED(HEATER_3_USES_AD595))
/**
* ARRAY_BY_EXTRUDERS based on EXTRUDERS
*/
#if EXTRUDERS > 9
#define ARRAY_BY_EXTRUDER(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) { v1, v2, v3, v4, v5, v6, v7, v8, v9, v10 }
#define ARRAY_BY_EXTRUDERS(v1) { v1, v1, v1, v1, v1, v1, v1, v1, v1, v1 }
#elif EXTRUDERS > 8
#define ARRAY_BY_EXTRUDER(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) { v1, v2, v3, v4, v5, v6, v7, v8, v9 }
#define ARRAY_BY_EXTRUDERS(v1) { v1, v1, v1, v1, v1, v1, v1, v1, v1 }
#elif EXTRUDERS > 7
#define ARRAY_BY_EXTRUDER(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) { v1, v2, v3, v4, v5, v6, v7, v8 }
#define ARRAY_BY_EXTRUDERS(v1) { v1, v1, v1, v1, v1, v1, v1, v1 }
#elif EXTRUDERS > 6
#define ARRAY_BY_EXTRUDER(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) { v1, v2, v3, v4, v5, v6, v7 }
#define ARRAY_BY_EXTRUDERS(v1) { v1, v1, v1, v1, v1, v1, v1 }
#elif EXTRUDERS > 5
#define ARRAY_BY_EXTRUDER(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) { v1, v2, v3, v4, v5, v6 }
#define ARRAY_BY_EXTRUDERS(v1) { v1, v1, v1, v1, v1, v1 }
#elif EXTRUDERS > 4
#define ARRAY_BY_EXTRUDER(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) { v1, v2, v3, v4, v5 }
#define ARRAY_BY_EXTRUDERS(v1) { v1, v1, v1, v1, v1 }
#elif EXTRUDERS > 3
#define ARRAY_BY_EXTRUDER(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) { v1, v2, v3, v4 }
#define ARRAY_BY_EXTRUDERS(v1) { v1, v1, v1, v1 }
#elif EXTRUDERS > 2
#define ARRAY_BY_EXTRUDER(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) { v1, v2, v3 }
#define ARRAY_BY_EXTRUDERS(v1) { v1, v1, v1 }
#elif EXTRUDERS > 1
#define ARRAY_BY_EXTRUDER(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) { v1, v2 }
#define ARRAY_BY_EXTRUDERS(v1) { v1, v1 }
#else
#define ARRAY_BY_EXTRUDER(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) { v1 }
#define ARRAY_BY_EXTRUDERS(v1) { v1 }
#endif
#define ARRAY_BY_EXTRUDERS(v1) ARRAY_BY_EXTRUDER(v1, v1, v1, v1, v1, v1, v1, v1, v1, v1)
/**
* ARRAY_BY_HOTENDS based on HOTENDS
*/
......
......@@ -53,6 +53,9 @@
* HOTENDS OFFSET:
* M218 T XY hotend_offset (x4) (T0..3)
*
* HOTENDS AD595:
* M595 T O G Hotend AD595 Offset & Gain
*
* DELTA:
* M666 XYZ endstop_adj (x3)
* M666 R delta_radius
......@@ -171,6 +174,11 @@ void Config_StoreSettings() {
EEPROM_WRITE_VAR(i, hotend_offset);
#endif
#if HEATER_USES_AD595
EEPROM_WRITE_VAR(i, ad595_offset);
EEPROM_WRITE_VAR(i, ad595_gain);
#endif
#if MECH(DELTA)
EEPROM_WRITE_VAR(i, endstop_adj);
EEPROM_WRITE_VAR(i, delta_radius);
......@@ -314,6 +322,11 @@ void Config_RetrieveSettings() {
EEPROM_READ_VAR(i, hotend_offset);
#endif
#if HEATER_USES_AD595
EEPROM_READ_VAR(i, ad595_offset);
EEPROM_READ_VAR(i, ad595_gain);
#endif
#if MECH(DELTA)
EEPROM_READ_VAR(i, endstop_adj);
EEPROM_READ_VAR(i, delta_radius);
......@@ -591,11 +604,6 @@ void Config_ResetDefault() {
#endif
volumetric_enabled = false;
for (short i = 0; i < EXTRUDERS; i++) {
filament_size[i] = DEFAULT_NOMINAL_FILAMENT_DIA;
}
calculate_volumetric_multipliers();
#if ENABLED(IDLE_OOZING_PREVENT)
......@@ -710,8 +718,19 @@ void Config_ResetDefault() {
ECHO_MV(" Y", hotend_offset[Y_AXIS][h]);
ECHO_EMV(" Z", hotend_offset[Z_AXIS][h]);
}
#endif //HOTENDS > 1
#endif // HOTENDS > 1
#if HEATER_USES_AD595
if (!forReplay) {
ECHO_LM(DB, "Hotend AD595:");
}
for (int h = 0; h < EXTRUDERS; h++) {
ECHO_SMV(DB, " M595 T", h);
ECHO_MV(" Offset", ad595_offset[h]);
ECHO_EMV(", Gain: ", ad595_gain[h]);
}
#endif // HEATER_USES_AD595
#if MECH(DELTA)
if (!forReplay) {
ECHO_LM(DB, "Delta Geometry adjustment:");
......
......@@ -181,13 +181,13 @@
#define MSG_KU " Ku: "
#define MSG_TU " Tu: "
#define MSG_CLASSIC_PID " Classic PID "
#define MSG_KP " Kp: "
#define MSG_KP "Kp: "
#define MSG_KI " Ki: "
#define MSG_KD " Kd: "
#define MSG_KC " Kc: "
#define MSG_B "B:"
#define MSG_T "T:"
#define MSG_AT "@:"
#define MSG_AT "@"
#define MSG_BAT "B@:"
#define MSG_W "W:"
#define MSG_PID_AUTOTUNE_FINISHED MSG_PID_AUTOTUNE " finished! Put the last Kp, Ki and Kd constants from above into Configuration.h or send command M500 for save in EEPROM the new value!"
......
......@@ -153,6 +153,7 @@
#define MSG_HEATING_FAILED_LCD "Heating failed"
#define MSG_ERR_REDUNDANT_TEMP "Err: REDUNDANT TEMP ERROR"
#define MSG_THERMAL_RUNAWAY "THERMAL RUNAWAY"
#define MSG_HOTEND_AD595 "HOTEND AD595 Offset & Gain"
#define MSG_ERR_MAXTEMP "Err: MAXTEMP"
#define MSG_ERR_MINTEMP "Err: MINTEMP"
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
......@@ -166,6 +167,7 @@
#define MSG_DEBUG_INFO "DEBUG INFO ENABLED"
#define MSG_DEBUG_ERRORS "DEBUG ERRORS ENABLED"
#define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED"
#define MSG_DEBUG "DEBUG ENABLED"
// Calibrate Delta
#if MECH(DELTA)
......
......@@ -157,10 +157,11 @@
#define MSG_END_MINUTE "minuti"
// Debug
#define MSG_DEBUG_ECHO "DEBUG RIPETI"
#define MSG_DEBUG_INFO "DEBUG INFO"
#define MSG_DEBUG_ERRORS "DEBUG ERRORI"
#define MSG_DEBUG_DRYRUN "DEBUG STAMPA A VUOTO"
#define MSG_DEBUG_ECHO "DEBUG RIPETI ABILITATO"
#define MSG_DEBUG_INFO "DEBUG INFO ABILITATO"
#define MSG_DEBUG_ERRORS "DEBUG ERRORI ABILITATO"
#define MSG_DEBUG_DRYRUN "DEBUG STAMPA A VUOTO ABILITATO"
#define MSG_DEBUG "DEBUG ABILITATO"
// Calibrate Delta
#if MECH(DELTA)
......
......@@ -18,6 +18,12 @@
void lcd_setalertstatuspgm(const char* message);
void lcd_reset_alert_level();
#if ENABLED(NEXTION_GFX)
void gfx_clear(float x, float y, float z);
void gfx_cursor_to(float x, float y, float z);
void gfx_line_to(float x, float y, float z);
#endif
#if ENABLED(SDSUPPORT)
void sdlistPopCallback(void *ptr);
void sdfilePopCallback(void *ptr);
......
......@@ -3658,9 +3658,7 @@
#define BEEPER_PIN 33 // Beeper on AUX-4
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
//arduino pin which triggers an piezzo beeper
......@@ -3696,106 +3694,103 @@
****************************************************************************************/
#if MB(MEGATRONICS_2)
#define KNOWN_BOARD 1
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
#define LARGE_FLASH true
#define ORIG_X_STEP_PIN 26
#define ORIG_X_DIR_PIN 27
#define ORIG_X_ENABLE_PIN 25
#define ORIG_X_MIN_PIN 37
#define ORIG_X_MAX_PIN 40 //2 //Max endstops default to disabled "-1", set to commented value to enable.
#define ORIG_X_STEP_PIN 26
#define ORIG_X_DIR_PIN 27
#define ORIG_X_ENABLE_PIN 25
#define ORIG_X_MIN_PIN 37
#define ORIG_X_MAX_PIN 40 //2 //Max endstops default to disabled "-1", set to commented value to enable.
#define ORIG_Y_STEP_PIN 4 // A6
#define ORIG_Y_DIR_PIN 54 // A0
#define ORIG_Y_ENABLE_PIN 5
#define ORIG_Y_MIN_PIN 41
#define ORIG_Y_MAX_PIN 38 //15
#define ORIG_Z_STEP_PIN 56 // A2
#define ORIG_Z_DIR_PIN 60 // A6
#define ORIG_Z_ENABLE_PIN 55 // A1
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN 19
#define ORIG_E0_STEP_PIN 35
#define ORIG_E0_DIR_PIN 36
#define ORIG_E0_ENABLE_PIN 34
#define ORIG_E1_STEP_PIN 29
#define ORIG_E1_DIR_PIN 39
#define ORIG_E1_ENABLE_PIN 28
#define ORIG_E2_STEP_PIN 23
#define ORIG_E2_DIR_PIN 24
#define ORIG_E2_ENABLE_PIN 22
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
#define ORIG_FAN_PIN 7
#define FAN2_PIN 6
#define ORIG_PS_ON_PIN 12
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 9 // EXTRUDER 1
#define ORIG_HEATER_1_PIN 8 // EXTRUDER 2
#define ORIG_HEATER_2_PIN -1
#define SHIFT_CLK 63
#define SHIFT_LD 42
#define SHIFT_OUT 17
#define SHIFT_EN 17
#if TEMP_SENSOR_0 == -1
#define ORIG_TEMP_0_PIN 4 // ANALOG NUMBERING
#else
#define ORIG_TEMP_0_PIN 13 // ANALOG NUMBERING
#endif
#define ORIG_Y_STEP_PIN 4 // A6
#define ORIG_Y_DIR_PIN 54 // A0
#define ORIG_Y_ENABLE_PIN 5
#define ORIG_Y_MIN_PIN 41
#define ORIG_Y_MAX_PIN 38 //15
#define ORIG_Z_STEP_PIN 56 // A2
#define ORIG_Z_DIR_PIN 60 // A6
#define ORIG_Z_ENABLE_PIN 55 // A1
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN 19
#if TEMP_SENSOR_1 == -1
#define ORIG_TEMP_1_PIN 8 // ANALOG NUMBERING
#else
#define ORIG_TEMP_1_PIN 15 // ANALOG NUMBERING
#endif
#define ORIG_E0_STEP_PIN 35
#define ORIG_E0_DIR_PIN 36
#define ORIG_E0_ENABLE_PIN 34
#define ORIG_TEMP_2_PIN -1 // ANALOG NUMBERING
#define ORIG_E1_STEP_PIN 29
#define ORIG_E1_DIR_PIN 39
#define ORIG_E1_ENABLE_PIN 28
#define ORIG_HEATER_BED_PIN 10 // BED
#define ORIG_E2_STEP_PIN 23
#define ORIG_E2_DIR_PIN 24
#define ORIG_E2_ENABLE_PIN 22
#if TEMP_SENSOR_BED == -1
#define ORIG_TEMP_BED_PIN 8 // ANALOG NUMBERING
#else
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#endif
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
#define ORIG_FAN_PIN 7
#define FAN2_PIN 6
#define ORIG_PS_ON_PIN 12
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 9 // EXTRUDER 1
#define ORIG_HEATER_1_PIN 8 // EXTRUDER 2
#define ORIG_HEATER_2_PIN -1
#define SHIFT_CLK 63
#define SHIFT_LD 42
#define SHIFT_OUT 17
#define SHIFT_EN 17
#if TEMP_SENSOR_0 == -1
#define ORIG_TEMP_0_PIN 4 // ANALOG NUMBERING
#else
#define ORIG_TEMP_0_PIN 13 // ANALOG NUMBERING
#endif
#define BEEPER_PIN 64
#if TEMP_SENSOR_1 == -1
#define ORIG_TEMP_1_PIN 8 // ANALOG NUMBERING
#else
#define ORIG_TEMP_1_PIN 15 // ANALOG NUMBERING
#endif
#define ORIG_TEMP_2_PIN -1 // ANALOG NUMBERING
#define LCD_PINS_RS 14
#define LCD_PINS_ENABLE 15
#define LCD_PINS_D4 30
#define LCD_PINS_D5 31
#define LCD_PINS_D6 32
#define LCD_PINS_D7 33
#define ORIG_HEATER_BED_PIN 10 // BED
#if TEMP_SENSOR_BED == -1
#define ORIG_TEMP_BED_PIN 8 // ANALOG NUMBERING
#else
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#endif
//buttons are directly attached using keypad
#define BTN_EN1 61
#define BTN_EN2 59
#define BTN_ENC 43 //the click
#define BEEPER_PIN 64
#define BLEN_C 2
#define BLEN_B 1
#define BLEN_A 0
#define LCD_PINS_RS 14
#define LCD_PINS_ENABLE 15
#define LCD_PINS_D4 30
#define LCD_PINS_D5 31
#define LCD_PINS_D6 32
#define LCD_PINS_D7 33
#define SD_DETECT_PIN -1 // Megatronics does not use this port
//buttons are directly attached using keypad
#define BTN_EN1 61
#define BTN_EN2 59
#define BTN_ENC 43 //the click
#define BLEN_C 2
#define BLEN_B 1
#define BLEN_A 0
#define SD_DETECT_PIN -1 // Megatronics does not use this port
#endif // MEGATRONICS_2
/****************************************************************************************/
......@@ -3808,12 +3803,11 @@
****************************************************************************************/
#if MB(MINITRONICS)
#define KNOWN_BOARD 1
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega1281__
#error Oops! Make sure you have 'Minitronics ' selected from the 'Tools -> Boards' menu.
#endif
#ifndef __AVR_ATmega1281__
#error Oops! Make sure you have 'Minitronics ' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
......@@ -4032,68 +4026,68 @@
****************************************************************************************/
#if MB(ULTIMAKER_OLD)
#define KNOWN_BOARD
#ifndef __AVR_ATmega1280__
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#endif
#define LARGE_FLASH true
#define ORIG_X_STEP_PIN 25
#define ORIG_X_DIR_PIN 23
#define ORIG_X_MIN_PIN 15
#define ORIG_X_MAX_PIN 14
#define ORIG_X_ENABLE_PIN 27
#define KNOWN_BOARD
#define ORIG_Y_STEP_PIN 31
#define ORIG_Y_DIR_PIN 33
#define ORIG_Y_MIN_PIN 17
#define ORIG_Y_MAX_PIN 16
#define ORIG_Y_ENABLE_PIN 29
#ifndef __AVR_ATmega1280__
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#endif
#define ORIG_Z_STEP_PIN 37
#define ORIG_Z_DIR_PIN 39
#define ORIG_Z_MIN_PIN 19
#define ORIG_Z_MAX_PIN 18
#define ORIG_Z_ENABLE_PIN 35
#define LARGE_FLASH true
#define ORIG_HEATER_BED_PIN -1
#define ORIG_TEMP_BED_PIN -1
#define ORIG_X_STEP_PIN 25
#define ORIG_X_DIR_PIN 23
#define ORIG_X_MIN_PIN 15
#define ORIG_X_MAX_PIN 14
#define ORIG_X_ENABLE_PIN 27
#define ORIG_HEATER_0_PIN 2
#define ORIG_TEMP_0_PIN 8
#define ORIG_Y_STEP_PIN 31
#define ORIG_Y_DIR_PIN 33
#define ORIG_Y_MIN_PIN 17
#define ORIG_Y_MAX_PIN 16
#define ORIG_Y_ENABLE_PIN 29
#define ORIG_HEATER_1_PIN 1
#define ORIG_TEMP_1_PIN 1
#define ORIG_Z_STEP_PIN 37
#define ORIG_Z_DIR_PIN 39
#define ORIG_Z_MIN_PIN 19
#define ORIG_Z_MAX_PIN 18
#define ORIG_Z_ENABLE_PIN 35
#define ORIG_HEATER_2_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_HEATER_BED_PIN -1
#define ORIG_TEMP_BED_PIN -1
#define ORIG_E0_STEP_PIN 43
#define ORIG_E0_DIR_PIN 45
#define ORIG_E0_ENABLE_PIN 41
#define ORIG_HEATER_0_PIN 2
#define ORIG_TEMP_0_PIN 8
#define ORIG_E1_STEP_PIN -1
#define ORIG_E1_DIR_PIN -1
#define ORIG_E1_ENABLE_PIN -1
#define ORIG_HEATER_1_PIN 1
#define ORIG_TEMP_1_PIN 1
#define SDPOWER -1
#define SDSS -1
#define LED_PIN -1
#define ORIG_FAN_PIN -1
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
#define ORIG_HEATER_2_PIN -1
#define ORIG_TEMP_2_PIN -1
#define LCD_PINS_RS 24
#define LCD_PINS_ENABLE 22
#define LCD_PINS_D4 36
#define LCD_PINS_D5 34
#define LCD_PINS_D6 32
#define LCD_PINS_D7 30
#define ORIG_E0_STEP_PIN 43
#define ORIG_E0_DIR_PIN 45
#define ORIG_E0_ENABLE_PIN 41
#define ORIG_E1_STEP_PIN -1
#define ORIG_E1_DIR_PIN -1
#define ORIG_E1_ENABLE_PIN -1
#define SDPOWER -1
#define SDSS -1
#define LED_PIN -1
#define ORIG_FAN_PIN -1
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
#define LCD_PINS_RS 24
#define LCD_PINS_ENABLE 22
#define LCD_PINS_D4 36
#define LCD_PINS_D5 34
#define LCD_PINS_D6 32
#define LCD_PINS_D7 30
#endif // ULTIMAKER_OLD
/****************************************************************************************/
......
......@@ -528,16 +528,16 @@ float junction_deviation = 0.1;
}
#endif
float dx = target[X_AXIS] - position[X_AXIS],
long dx = target[X_AXIS] - position[X_AXIS],
dy = target[Y_AXIS] - position[Y_AXIS],
dz = target[Z_AXIS] - position[Z_AXIS],
de = target[E_AXIS] - position[E_AXIS];
#if MECH(COREXY)
float da = dx + COREX_YZ_FACTOR * dy;
float db = dx - COREX_YZ_FACTOR * dy;
long da = dx + COREX_YZ_FACTOR * dy;
long db = dx - COREX_YZ_FACTOR * dy;
#elif MECH(COREXZ)
float da = dx + COREX_YZ_FACTOR * dz;
float dc = dx - COREX_YZ_FACTOR * dz;
long da = dx + COREX_YZ_FACTOR * dz;
long dc = dx - COREX_YZ_FACTOR * dz;
#endif
#if ENABLED(PREVENT_DANGEROUS_EXTRUDE)
......@@ -1081,7 +1081,7 @@ float junction_deviation = 0.1;
apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
#endif
float nx = position[X_AXIS] = lround(x * axis_steps_per_unit[X_AXIS]),
long nx = position[X_AXIS] = lround(x * axis_steps_per_unit[X_AXIS]),
ny = position[Y_AXIS] = lround(y * axis_steps_per_unit[Y_AXIS]),
nz = position[Z_AXIS] = lround(z * axis_steps_per_unit[Z_AXIS]),
ne = position[E_AXIS] = lround(e * axis_steps_per_unit[E_AXIS + active_extruder]);
......
......@@ -304,7 +304,7 @@ void checkHitEndstops() {
}
void enable_endstops(bool check) {
if (debugLevel & DEBUG_INFO) {
if (debugLevel & DEBUG_DEBUG) {
ECHO_SM(DB, "setup_for_endstop_move > enable_endstops");
if (check) ECHO_EM("(true)");
else ECHO_EM("(false)");
......
......@@ -350,19 +350,10 @@ void autotempShutdown() {
// Every 2 seconds...
if (ms > temp_ms + 2000) {
int p;
if (hotend < 0) {
p = soft_pwm_bed;
ECHO_MV(MSG_B, input);
ECHO_MV(" /", temp, 1);
ECHO_EMV(" " MSG_AT, p);
}
else {
p = soft_pwm[hotend];
ECHO_MV(MSG_T, input, 1);
ECHO_MV(" /", temp, 1);
ECHO_EMV(" " MSG_AT, p);
}
#if HAS(TEMP_0) || HAS(TEMP_BED) || ENABLED(HEATER_0_USES_MAX6675)
print_heaterstates();
ECHO_E;
#endif
temp_ms = ms;
} // every 2 seconds
......@@ -775,34 +766,34 @@ void manage_heater() {
WRITE_HEATER_BED(LOW);
}
#endif
#endif //TEMP_SENSOR_BED != 0
#endif // TEMP_SENSOR_BED != 0
}
#define PGM_RD_W(x) (short)pgm_read_word(&x)
// Derived from RepRap FiveD extruder::getTemperature()
// For hot end temperature measurement.
static float analog2temp(int raw, uint8_t e) {
static float analog2temp(int raw, uint8_t h) {
#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
if (e > EXTRUDERS)
if (h > HOTENDS)
#else
if (e >= EXTRUDERS)
if (h >= HOTENDS)
#endif
{
ECHO_LVM(ER, (int)e, MSG_INVALID_EXTRUDER_NUM);
ECHO_LVM(ER, (int)h, MSG_INVALID_EXTRUDER_NUM);
kill(PSTR(MSG_KILLED));
return 0.0;
}
#if ENABLED(HEATER_0_USES_MAX6675)
if (e == 0) return 0.25 * raw;
if (h == 0) return 0.25 * raw;
#endif
if (heater_ttbl_map[e] != NULL) {
if (heater_ttbl_map[h] != NULL) {
float celsius = 0;
uint8_t i;
short(*tt)[][2] = (short(*)[][2])(heater_ttbl_map[e]);
short(*tt)[][2] = (short(*)[][2])(heater_ttbl_map[h]);
for (i = 1; i < heater_ttbllen_map[e]; i++) {
for (i = 1; i < heater_ttbllen_map[h]; i++) {
if (PGM_RD_W((*tt)[i][0]) > raw) {
celsius = PGM_RD_W((*tt)[i - 1][1]) +
(raw - PGM_RD_W((*tt)[i - 1][0])) *
......@@ -813,11 +804,14 @@ static float analog2temp(int raw, uint8_t e) {
}
// Overflow: Set to last value in the table
if (i == heater_ttbllen_map[e]) celsius = PGM_RD_W((*tt)[i - 1][1]);
if (i == heater_ttbllen_map[h]) celsius = PGM_RD_W((*tt)[i - 1][1]);
return celsius;
}
return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET;
#if HEATER_USES_AD595
return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * ad595_gain[h]) + ad595_offset[h];
#endif
}
// Derived from RepRap FiveD extruder::getTemperature()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment