Commit 305e2c45 authored by Simone Primarosa's avatar Simone Primarosa

Update 4.1.2 beta

NOT TESTED
parent f5e7693c
......@@ -23,10 +23,6 @@
#define MarlinSerial_h
#include "Marlin.h"
#ifndef SERIAL_PORT
#define SERIAL_PORT 0
#endif
// The presence of the UBRRH register is used to detect a UART.
#define UART_PRESENT(port) ((port == 0 && (defined(UBRRH) || defined(UBRR0H))) || \
(port == 1 && defined(UBRR1H)) || (port == 2 && defined(UBRR2H)) || \
......
......@@ -290,7 +290,11 @@ const int sensitive_pins[] = SENSITIVE_PINS; ///< Sensitive pin list for M42
// Inactivity shutdown
millis_t previous_cmd_ms = 0;
static millis_t max_inactive_time = 0;
static millis_t stepper_inactive_time = DEFAULT_STEPPER_DEACTIVE_TIME * 1000L;
#if ENABLED(DEFAULT_STEPPER_DEACTIVE_TIME)
static millis_t stepper_inactive_time = DEFAULT_STEPPER_DEACTIVE_TIME * 1000L;
#else
static millis_t stepper_inactive_time = 0;
#endif
millis_t print_job_start_ms = 0; ///< Print job start time
millis_t print_job_stop_ms = 0; ///< Print job stop time
static uint8_t target_extruder;
......@@ -5151,7 +5155,11 @@ inline void gcode_M140() {
case 0:
if (code_seen('H')) {
v = code_value_short();
#if ENABLED(PREVENT_DANGEROUS_EXTRUDE)
plaPreheatHotendTemp = constrain(v, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - 15);
#else
plaPreheatHotendTemp = constrain(v, HEATER_0_MINTEMP, HEATER_0_MAXTEMP - 15);
#endif
}
if (code_seen('F')) {
v = code_value_short();
......@@ -5167,7 +5175,11 @@ inline void gcode_M140() {
case 1:
if (code_seen('H')) {
v = code_value_short();
#if ENABLED(PREVENT_DANGEROUS_EXTRUDE)
absPreheatHotendTemp = constrain(v, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - 15);
#else
absPreheatHotendTemp = constrain(v, HEATER_0_MINTEMP, HEATER_0_MAXTEMP - 15);
#endif
}
if (code_seen('F')) {
v = code_value_short();
......@@ -5183,7 +5195,11 @@ inline void gcode_M140() {
case 2:
if (code_seen('H')) {
v = code_value_short();
#if ENABLED(PREVENT_DANGEROUS_EXTRUDE)
gumPreheatHotendTemp = constrain(v, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - 15);
#else
gumPreheatHotendTemp = constrain(v, HEATER_0_MINTEMP, HEATER_0_MAXTEMP - 15);
#endif
}
if (code_seen('F')) {
v = code_value_short();
......@@ -7102,7 +7118,7 @@ void ok_to_send() {
}
void clamp_to_software_endstops(float target[3]) {
if (min_software_endstops) {
if (SOFTWARE_MIN_ENDSTOPS) {
NOLESS(target[X_AXIS], min_pos[X_AXIS]);
NOLESS(target[Y_AXIS], min_pos[Y_AXIS]);
......@@ -7114,7 +7130,7 @@ void clamp_to_software_endstops(float target[3]) {
NOLESS(target[Z_AXIS], min_pos[Z_AXIS] + negative_z_offset);
}
if (max_software_endstops) {
if (SOFTWARE_MAX_ENDSTOPS) {
NOMORE(target[X_AXIS], max_pos[X_AXIS]);
NOMORE(target[Y_AXIS], max_pos[Y_AXIS]);
NOMORE(target[Z_AXIS], max_pos[Z_AXIS]);
......
......@@ -151,7 +151,7 @@
// Use it for Testing or Development purposes. NEVER for production machine.
//#define DUMMY_THERMISTOR_998_VALUE 25
//#define DUMMY_THERMISTOR_999_VALUE 100
//#define DUMMY_THERMISTOR_999_VALUE 25
//Show Temperature ADC value
//The M105 command return, besides traditional information, the ADC value read from temperature sensors.
......@@ -233,7 +233,7 @@
* 14 Portuguese (Brazil) *
* *
***********************************************************************/
#define LANGUAGE_CHOICE 7
#define LANGUAGE_CHOICE 1
/***********************************************************************/
......
......@@ -313,7 +313,7 @@
// Multiple extruders can be assigned to the same pin in which case
// the fan will turn on when any selected extruder is above the threshold.
// You need to set _AUTO_FAN_PIN in pins.h
//#define EXTRUDER_AUTO_TEMPERATURE
//#define EXTRUDER_AUTO_FAN
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 = full speed
#define EXTRUDER_AUTO_FAN_MIN_SPEED 0
......@@ -419,8 +419,7 @@
* *
***********************************************************************/
//#define IDLE_OOZING_PREVENT
#define IDLE_OOZING_MINTEMP EXTRUDE_MINTEMP + 5
#define IDLE_OOZING_MAXTEMP IDLE_OOZING_MINTEMP + 5
#define IDLE_OOZING_MINTEMP 190
#define IDLE_OOZING_FEEDRATE 50 //default feedrate for retracting (mm/s)
#define IDLE_OOZING_SECONDS 5
#define IDLE_OOZING_LENGTH 15 //default retract length (positive mm)
......@@ -476,6 +475,8 @@
* Hooke's law says: force = k * distance *
* Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant *
* so: v ^ 2 is proportional to number of steps we advance the extruder *
* *
* This feature is obsolate needs update *
* Uncomment ADVANCE to enable this feature *
* *
*****************************************************************************************/
......@@ -515,8 +516,8 @@
/**************************************************************************
*************************** Software endstops ****************************
**************************************************************************/
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
#define SOFTWARE_MIN_ENDSTOPS true // If true, axis won't move to coordinates less than HOME_POS.
#define SOFTWARE_MAX_ENDSTOPS true // If true, axis won't move to coordinates greater than the defined lengths below.
/***********************************************************************/
......@@ -752,7 +753,7 @@
* *
**************************************************************************/
//#define BABYSTEPPING
#define BABYSTEP_XY // not only z, but also XY in the menu. more clutter, more functions
//#define BABYSTEP_XY // not only z, but also XY in the menu. more clutter, more functions
// not implemented for CoreXY and deltabots!
#define BABYSTEP_INVERT_Z false // true for inverse movements in Z
#define BABYSTEP_Z_MULTIPLICATOR 2 // faster z movements
......@@ -810,11 +811,6 @@
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
#define X2_ENABLE_PIN 29
#define X2_STEP_PIN 25
#define X2_DIR_PIN 23
// There are a few selectable movement modes for dual x-carriages using M605 S<mode>
// Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
// as long as it supports dual x-carriages. (M605 S0)
......@@ -849,7 +845,7 @@
* On a RAMPS (or other 5 driver) motherboard, using this feature will limit you *
* to using 1 extruder. *
* *
* Uncomment DUAL_X_CARRIAGE to enable this feature *
* Uncomment Y_DUAL_STEPPER_DRIVERS to enable this feature *
* *
*****************************************************************************************/
//#define Y_DUAL_STEPPER_DRIVERS
......@@ -872,7 +868,7 @@
* On a RAMPS (or other 5 driver) motherboard, using this feature will limit you *
* to using 1 extruder. *
* *
* Uncomment DUAL_X_CARRIAGE to enable this feature *
* Uncomment Z_DUAL_STEPPER_DRIVERS to enable this feature *
* *
*****************************************************************************************/
//#define Z_DUAL_STEPPER_DRIVERS
......@@ -1115,7 +1111,6 @@
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
#define SPLASH_SCREEN_DURATION 5000 // SPLASH SCREEN duration in millisecond
#define LCD_SCREEN_ROT_0 //No screen rotation for graphics display
//#define LCD_SCREEN_ROT_90 //Rotate screen orientation for graphics display by 90 degree clockwise
//#define LCD_SCREEN_ROT_180 //Rotate screen orientation for graphics display by 180 degree clockwise
//#define LCD_SCREEN_ROT_270 //Rotate screen orientation for graphics display by 270 degree clockwise
......@@ -1383,8 +1378,6 @@
***********************************************************************/
//#define HAVE_TMCDRIVER
#if ENABLED(HAVE_TMCDRIVER)
//#define X_IS_TMC
#define X_MAX_CURRENT 1000 //in mA
#define X_SENSE_RESISTOR 91 //in mOhms
......@@ -1493,21 +1486,18 @@
//#define E1_IS_L6470
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_MICROSTEPS 16 //number of microsteps
#define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
//#define E2_IS_L6470
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_MICROSTEPS 16 //number of microsteps
#define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
//#define E3_IS_L6470
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_MICROSTEPS 16 //number of microsteps
#define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high
#define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off
#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
......@@ -1533,7 +1523,7 @@
// The values should not be less than 1
#define NUM_POSITON_SLOTS 2
#define dropsegments 5 // everything with less than this number of steps will be ignored as move and joined with the next movement
#define DROP_SEGMENTS 5 // everything with less than this number of steps will be ignored as move and joined with the next movement
#define DEFAULT_MINSEGMENTTIME 20000 // minimum time in microseconds that a movement needs to take if the buffer is emptied.
// Arc interpretation settings:
......
This diff is collapsed.
......@@ -66,10 +66,6 @@
#define BUILD_VERSION "V4; MarlinKimbra for 4 extruder"
#endif
#if DISABLED(MACHINE_UUID)
#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
#endif
#define STRINGIFY_(n) #n
#define STRINGIFY(n) STRINGIFY_(n)
......
......@@ -2514,7 +2514,6 @@
#define SDPOWER -1
#define SDSS 77 // PA28
#define SD_DETECT_PIN 87 // PA29
#define SD_DETECT_INVERTED false
#define LED_PIN -1
#define ORIG_FAN_PIN 92 // PA5
......@@ -2741,11 +2740,6 @@
#define DOGLCD_CS 29
#define LCD_CONTRAST 1
#endif
// Uncomment screen orientation
#define LCD_SCREEN_ROT_0
// #define LCD_SCREEN_ROT_90
// #define LCD_SCREEN_ROT_180
// #define LCD_SCREEN_ROT_270
#else // standard Hitachi LCD controller
#define LCD_PINS_RS 4
#define LCD_PINS_ENABLE 17
......@@ -2782,11 +2776,6 @@
#define LCD_PIN_BL 28 // backlight LED on PA3
// GLCD features
#define LCD_CONTRAST 1
// Uncomment screen orientation
#define LCD_SCREEN_ROT_0
// #define LCD_SCREEN_ROT_90
// #define LCD_SCREEN_ROT_180
// #define LCD_SCREEN_ROT_270
//The encoder and click button
#define BTN_EN1 11
#define BTN_EN2 10
......
......@@ -591,7 +591,7 @@ float junction_deviation = 0.1;
block->step_event_count = max(block->steps[X_AXIS], max(block->steps[Y_AXIS], max(block->steps[Z_AXIS], block->steps[E_AXIS])));
// Bail if this is a zero-length block
if (block->step_event_count <= dropsegments) return;
if (block->step_event_count <= DROP_SEGMENTS) return;
block->fan_speed = fanSpeed;
#if ENABLED(BARICUDA)
......@@ -769,7 +769,7 @@ float junction_deviation = 0.1;
#endif
delta_mm[E_AXIS] = (de / axis_steps_per_unit[E_AXIS + extruder]) * volumetric_multiplier[extruder] * extruder_multiplier[extruder] / 100.0;
if (block->steps[X_AXIS] <= dropsegments && block->steps[Y_AXIS] <= dropsegments && block->steps[Z_AXIS] <= dropsegments) {
if (block->steps[X_AXIS] <= DROP_SEGMENTS && block->steps[Y_AXIS] <= DROP_SEGMENTS && block->steps[Z_AXIS] <= DROP_SEGMENTS) {
block->millimeters = fabs(delta_mm[E_AXIS]);
}
else {
......
......@@ -673,7 +673,7 @@ ISR(TIMER1_COMPA_vect) {
STEP_START(e,E);
#endif
#if ENABLED(STEPPER_HIGH_LOW_DELAY)
#if ENABLED(STEPPER_HIGH_LOW_DELAY) && STEPPER_HIGH_LOW_DELAY > 0
delayMicroseconds(STEPPER_HIGH_LOW_DELAY);
#endif
......
......@@ -178,10 +178,6 @@ static void updateTemperaturesFromRawValues();
millis_t watch_heater_next_ms[HOTENDS] = { 0 };
#endif
#if DISABLED(SOFT_PWM_SCALE)
#define SOFT_PWM_SCALE 0
#endif
#if ENABLED(FILAMENT_SENSOR)
static int meas_shift_index; //used to point to a delayed sample in buffer for filament width sensor
#endif
......@@ -751,7 +747,24 @@ static float analog2temp(int raw, uint8_t e) {
return celsius;
}
return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET;
switch(e) {
#if TEMP_SENSOR_BED
case -1: return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET;
#endif
#if HEATER_0_USES_AD595
case 0: return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET;
#endif
#if HEATER_1_USES_AD595
case 1: return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET;
#endif
#if HEATER_2_USES_AD595
case 2: return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET;
#endif
#if HEATER_3_USES_AD595
case 3: return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET;
#endif
}
return (raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR);
}
// Derived from RepRap FiveD extruder::getTemperature()
......
......@@ -1070,7 +1070,7 @@ const short temptable_1047[][2] PROGMEM = {
#if (THERMISTORHEATER_0 == 998) || (THERMISTORHEATER_1 == 998) || (THERMISTORHEATER_2 == 998) || (THERMISTORHEATER_3 == 998) || (THERMISTORBED == 998) //User defined table
// Dummy Thermistor table.. It will ALWAYS read a fixed value.
#if DISABLED(UMMY_THERMISTOR_998_VALUE)
#if DISABLED(DUMMY_THERMISTOR_998_VALUE)
#define DUMMY_THERMISTOR_998_VALUE 25
#endif
const short temptable_998[][2] PROGMEM = {
......
......@@ -929,8 +929,8 @@ static void _lcd_move(const char *name, AxisEnum axis, int min, int max) {
if (encoderPosition != 0) {
refresh_cmd_timeout();
current_position[axis] += float((int)encoderPosition) * move_menu_scale;
if (min_software_endstops && current_position[axis] < min) current_position[axis] = min;
if (max_software_endstops && current_position[axis] > max) current_position[axis] = max;
if (SOFTWARE_MIN_ENDSTOPS && current_position[axis] < min) current_position[axis] = min;
if (SOFTWARE_MAX_ENDSTOPS && current_position[axis] > max) current_position[axis] = max;
encoderPosition = 0;
line_to_current(manual_feedrate[axis]);
lcdDrawUpdate = 1;
......
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