Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MarlinKimbra
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
MarlinKimbra
Commits
5d18bac2
Commit
5d18bac2
authored
Feb 19, 2015
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change extruder_offset to hotend_offset
parent
bdb02412
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
35 deletions
+35
-35
ConfigurationStore.cpp
MarlinKimbra/ConfigurationStore.cpp
+6
-6
Configuration_Cartesian.h
MarlinKimbra/Configuration_Cartesian.h
+2
-2
Marlin.h
MarlinKimbra/Marlin.h
+3
-3
Marlin_main.cpp
MarlinKimbra/Marlin_main.cpp
+19
-19
planner.cpp
MarlinKimbra/planner.cpp
+1
-1
stepper.cpp
MarlinKimbra/stepper.cpp
+4
-4
No files found.
MarlinKimbra/ConfigurationStore.cpp
View file @
5d18bac2
...
@@ -70,7 +70,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size)
...
@@ -70,7 +70,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size)
EEPROM_WRITE_VAR
(
i
,
zprobe_zoffset
);
EEPROM_WRITE_VAR
(
i
,
zprobe_zoffset
);
#if EXTRUDERS > 1 && !defined SINGLENOZZLE
#if EXTRUDERS > 1 && !defined SINGLENOZZLE
EEPROM_WRITE_VAR
(
i
,
extruder
_offset
);
EEPROM_WRITE_VAR
(
i
,
hotend
_offset
);
#endif
#endif
#ifdef DELTA
#ifdef DELTA
...
@@ -176,7 +176,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size)
...
@@ -176,7 +176,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size)
EEPROM_READ_VAR
(
i
,
zprobe_zoffset
);
EEPROM_READ_VAR
(
i
,
zprobe_zoffset
);
#if EXTRUDERS > 1 && !defined SINGLENOZZLE
#if EXTRUDERS > 1 && !defined SINGLENOZZLE
EEPROM_READ_VAR
(
i
,
extruder
_offset
);
EEPROM_READ_VAR
(
i
,
hotend
_offset
);
#endif
#endif
#ifdef DELTA
#ifdef DELTA
...
@@ -300,8 +300,8 @@ void Config_ResetDefault()
...
@@ -300,8 +300,8 @@ void Config_ResetDefault()
{
{
max_retraction_feedrate
[
i
]
=
tmp3
[
i
];
max_retraction_feedrate
[
i
]
=
tmp3
[
i
];
#if EXTRUDERS > 1 && !defined SINGLENOZZLE
#if EXTRUDERS > 1 && !defined SINGLENOZZLE
extruder
_offset
[
X_AXIS
][
i
]
=
tmp8
[
i
];
hotend
_offset
[
X_AXIS
][
i
]
=
tmp8
[
i
];
extruder
_offset
[
Y_AXIS
][
i
]
=
tmp9
[
i
];
hotend
_offset
[
Y_AXIS
][
i
]
=
tmp9
[
i
];
#endif
#endif
#ifdef SCARA
#ifdef SCARA
axis_scaling
[
i
]
=
1
;
axis_scaling
[
i
]
=
1
;
...
@@ -513,8 +513,8 @@ void Config_ResetDefault()
...
@@ -513,8 +513,8 @@ void Config_ResetDefault()
for
(
int
e
=
0
;
e
<
EXTRUDERS
;
e
++
)
{
for
(
int
e
=
0
;
e
<
EXTRUDERS
;
e
++
)
{
SERIAL_ECHO_START
;
SERIAL_ECHO_START
;
SERIAL_ECHOPAIR
(
" M218 T"
,
(
long
unsigned
int
)
e
);
SERIAL_ECHOPAIR
(
" M218 T"
,
(
long
unsigned
int
)
e
);
SERIAL_ECHOPAIR
(
" X"
,
extruder
_offset
[
X_AXIS
][
e
]);
SERIAL_ECHOPAIR
(
" X"
,
hotend
_offset
[
X_AXIS
][
e
]);
SERIAL_ECHOPAIR
(
" Y"
,
extruder
_offset
[
Y_AXIS
][
e
]);
SERIAL_ECHOPAIR
(
" Y"
,
hotend
_offset
[
Y_AXIS
][
e
]);
SERIAL_EOL
;
SERIAL_EOL
;
}
}
#endif //EXTRUDERS > 1 && !defined SINGLENOZZLE
#endif //EXTRUDERS > 1 && !defined SINGLENOZZLE
...
...
MarlinKimbra/Configuration_Cartesian.h
View file @
5d18bac2
...
@@ -217,8 +217,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
...
@@ -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).
// 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).
// 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.
// 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
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
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_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)
// 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)
#define DEFAULT_XYJERK 10.0 // (mm/sec)
...
...
MarlinKimbra/Marlin.h
View file @
5d18bac2
...
@@ -250,11 +250,11 @@ extern float add_homing[3];
...
@@ -250,11 +250,11 @@ extern float add_homing[3];
#if EXTRUDERS > 1
#if EXTRUDERS > 1
#ifndef SINGLENOZZLE
#ifndef SINGLENOZZLE
#ifndef DUAL_X_CARRIAGE
#ifndef DUAL_X_CARRIAGE
#define NUM_
EXTRUDER
_OFFSETS 2 // only in XY plane
#define NUM_
HOTEND
_OFFSETS 2 // only in XY plane
#else
#else
#define NUM_
EXTRUDER
_OFFSETS 3 // supports offsets in XYZ plane
#define NUM_
HOTEND
_OFFSETS 3 // supports offsets in XYZ plane
#endif
#endif
extern
float
extruder_offset
[
NUM_EXTRUDER
_OFFSETS
][
EXTRUDERS
];
extern
float
hotend_offset
[
NUM_HOTEND
_OFFSETS
][
EXTRUDERS
];
#endif // end SINGLENOZZLE
#endif // end SINGLENOZZLE
#endif // end EXTRUDERS
#endif // end EXTRUDERS
...
...
MarlinKimbra/Marlin_main.cpp
View file @
5d18bac2
...
@@ -292,7 +292,7 @@ float lastpos[4];
...
@@ -292,7 +292,7 @@ float lastpos[4];
#else
#else
#define NUM_EXTRUDER_OFFSETS 3 // supports offsets in XYZ plane
#define NUM_EXTRUDER_OFFSETS 3 // supports offsets in XYZ plane
#endif
#endif
float
extruder
_offset
[
NUM_EXTRUDER_OFFSETS
][
EXTRUDERS
];
float
hotend
_offset
[
NUM_EXTRUDER_OFFSETS
][
EXTRUDERS
];
#endif // end SINGLENOZZLE
#endif // end SINGLENOZZLE
#endif // end EXTRUDERS
#endif // end EXTRUDERS
...
@@ -1000,7 +1000,7 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
...
@@ -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.
// 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
// This allow soft recalibration of the second extruder offset position without firmware reflash
// (through the M218 command).
// (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);
...
@@ -1028,7 +1028,7 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
{
{
current_position
[
X_AXIS
]
=
x_home_pos
(
active_extruder
);
current_position
[
X_AXIS
]
=
x_home_pos
(
active_extruder
);
min_pos
[
X_AXIS
]
=
X2_MIN_POS
;
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
;
return
;
}
}
else
if
(
dual_x_carriage_mode
==
DXC_DUPLICATION_MODE
&&
active_extruder
==
0
)
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);
...
@@ -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
];
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
];
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_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
;
return
;
}
}
}
}
...
@@ -4640,16 +4640,16 @@ void process_commands()
...
@@ -4640,16 +4640,16 @@ void process_commands()
if
(
setTargetedHotend
(
218
))
break
;
if
(
setTargetedHotend
(
218
))
break
;
if
(
code_seen
(
'X'
))
if
(
code_seen
(
'X'
))
{
{
extruder
_offset
[
X_AXIS
][
tmp_extruder
]
=
code_value
();
hotend
_offset
[
X_AXIS
][
tmp_extruder
]
=
code_value
();
}
}
if
(
code_seen
(
'Y'
))
if
(
code_seen
(
'Y'
))
{
{
extruder
_offset
[
Y_AXIS
][
tmp_extruder
]
=
code_value
();
hotend
_offset
[
Y_AXIS
][
tmp_extruder
]
=
code_value
();
}
}
#ifdef DUAL_X_CARRIAGE
#ifdef DUAL_X_CARRIAGE
if
(
code_seen
(
'Z'
))
if
(
code_seen
(
'Z'
))
{
{
extruder
_offset
[
Z_AXIS
][
tmp_extruder
]
=
code_value
();
hotend
_offset
[
Z_AXIS
][
tmp_extruder
]
=
code_value
();
}
}
#endif
#endif
SERIAL_ECHO_START
;
SERIAL_ECHO_START
;
...
@@ -4657,12 +4657,12 @@ void process_commands()
...
@@ -4657,12 +4657,12 @@ void process_commands()
for
(
tmp_extruder
=
0
;
tmp_extruder
<
EXTRUDERS
;
tmp_extruder
++
)
for
(
tmp_extruder
=
0
;
tmp_extruder
<
EXTRUDERS
;
tmp_extruder
++
)
{
{
SERIAL_ECHO
(
" "
);
SERIAL_ECHO
(
" "
);
SERIAL_ECHO
(
extruder
_offset
[
X_AXIS
][
tmp_extruder
]);
SERIAL_ECHO
(
hotend
_offset
[
X_AXIS
][
tmp_extruder
]);
SERIAL_ECHO
(
","
);
SERIAL_ECHO
(
","
);
SERIAL_ECHO
(
extruder
_offset
[
Y_AXIS
][
tmp_extruder
]);
SERIAL_ECHO
(
hotend
_offset
[
Y_AXIS
][
tmp_extruder
]);
#ifdef DUAL_X_CARRIAGE
#ifdef DUAL_X_CARRIAGE
SERIAL_ECHO
(
","
);
SERIAL_ECHO
(
","
);
SERIAL_ECHO
(
extruder
_offset
[
Z_AXIS
][
tmp_extruder
]);
SERIAL_ECHO
(
hotend
_offset
[
Z_AXIS
][
tmp_extruder
]);
#endif
#endif
}
}
SERIAL_EOL
;
SERIAL_EOL
;
...
@@ -5231,13 +5231,13 @@ void process_commands()
...
@@ -5231,13 +5231,13 @@ void process_commands()
SERIAL_ECHO_START
;
SERIAL_ECHO_START
;
SERIAL_ECHOPGM
(
MSG_HOTEND_OFFSET
);
SERIAL_ECHOPGM
(
MSG_HOTEND_OFFSET
);
SERIAL_ECHO
(
" "
);
SERIAL_ECHO
(
" "
);
SERIAL_ECHO
(
extruder
_offset
[
X_AXIS
][
0
]);
SERIAL_ECHO
(
hotend
_offset
[
X_AXIS
][
0
]);
SERIAL_ECHO
(
","
);
SERIAL_ECHO
(
","
);
SERIAL_ECHO
(
extruder
_offset
[
Y_AXIS
][
0
]);
SERIAL_ECHO
(
hotend
_offset
[
Y_AXIS
][
0
]);
SERIAL_ECHO
(
" "
);
SERIAL_ECHO
(
" "
);
SERIAL_ECHO
(
duplicate_extruder_x_offset
);
SERIAL_ECHO
(
duplicate_extruder_x_offset
);
SERIAL_ECHO
(
","
);
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
)
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()
...
@@ -5367,11 +5367,11 @@ void process_commands()
// apply Y & Z extruder offset (x offset is already used in determining home pos)
// apply Y & Z extruder offset (x offset is already used in determining home pos)
current_position
[
Y_AXIS
]
=
current_position
[
Y_AXIS
]
-
current_position
[
Y_AXIS
]
=
current_position
[
Y_AXIS
]
-
extruder
_offset
[
Y_AXIS
][
active_extruder
]
+
hotend
_offset
[
Y_AXIS
][
active_extruder
]
+
extruder
_offset
[
Y_AXIS
][
tmp_extruder
];
hotend
_offset
[
Y_AXIS
][
tmp_extruder
];
current_position
[
Z_AXIS
]
=
current_position
[
Z_AXIS
]
-
current_position
[
Z_AXIS
]
=
current_position
[
Z_AXIS
]
-
extruder
_offset
[
Z_AXIS
][
active_extruder
]
+
hotend
_offset
[
Z_AXIS
][
active_extruder
]
+
extruder
_offset
[
Z_AXIS
][
tmp_extruder
];
hotend
_offset
[
Z_AXIS
][
tmp_extruder
];
active_extruder
=
tmp_extruder
;
active_extruder
=
tmp_extruder
;
...
@@ -5408,8 +5408,8 @@ void process_commands()
...
@@ -5408,8 +5408,8 @@ void process_commands()
for
(
i
=
0
;
i
<
2
;
i
++
)
for
(
i
=
0
;
i
<
2
;
i
++
)
{
{
current_position
[
i
]
=
current_position
[
i
]
-
current_position
[
i
]
=
current_position
[
i
]
-
extruder
_offset
[
i
][
active_extruder
]
+
hotend
_offset
[
i
][
active_extruder
]
+
extruder
_offset
[
i
][
tmp_extruder
];
hotend
_offset
[
i
][
tmp_extruder
];
}
}
#endif // SINGLENOZZLE
#endif // SINGLENOZZLE
...
...
MarlinKimbra/planner.cpp
View file @
5d18bac2
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
DestinationSpeed[s_, a_, d_] := Sqrt[2 a d + s^2]
DestinationSpeed[s_, a_, d_] := Sqrt[2 a d + s^2]
When to start braking (di) to reach a specified desti
o
nation 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:
from initial speed s1 without ever stopping at a plateau:
Solve[{DestinationSpeed[s1, a, di] == DestinationSpeed[s2, a, d - di]}, di]
Solve[{DestinationSpeed[s1, a, di] == DestinationSpeed[s2, a, d - di]}, di]
...
...
MarlinKimbra/stepper.cpp
View file @
5d18bac2
...
@@ -43,7 +43,7 @@ block_t *current_block; // A pointer to the block currently being traced
...
@@ -43,7 +43,7 @@ block_t *current_block; // A pointer to the block currently being traced
//===========================================================================
//===========================================================================
//=============================private variables ============================
//=============================private variables ============================
//===========================================================================
//===========================================================================
//static makes it i
n
possible to be called from outside of this file by extern.!
//static makes it i
m
possible to be called from outside of this file by extern.!
// Variables used by The Stepper Driver Interrupt
// Variables used by The Stepper Driver Interrupt
static
unsigned
char
out_bits
;
// The next stepping-bits to be output
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
...
@@ -59,7 +59,7 @@ volatile static unsigned long step_events_completed; // The number of step event
#endif
#endif
static
long
acceleration_time
,
deceleration_time
;
static
long
acceleration_time
,
deceleration_time
;
//static unsigned long accelerate_until, decelerate_after, acceleration_rate, initial_rate, final_rate, nominal_rate;
//static unsigned long accelerate_until, decelerate_after, acceleration_rate, initial_rate, final_rate, nominal_rate;
static
unsigned
short
acc_step_rate
;
// needed for dec
cela
ration start point
static
unsigned
short
acc_step_rate
;
// needed for dec
ele
ration start point
static
char
step_loops
;
static
char
step_loops
;
static
unsigned
short
OCR1A_nominal
;
static
unsigned
short
OCR1A_nominal
;
static
unsigned
short
step_loops_nominal
;
static
unsigned
short
step_loops_nominal
;
...
@@ -95,7 +95,7 @@ volatile long count_position[NUM_AXIS] = { 0, 0, 0, 0};
...
@@ -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
};
volatile
signed
char
count_direction
[
NUM_AXIS
]
=
{
1
,
1
,
1
,
1
};
//===========================================================================
//===========================================================================
//============================
=functions
============================
//============================
Functions ========
============================
//===========================================================================
//===========================================================================
#define CHECK_ENDSTOPS if(check_endstops)
#define CHECK_ENDSTOPS if(check_endstops)
...
@@ -292,7 +292,7 @@ void enable_endstops(bool check)
...
@@ -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
// 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
// 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.
// 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 l
eib ramp algh
orithm.
// The slope of acceleration is calculated with the l
ib ramp alg
orithm.
void
st_wake_up
()
{
void
st_wake_up
()
{
// TCNT1 = 0;
// TCNT1 = 0;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment