Commit 5d18bac2 authored by MagoKimbra's avatar MagoKimbra

Change extruder_offset to hotend_offset

parent bdb02412
......@@ -70,7 +70,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size)
EEPROM_WRITE_VAR(i, zprobe_zoffset);
#if EXTRUDERS > 1 && !defined SINGLENOZZLE
EEPROM_WRITE_VAR(i, extruder_offset);
EEPROM_WRITE_VAR(i, hotend_offset);
#endif
#ifdef DELTA
......@@ -176,7 +176,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size)
EEPROM_READ_VAR(i,zprobe_zoffset);
#if EXTRUDERS > 1 && !defined SINGLENOZZLE
EEPROM_READ_VAR(i, extruder_offset);
EEPROM_READ_VAR(i, hotend_offset);
#endif
#ifdef DELTA
......@@ -300,8 +300,8 @@ void Config_ResetDefault()
{
max_retraction_feedrate[i] = tmp3[i];
#if EXTRUDERS > 1 && !defined SINGLENOZZLE
extruder_offset[X_AXIS][i] = tmp8[i];
extruder_offset[Y_AXIS][i] = tmp9[i];
hotend_offset[X_AXIS][i] = tmp8[i];
hotend_offset[Y_AXIS][i] = tmp9[i];
#endif
#ifdef SCARA
axis_scaling[i] = 1;
......@@ -513,8 +513,8 @@ void Config_ResetDefault()
for (int e = 0; e < EXTRUDERS; e++) {
SERIAL_ECHO_START;
SERIAL_ECHOPAIR(" M218 T", (long unsigned int)e);
SERIAL_ECHOPAIR(" X", extruder_offset[X_AXIS][e]);
SERIAL_ECHOPAIR(" Y" ,extruder_offset[Y_AXIS][e]);
SERIAL_ECHOPAIR(" X", hotend_offset[X_AXIS][e]);
SERIAL_ECHOPAIR(" Y" ,hotend_offset[Y_AXIS][e]);
SERIAL_EOL;
}
#endif //EXTRUDERS > 1 && !defined SINGLENOZZLE
......
......@@ -217,8 +217,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
// For the other hotends it is their distance from the extruder 0 hotend.
//#define EXTRUDER_OFFSET_X {0.0, 5.00, 0.0, 0.0} // (in mm) for each extruder, offset of the hotend on the X axis
//#define EXTRUDER_OFFSET_Y {0.0, 5.00, 0.0, 0.0} // (in mm) for each extruder, offset of the hotend on the Y axis
//#define HOTEND_OFFSET_X {0.0, 5.00, 0.0, 0.0} // (in mm) for each extruder, offset of the hotend on the X axis
//#define HOTEND_OFFSET_Y {0.0, 5.00, 0.0, 0.0} // (in mm) for each extruder, offset of the hotend on the Y axis
// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
#define DEFAULT_XYJERK 10.0 // (mm/sec)
......
......@@ -250,11 +250,11 @@ extern float add_homing[3];
#if EXTRUDERS > 1
#ifndef SINGLENOZZLE
#ifndef DUAL_X_CARRIAGE
#define NUM_EXTRUDER_OFFSETS 2 // only in XY plane
#define NUM_HOTEND_OFFSETS 2 // only in XY plane
#else
#define NUM_EXTRUDER_OFFSETS 3 // supports offsets in XYZ plane
#define NUM_HOTEND_OFFSETS 3 // supports offsets in XYZ plane
#endif
extern float extruder_offset[NUM_EXTRUDER_OFFSETS][EXTRUDERS];
extern float hotend_offset[NUM_HOTEND_OFFSETS][EXTRUDERS];
#endif // end SINGLENOZZLE
#endif // end EXTRUDERS
......
......@@ -292,7 +292,7 @@ float lastpos[4];
#else
#define NUM_EXTRUDER_OFFSETS 3 // supports offsets in XYZ plane
#endif
float extruder_offset[NUM_EXTRUDER_OFFSETS][EXTRUDERS];
float hotend_offset[NUM_EXTRUDER_OFFSETS][EXTRUDERS];
#endif // end SINGLENOZZLE
#endif // end EXTRUDERS
......@@ -1000,7 +1000,7 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
// second X-carriage offset when homed - otherwise X2_HOME_POS is used.
// This allow soft recalibration of the second extruder offset position without firmware reflash
// (through the M218 command).
return (extruder_offset[X_AXIS][1] > 0) ? extruder_offset[X_AXIS][1] : X2_HOME_POS;
return (hotend_offset[X_AXIS][1] > 0) ? hotend_offset[X_AXIS][1] : X2_HOME_POS;
}
}
......@@ -1028,7 +1028,7 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
{
current_position[X_AXIS] = x_home_pos(active_extruder);
min_pos[X_AXIS] = X2_MIN_POS;
max_pos[X_AXIS] = max(extruder_offset[X_AXIS][1], X2_MAX_POS);
max_pos[X_AXIS] = max(hotend_offset[X_AXIS][1], X2_MAX_POS);
return;
}
else if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0)
......@@ -1036,7 +1036,7 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
current_position[X_AXIS] = base_home_pos(X_AXIS) + add_homing[X_AXIS];
min_pos[X_AXIS] = base_min_pos(X_AXIS) + add_homing[X_AXIS];
max_pos[X_AXIS] = min(base_max_pos(X_AXIS) + add_homing[X_AXIS],
max(extruder_offset[X_AXIS][1], X2_MAX_POS) - duplicate_extruder_x_offset);
max(hotend_offset[X_AXIS][1], X2_MAX_POS) - duplicate_extruder_x_offset);
return;
}
}
......@@ -4640,16 +4640,16 @@ void process_commands()
if(setTargetedHotend(218)) break;
if(code_seen('X'))
{
extruder_offset[X_AXIS][tmp_extruder] = code_value();
hotend_offset[X_AXIS][tmp_extruder] = code_value();
}
if(code_seen('Y'))
{
extruder_offset[Y_AXIS][tmp_extruder] = code_value();
hotend_offset[Y_AXIS][tmp_extruder] = code_value();
}
#ifdef DUAL_X_CARRIAGE
if(code_seen('Z'))
{
extruder_offset[Z_AXIS][tmp_extruder] = code_value();
hotend_offset[Z_AXIS][tmp_extruder] = code_value();
}
#endif
SERIAL_ECHO_START;
......@@ -4657,12 +4657,12 @@ void process_commands()
for(tmp_extruder = 0; tmp_extruder < EXTRUDERS; tmp_extruder++)
{
SERIAL_ECHO(" ");
SERIAL_ECHO(extruder_offset[X_AXIS][tmp_extruder]);
SERIAL_ECHO(hotend_offset[X_AXIS][tmp_extruder]);
SERIAL_ECHO(",");
SERIAL_ECHO(extruder_offset[Y_AXIS][tmp_extruder]);
SERIAL_ECHO(hotend_offset[Y_AXIS][tmp_extruder]);
#ifdef DUAL_X_CARRIAGE
SERIAL_ECHO(",");
SERIAL_ECHO(extruder_offset[Z_AXIS][tmp_extruder]);
SERIAL_ECHO(hotend_offset[Z_AXIS][tmp_extruder]);
#endif
}
SERIAL_EOL;
......@@ -5231,13 +5231,13 @@ void process_commands()
SERIAL_ECHO_START;
SERIAL_ECHOPGM(MSG_HOTEND_OFFSET);
SERIAL_ECHO(" ");
SERIAL_ECHO(extruder_offset[X_AXIS][0]);
SERIAL_ECHO(hotend_offset[X_AXIS][0]);
SERIAL_ECHO(",");
SERIAL_ECHO(extruder_offset[Y_AXIS][0]);
SERIAL_ECHO(hotend_offset[Y_AXIS][0]);
SERIAL_ECHO(" ");
SERIAL_ECHO(duplicate_extruder_x_offset);
SERIAL_ECHO(",");
SERIAL_ECHOLN(extruder_offset[Y_AXIS][1]);
SERIAL_ECHOLN(hotend_offset[Y_AXIS][1]);
}
else if (dual_x_carriage_mode != DXC_FULL_CONTROL_MODE && dual_x_carriage_mode != DXC_AUTO_PARK_MODE)
{
......@@ -5367,11 +5367,11 @@ void process_commands()
// apply Y & Z extruder offset (x offset is already used in determining home pos)
current_position[Y_AXIS] = current_position[Y_AXIS] -
extruder_offset[Y_AXIS][active_extruder] +
extruder_offset[Y_AXIS][tmp_extruder];
hotend_offset[Y_AXIS][active_extruder] +
hotend_offset[Y_AXIS][tmp_extruder];
current_position[Z_AXIS] = current_position[Z_AXIS] -
extruder_offset[Z_AXIS][active_extruder] +
extruder_offset[Z_AXIS][tmp_extruder];
hotend_offset[Z_AXIS][active_extruder] +
hotend_offset[Z_AXIS][tmp_extruder];
active_extruder = tmp_extruder;
......@@ -5408,8 +5408,8 @@ void process_commands()
for(i = 0; i < 2; i++)
{
current_position[i] = current_position[i] -
extruder_offset[i][active_extruder] +
extruder_offset[i][tmp_extruder];
hotend_offset[i][active_extruder] +
hotend_offset[i][tmp_extruder];
}
#endif // SINGLENOZZLE
......
......@@ -42,7 +42,7 @@
DestinationSpeed[s_, a_, d_] := Sqrt[2 a d + s^2]
When to start braking (di) to reach a specified destionation speed (s2) after accelerating
When to start braking (di) to reach a specified destination speed (s2) after accelerating
from initial speed s1 without ever stopping at a plateau:
Solve[{DestinationSpeed[s1, a, di] == DestinationSpeed[s2, a, d - di]}, di]
......
......@@ -43,7 +43,7 @@ block_t *current_block; // A pointer to the block currently being traced
//===========================================================================
//=============================private variables ============================
//===========================================================================
//static makes it inpossible to be called from outside of this file by extern.!
//static makes it impossible to be called from outside of this file by extern.!
// Variables used by The Stepper Driver Interrupt
static unsigned char out_bits; // The next stepping-bits to be output
......@@ -59,7 +59,7 @@ volatile static unsigned long step_events_completed; // The number of step event
#endif
static long acceleration_time, deceleration_time;
//static unsigned long accelerate_until, decelerate_after, acceleration_rate, initial_rate, final_rate, nominal_rate;
static unsigned short acc_step_rate; // needed for deccelaration start point
static unsigned short acc_step_rate; // needed for deceleration start point
static char step_loops;
static unsigned short OCR1A_nominal;
static unsigned short step_loops_nominal;
......@@ -95,7 +95,7 @@ volatile long count_position[NUM_AXIS] = { 0, 0, 0, 0};
volatile signed char count_direction[NUM_AXIS] = { 1, 1, 1, 1};
//===========================================================================
//=============================functions ============================
//============================ Functions ====================================
//===========================================================================
#define CHECK_ENDSTOPS if(check_endstops)
......@@ -292,7 +292,7 @@ void enable_endstops(bool check)
// The trapezoid is the shape the speed curve over time. It starts at block->initial_rate, accelerates
// first block->accelerate_until step_events_completed, then keeps going at constant speed until
// step_events_completed reaches block->decelerate_after after which it decelerates until the trapezoid generator is reset.
// The slope of acceleration is calculated with the leib ramp alghorithm.
// The slope of acceleration is calculated with the lib ramp algorithm.
void st_wake_up() {
// TCNT1 = 0;
......
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