chiark / gitweb /
marlin.git
11 years agoMerge branch 'for-upstream-ff' into iwj firmware-tested-2012-08-10
Ian Jackson [Fri, 10 Aug 2012 18:36:40 +0000 (19:36 +0100)]
Merge branch 'for-upstream-ff' into iwj

11 years agoupdate from for-upstream (merge -s theirs)
Ian Jackson [Fri, 10 Aug 2012 18:36:40 +0000 (19:36 +0100)]
update from for-upstream (merge -s theirs)

11 years agoM206: save values in eeprom
Ian Jackson [Wed, 1 Aug 2012 20:18:08 +0000 (21:18 +0100)]
M206: save values in eeprom

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the second stage of this, make the M206 home offset
parameters subject to the M500/M501/M502/M503 eeprom commands.

Bump the eeprom version to "V06".

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoHOMEAXIS: make into a function
Ian Jackson [Wed, 8 Aug 2012 17:30:34 +0000 (18:30 +0100)]
HOMEAXIS: make into a function

Replace the large macro HOMEAXIS with a function.  This avoids the
compiler generating three copies of largely identical code.  The
saving is 724 bytes of program memory.

We make use of XYZ_CONSTS_FROM_CONFIG to provide convenient
array-shaped access to MAX_LENGTH, HOME_RETRACT_MM and HOME_DIR.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoeeprom: provide smaller code for SERIAL_ECHOPAIR
Ian Jackson [Sat, 4 Aug 2012 15:13:25 +0000 (16:13 +0100)]
eeprom: provide smaller code for SERIAL_ECHOPAIR

SERIAL_ECHOPAIR implies, eventually, two calls to MYSERIAL.print.  One
of these has FORCE_INLINE for a per-character loop, and both involve
constructing a method call rather than a simple function call.

Produce better and smaller code by providing three specialised
functions serial_echopair.  This saves 672 bytes of program memory
(with EEPROM_SETTINGS and SDSUPPORT enabled).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoM206: always use homing ("homeing") offsets
Ian Jackson [Wed, 1 Aug 2012 20:12:14 +0000 (21:12 +0100)]
M206: always use homing ("homeing") offsets

Previously the parameters set in M206 would only be used if a G82
command was sent with specific axis home values.  This limits its
usefulness.

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the first stage of this, make M206 affect every
home command.  The values set using M206 are now added to the
configuration variables [XYZ]_HOME_POS.

This is achieved by replacing all uses of [XYZ]_HOME_POS in the code
by a new home_pos[] which includes the adjustment.  We also have to
adjust the uses of [XYZ]_{MIN,MAX}_POS similarly - see below.

To allow axis_is_at_home to be written as a function taking an axis
index rather than a macro taking an axis letter, we provide
constant arrays in program memory containing the values of
[XYZ]_{MIN,MAX,HOME}_POS from the compiled-in configuration.

This is done with some helper macros to deal with the declaration
(XYZ_CONSTS_FROM_CONFIG) and definition of the inline function which
does the program memory access.

We also introduce the overloaded function read_pgm_any, whose
instances are produced with DEFINE_PGM_READ_ANY, which allows the
access functions to automatically produce the correct type.

The type- and pointer-massaging code in the access function boils
down, when compiled, to a simple program memory access.

A question arises: if the M206 offset is set, should this adjustment
to the home position shift or change the possible range of movement
permitted by the software endstops ?

The documentation in Configuration.h describes these limits as:
    // Travel limits after homing
Since this is a file containing physical limits, and actual suggested
values for these configuration parameters appear to include a certain
amount of slop, I've taken the view that these should be regarded as
nominal physical distances from the limit switches, and that the
permissible travel should be unaffected by M206.

So for example with the (rather unrealistic)
  #define X_HOME_DIR -1
  #define X_MIN_POS -20
  #define X_HOME_POS 0
  #define X_MAX_POS 100
no matter the setting of M206 X, the machine would be permitted
to move from 20mm "beyond" the limit switch trigger point in
the negative X direction and 100mm away from the limit switch in
the positive X direction, for a total travel of 120mm.

With M206 X-10 that would be considered to correspond to X coordinates
-30 to +90.  With M206 X+10 that would be considered to correspond to
X coordinates -10 to +110.

fixes #200 (in ErikZalm/Marlin).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agosoftware_endstops: use *_MIN_POS and *_MAX_POS for arcs
Ian Jackson [Thu, 9 Aug 2012 17:15:32 +0000 (18:15 +0100)]
software_endstops: use *_MIN_POS and *_MAX_POS for arcs

If [XYZ]_HOME_POS and [XYZ]_MIN_POS aren't 0, these corrections are
wrong.  Use the same logic as in Marlin.pde:prepare_move: ie, clamp to
[XYZ]_{MIN,MAX}_POS.

While we're here, put this cut-and-paste code in a function
clamp_to_software_endstops.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoMakefile: Better display of size (device memory usage)
Ian Jackson [Thu, 9 Aug 2012 18:03:12 +0000 (19:03 +0100)]
Makefile: Better display of size (device memory usage)

Run avr-size with the --mcu=... -C option as well.  That reports how
much actual device program and data memory is used along with a
percentage fullness.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoMakefile: support V=1
Ian Jackson [Wed, 1 Aug 2012 20:31:38 +0000 (21:31 +0100)]
Makefile: support V=1

Often it can be useful to see the actual commands being run by make.
Other projects (eg, the Linux kernel) support this with a "V=1" make
parameter.  Do the same here.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years ago.gitignore: Add *~, *.orig, *.rej, move to root directory
Ian Jackson [Wed, 8 Aug 2012 17:32:51 +0000 (18:32 +0100)]
.gitignore: Add *~, *.orig, *.rej, move to root directory

Move the .gitignore out of the Marlin subdirectory so it applies to
the whole tree, and add some missing patterns.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoMarlin.pde: include comment for emacs mode
Ian Jackson [Wed, 8 Aug 2012 16:56:39 +0000 (17:56 +0100)]
Marlin.pde: include comment for emacs mode

Emacs by default doesn't recognise a ".pde" file as C++ source code.
Add the annotation to the top of the file to make it work.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoadjust Z software endstop downwards
Ian Jackson [Fri, 10 Aug 2012 18:30:44 +0000 (19:30 +0100)]
adjust Z software endstop downwards

11 years agoRemove the reprappro config file
Ian Jackson [Fri, 10 Aug 2012 17:11:23 +0000 (18:11 +0100)]
Remove the reprappro config file

11 years agoMerge branch 'for-upstream-ff' into iwj
Ian Jackson [Fri, 10 Aug 2012 17:10:43 +0000 (18:10 +0100)]
Merge branch 'for-upstream-ff' into iwj

11 years agoupdate from for-upstream (merge -s theirs)
Ian Jackson [Fri, 10 Aug 2012 17:10:35 +0000 (18:10 +0100)]
update from for-upstream (merge -s theirs)

11 years agoM206: save values in eeprom
Ian Jackson [Wed, 1 Aug 2012 20:18:08 +0000 (21:18 +0100)]
M206: save values in eeprom

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the second stage of this, make the M206 home offset
parameters subject to the M500/M501/M502/M503 eeprom commands.

Bump the eeprom version to "V06".

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoHOMEAXIS: make into a function
Ian Jackson [Wed, 8 Aug 2012 17:30:34 +0000 (18:30 +0100)]
HOMEAXIS: make into a function

Replace the large macro HOMEAXIS with a function.  This avoids the
compiler generating three copies of largely identical code.  The
saving is 724 bytes of program memory.

We make use of XYZ_CONSTS_FROM_CONFIG to provide convenient
array-shaped access to MAX_LENGTH, HOME_RETRACT_MM and HOME_DIR.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoeeprom: provide smaller code for SERIAL_ECHOPAIR
Ian Jackson [Sat, 4 Aug 2012 15:13:25 +0000 (16:13 +0100)]
eeprom: provide smaller code for SERIAL_ECHOPAIR

SERIAL_ECHOPAIR implies, eventually, two calls to MYSERIAL.print.  One
of these has FORCE_INLINE for a per-character loop, and both involve
constructing a method call rather than a simple function call.

Produce better and smaller code by providing three specialised
functions serial_echopair.  This saves 672 bytes of program memory
(with EEPROM_SETTINGS and SDSUPPORT enabled).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoM206: always use homing ("homeing") offsets
Ian Jackson [Wed, 1 Aug 2012 20:12:14 +0000 (21:12 +0100)]
M206: always use homing ("homeing") offsets

Previously the parameters set in M206 would only be used if a G82
command was sent with specific axis home values.  This limits its
usefulness.

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the first stage of this, make M206 affect every
home command.  The values set using M206 are now added to the
configuration variables [XYZ]_HOME_POS.

This is achieved by replacing all uses of [XYZ]_HOME_POS in the code
by a new home_pos[] which includes the adjustment.  We also have to
adjust the uses of [XYZ]_{MIN,MAX}_POS similarly - see below.

To allow axis_is_at_home to be written as a function taking an axis
index rather than a macro taking an axis letter, we provide
constant arrays in program memory containing the values of
[XYZ]_{MIN,MAX,HOME}_POS from the compiled-in configuration.

This is done with some helper macros to deal with the declaration
(XYZ_CONSTS_FROM_CONFIG) and definition of the inline function which
does the program memory access.

We also introduce the overloaded function read_pgm_any, whose
instances are produced with DEFINE_PGM_READ_ANY, which allows the
access functions to automatically produce the correct type.

The type- and pointer-massaging code in the access function boils
down, when compiled, to a simple program memory access.

A question arises: if the M206 offset is set, should this adjustment
to the home position shift or change the possible range of movement
permitted by the software endstops ?

The documentation in Configuration.h describes these limits as:
    // Travel limits after homing
Since this is a file containing physical limits, and actual suggested
values for these configuration parameters appear to include a certain
amount of slop, I've taken the view that these should be regarded as
nominal physical distances from the limit switches, and that the
permissible travel should be unaffected by M206.

So for example with the (rather unrealistic)
  #define X_HOME_DIR -1
  #define X_MIN_POS -20
  #define X_HOME_POS 0
  #define X_MAX_POS 100
no matter the setting of M206 X, the machine would be permitted
to move from 20mm "beyond" the limit switch trigger point in
the negative X direction and 100mm away from the limit switch in
the positive X direction, for a total travel of 120mm.

With M206 X-10 that would be considered to correspond to X coordinates
-30 to +90.  With M206 X+10 that would be considered to correspond to
X coordinates -10 to +110.

fixes #200 (in ErikZalm/Marlin).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agosoftware_endstops: use *_MIN_POS and *_MAX_POS for arcs
Ian Jackson [Thu, 9 Aug 2012 17:15:32 +0000 (18:15 +0100)]
software_endstops: use *_MIN_POS and *_MAX_POS for arcs

If [XYZ]_HOME_POS and [XYZ]_MIN_POS aren't 0, these corrections are
wrong.  Use the same logic as in Marlin.pde:prepare_move: ie, clamp to
[XYZ]_{MIN,MAX}_POS.

While we're here, put this cut-and-paste code in a function
clamp_to_software_endstops.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoMerge branch 'for-upstream-ff' into iwj
Ian Jackson [Thu, 9 Aug 2012 19:28:46 +0000 (20:28 +0100)]
Merge branch 'for-upstream-ff' into iwj

Conflicts:
Marlin/EEPROMwrite.h
Marlin/Marlin.h
Marlin/Marlin.pde
Marlin/motion_control.cpp

11 years agoupdate from for-upstream (merge -s theirs)
Ian Jackson [Thu, 9 Aug 2012 19:22:23 +0000 (20:22 +0100)]
update from for-upstream (merge -s theirs)

11 years agoM206: save values in eeprom
Ian Jackson [Wed, 1 Aug 2012 20:18:08 +0000 (21:18 +0100)]
M206: save values in eeprom

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the second stage of this, make the M206 home offset
parameters subject to the M500/M501/M502/M503 eeprom commands.

Bump the eeprom version to "V06".

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoHOMEAXIS: make into a function
Ian Jackson [Wed, 8 Aug 2012 17:30:34 +0000 (18:30 +0100)]
HOMEAXIS: make into a function

Replace the large macro HOMEAXIS with a function.  This avoids the
compiler generating three copies of largely identical code.  The
saving is 704 bytes of program memory.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoupdate from for-upstream (merge -s theirs)
Ian Jackson [Thu, 9 Aug 2012 19:01:42 +0000 (20:01 +0100)]
update from for-upstream (merge -s theirs)

11 years agoeeprom: provide smaller code for SERIAL_ECHOPAIR
Ian Jackson [Sat, 4 Aug 2012 15:13:25 +0000 (16:13 +0100)]
eeprom: provide smaller code for SERIAL_ECHOPAIR

SERIAL_ECHOPAIR implies, eventually, two calls to MYSERIAL.print.  One
of these has FORCE_INLINE for a per-character loop, and both involve
constructing a method call rather than a simple function call.

Produce better and smaller code by providing three specialised
functions serial_echopair.  This saves 672 bytes of program memory
(with EEPROM_SETTINGS and SDSUPPORT enabled).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoHOMEAXIS: make into a function
Ian Jackson [Wed, 8 Aug 2012 17:30:34 +0000 (18:30 +0100)]
HOMEAXIS: make into a function

Replace the large macro HOMEAXIS with a function.  This avoids the
compiler generating three copies of largely identical code.  The
saving is 704 bytes of program memory.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoM206: save values in eeprom
Ian Jackson [Wed, 1 Aug 2012 20:18:08 +0000 (21:18 +0100)]
M206: save values in eeprom

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the second stage of this, make the M206 home offset
parameters subject to the M500/M501/M502/M503 eeprom commands.

Bump the eeprom version to "V06".

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoupdate from for-upstream (merge -s theirs)
Ian Jackson [Thu, 9 Aug 2012 18:20:24 +0000 (19:20 +0100)]
update from for-upstream (merge -s theirs)

11 years agoMakefile: Better display of size (device memory usage)
Ian Jackson [Thu, 9 Aug 2012 18:03:12 +0000 (19:03 +0100)]
Makefile: Better display of size (device memory usage)

Run avr-size with the --mcu=... -C option as well.  That reports how
much actual device program and data memory is used along with a
percentage fullness.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoM206: always use homing ("homeing") offsets
Ian Jackson [Wed, 1 Aug 2012 20:12:14 +0000 (21:12 +0100)]
M206: always use homing ("homeing") offsets

Previously the parameters set in M206 would only be used if a G82
command was sent with specific axis home values.  This limits its
usefulness.

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the first stage of this, make M206 affect every
home command.  The values set using M206 are now added to the
configuration variables [XYZ]_HOME_POS.

This is achieved by replacing all uses of [XYZ]_HOME_POS in the code
by [XYZ]_HOME_POS_A which is a macro which includes the adjustment.

A question arises: if the M206 offset is set, should this adjustment
to the home position shift or change the possible range of movement
permitted by the software endstops ?

The documentation in Configuration.h describes these limits as:
    // Travel limits after homing
Since this is a file containing physical limits, and actual suggested
values for these configuration parameters appear to include a certain
amount of slop, I've taken the view that these should be regarded as
nominal physical distances from the limit switches, and that the
permissible travel should be unaffected by M206.

So for example with the (rather unrealistic)
  #define X_HOME_DIR -1
  #define X_MIN_POS -20
  #define X_HOME_POS 0
  #define X_MAX_POS 100
no matter the setting of M206 X, the machine would be permitted
to move from 20mm "beyond" the limit switch trigger point in
the negative X direction and 100mm away from the limit switch in
the positive X direction, for a total travel of 120mm.

With M206 X-10 that would be considered to correspond to X coordinates
-30 to +90.  With M206 X+10 that would be considered to correspond to
X coordinates -10 to +110.

fixes #200 (in ErikZalm/Marlin).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoHOMEAXIS: make into a function
Ian Jackson [Wed, 8 Aug 2012 17:30:34 +0000 (18:30 +0100)]
HOMEAXIS: make into a function

Replace the large macro HOMEAXIS with a function.  This avoids the
compiler generating three copies of largely identical code.  The
saving is 704 bytes of program memory.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoMakefile: support V=1
Ian Jackson [Wed, 1 Aug 2012 20:31:38 +0000 (21:31 +0100)]
Makefile: support V=1

Often it can be useful to see the actual commands being run by make.
Other projects (eg, the Linux kernel) support this with a "V=1" make
parameter.  Do the same here.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agosoftware_endstops: use *_MIN_POS and *_MAX_POS for arcs
Ian Jackson [Thu, 9 Aug 2012 17:15:32 +0000 (18:15 +0100)]
software_endstops: use *_MIN_POS and *_MAX_POS for arcs

If [XYZ]_HOME_POS and [XYZ]_MIN_POS aren't 0, these corrections are
wrong.  Use the same logic as in Marlin.pde:prepare_move: ie, clamp to
[XYZ]_{MIN,MAX}_POS.

While we're here, put this cut-and-paste code in a function
clamp_to_software_endstops.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoM206: save values in eeprom
Ian Jackson [Wed, 1 Aug 2012 20:18:08 +0000 (21:18 +0100)]
M206: save values in eeprom

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the second stage of this, make the M206 home offset
parameters subject to the M500/M501/M502/M503 eeprom commands.

Bump the eeprom version to "V06".

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years ago.gitignore: Add *~, *.orig, *.rej, move to root directory
Ian Jackson [Wed, 8 Aug 2012 17:32:51 +0000 (18:32 +0100)]
.gitignore: Add *~, *.orig, *.rej, move to root directory

Move the .gitignore out of the Marlin subdirectory so it applies to
the whole tree, and add some missing patterns.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoMakefile: Better size printing
Ian Jackson [Thu, 9 Aug 2012 18:03:12 +0000 (19:03 +0100)]
Makefile: Better size printing

Run avr-size with the --mcu=... -C option as well.  That reports how
much actual device program and data memory is used along with a
percentage fullness.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoeeprom: provide smaller code for SERIAL_ECHOPAIR
Ian Jackson [Sat, 4 Aug 2012 15:13:25 +0000 (16:13 +0100)]
eeprom: provide smaller code for SERIAL_ECHOPAIR

SERIAL_ECHOPAIR implies, eventually, two calls to MYSERIAL.print.  One
of these has FORCE_INLINE for a per-character loop, and both involve
constructing a method call rather than a simple function call.

Produce better and smaller code by providing three specialised
functions serial_echopair.  This saves 672 bytes of program memory
(with EEPROM_SETTINGS and SDSUPPORT enabled).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoMarlin.pde: include comment for emacs mode
Ian Jackson [Wed, 8 Aug 2012 16:56:39 +0000 (17:56 +0100)]
Marlin.pde: include comment for emacs mode

Emacs by default doesn't recognise a ".pde" file as C++ source code.
Add the annotation to the top of the file to make it work.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoM206: always use homing ("homeing") offsets
Ian Jackson [Wed, 1 Aug 2012 20:12:14 +0000 (21:12 +0100)]
M206: always use homing ("homeing") offsets

Previously the parameters set in M206 would only be used if a G82
command was sent with specific axis home values.  This limits its
usefulness.

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the first stage of this, make M206 affect every
home command.  The values set using M206 are now added to the
configuration variables [XYZ]_HOME_POS.

This is achieved by replacing all uses of [XYZ]_HOME_POS in the code
by [XYZ]_HOME_POS_A which is a macro which includes the adjustment.

A question arises: if the M206 offset is set, should this adjustment
to the home position shift or change the possible range of movement
permitted by the software endstops ?

I have taken the view that the software endstops are a backstop safety
feature which is not necessarily entirely accurate, and that reducing
the scope of movement, at either end, is not desirable.  I have
therefore arranged that nonzero values for M206 increase the total
range of movement.

So for example with
  #define X_MIN_POS 0
  #define X_HOME_POS 0
  #define X_MAX_POS 100

M206 X-10 would permit the machine to move from the endstop
(considered X=-10) 110mm in the positive X direction (considered
X=+100).

M206 X+10 would permit the machine to move from the endstop
(considered X=-10) 110mm in the positive X direction (considered
X=+110).

fixes #200 (in ErikZalm/Marlin).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoundo broken for-upstream change by stgit
Ian Jackson [Thu, 9 Aug 2012 18:15:01 +0000 (19:15 +0100)]
undo broken for-upstream change by stgit

11 years agoupdate from for-upstream (merge -s theirs)
Ian Jackson [Wed, 8 Aug 2012 17:56:55 +0000 (18:56 +0100)]
update from for-upstream (merge -s theirs)

11 years agoHOMEAXIS: make into a function
Ian Jackson [Wed, 8 Aug 2012 17:30:34 +0000 (18:30 +0100)]
HOMEAXIS: make into a function

Replace the large macro HOMEAXIS with a function.  This avoids the
compiler generating three copies of largely identical code.  The
saving is 714 bytes of program memory.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoM206: save values in eeprom
Ian Jackson [Wed, 1 Aug 2012 20:18:08 +0000 (21:18 +0100)]
M206: save values in eeprom

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the second stage of this, make the M206 home offset
parameters subject to the M500/M501/M502/M503 eeprom commands.

Bump the eeprom version to "V06".

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoeeprom: provide smaller code for SERIAL_ECHOPAIR
Ian Jackson [Sat, 4 Aug 2012 15:13:25 +0000 (16:13 +0100)]
eeprom: provide smaller code for SERIAL_ECHOPAIR

SERIAL_ECHOPAIR implies, eventually, two calls to MYSERIAL.print.  One
of these has FORCE_INLINE for a per-character loop, and both involve
constructing a method call rather than a simple function call.

Produce better and smaller code by providing three specialised
functions serial_echopair.  This saves 672 bytes of program memory
(with EEPROM_SETTINGS and SDSUPPORT enabled).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoM206: always use homing ("homeing") offsets
Ian Jackson [Wed, 1 Aug 2012 20:12:14 +0000 (21:12 +0100)]
M206: always use homing ("homeing") offsets

Previously the parameters set in M206 would only be used if a G82
command was sent with specific axis home values.  This limits its
usefulness.

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the first stage of this, make M206 affect every
home command.  The values set using M206 are now added to the
configuration variables [XYZ]_HOME_POS.

This is achieved by replacing all uses of [XYZ]_HOME_POS in the code
by [XYZ]_HOME_POS_A which is a macro which includes the adjustment.

A question arises: if the M206 offset is set, should this adjustment
to the home position shift or change the possible range of movement
permitted by the software endstops ?

I have taken the view that the software endstops are a backstop safety
feature which is not necessarily entirely accurate, and that reducing
the scope of movement is not desirable.

I have therefore implemented it so that negative values for M206
increase the total range of movement, whereas positive values leave it
unchanged.

So for example with
  #define X_MIN_POS 0
  #define X_HOME_POS 0
  #define X_MAX_POS 100

M206 X-10 would permit the machine to move from the endstop
(considered X=-10) 110mm in the positive X direction (considered
X=+100).

M206 X+10 would permit the machine to move from the endstop
(considered X=-10) 100mm in the positive X direction (considered
X=+110).

fixes #200 (in ErikZalm/Marlin).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoMakefile: support V=1
Ian Jackson [Wed, 1 Aug 2012 20:31:38 +0000 (21:31 +0100)]
Makefile: support V=1

Often it can be useful to see the actual commands being run by make.
Other projects (eg, the Linux kernel) support this with a "V=1" make
parameter.  Do the same here.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoAdd *~ to Marlin/.gitignore
Ian Jackson [Wed, 8 Aug 2012 17:32:51 +0000 (18:32 +0100)]
Add *~ to Marlin/.gitignore

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoupdate from for-upstream (merge -s theirs)
Ian Jackson [Wed, 8 Aug 2012 17:33:26 +0000 (18:33 +0100)]
update from for-upstream (merge -s theirs)

11 years agoAdd *~ to Marlin/.gitignore
Ian Jackson [Wed, 8 Aug 2012 17:32:51 +0000 (18:32 +0100)]
Add *~ to Marlin/.gitignore

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoMarlin.pde: include comment for emacs mode
Ian Jackson [Wed, 8 Aug 2012 16:56:39 +0000 (17:56 +0100)]
Marlin.pde: include comment for emacs mode

Emacs by default doesn't recognise a ".pde" file as C++ source code.
Add the annotation to the top of the file to make it work.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoHOMEAXIS: make into a function
Ian Jackson [Wed, 8 Aug 2012 17:30:34 +0000 (18:30 +0100)]
HOMEAXIS: make into a function

Replace the large macro HOMEAXIS with a function.  This avoids the
compiler generating three copies of largely identical code.  The
saving is 714 bytes of program memory.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoM206: save values in eeprom
Ian Jackson [Wed, 1 Aug 2012 20:18:08 +0000 (21:18 +0100)]
M206: save values in eeprom

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the second stage of this, make the M206 home offset
parameters subject to the M500/M501/M502/M503 eeprom commands.

Bump the eeprom version to "V06".

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoeeprom: provide smaller code for SERIAL_ECHOPAIR
Ian Jackson [Sat, 4 Aug 2012 15:13:25 +0000 (16:13 +0100)]
eeprom: provide smaller code for SERIAL_ECHOPAIR

SERIAL_ECHOPAIR implies, eventually, two calls to MYSERIAL.print.  One
of these has FORCE_INLINE for a per-character loop, and both involve
constructing a method call rather than a simple function call.

Produce better and smaller code by providing three specialised
functions serial_echopair.  This saves 672 bytes of program memory
(with EEPROM_SETTINGS and SDSUPPORT enabled).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoM206: always use homing ("homeing") offsets
Ian Jackson [Wed, 1 Aug 2012 20:12:14 +0000 (21:12 +0100)]
M206: always use homing ("homeing") offsets

Previously the parameters set in M206 would only be used if a G82
command was sent with specific axis home values.  This limits its
usefulness.

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the first stage of this, make M206 affect every
home command.  The values set using M206 are now added to the
configuration variables [XYZ]_HOME_POS.

This is achieved by replacing all uses of [XYZ]_HOME_POS in the code
by [XYZ]_HOME_POS_A which is a macro which includes the adjustment.

fixes #200 (in ErikZalm/Marlin).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
minimums too

FIXME FIXME FIXME

11 years agoMakefile: support V=1
Ian Jackson [Wed, 1 Aug 2012 20:31:38 +0000 (21:31 +0100)]
Makefile: support V=1

Often it can be useful to see the actual commands being run by make.
Other projects (eg, the Linux kernel) support this with a "V=1" make
parameter.  Do the same here.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoENABLE EEPROM SETTINGS AND SDSUPPORT NOT FOR UPSTREAM
Ian Jackson [Wed, 8 Aug 2012 16:57:15 +0000 (17:57 +0100)]
ENABLE EEPROM SETTINGS AND SDSUPPORT NOT FOR UPSTREAM

11 years agominimums too firmware-tested-2012-08-04
Ian Jackson [Sat, 4 Aug 2012 15:43:30 +0000 (15:43 +0000)]
minimums too

11 years agohomeing fixes
Ian Jackson [Sat, 4 Aug 2012 15:20:30 +0000 (16:20 +0100)]
homeing fixes

11 years agoM206: save values in eeprom
Ian Jackson [Wed, 1 Aug 2012 20:18:08 +0000 (21:18 +0100)]
M206: save values in eeprom

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the second stage of this, make the M206 home offset
parameters subject to the M500/M501/M502/M503 eeprom commands.

Bump the eeprom version to "V06".

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoechopair double thing
Ian Jackson [Sat, 4 Aug 2012 15:13:25 +0000 (16:13 +0100)]
echopair double thing

11 years agoRevert "M206: save values in eeprom"
Ian Jackson [Sat, 4 Aug 2012 14:57:17 +0000 (15:57 +0100)]
Revert "M206: save values in eeprom"

This reverts commit ea54e71397799c16cde4f6d55d57195aea439ce9.

11 years agoMerge branch 'for-upstream-ff' into iwj
Ian Jackson [Sat, 4 Aug 2012 14:41:26 +0000 (15:41 +0100)]
Merge branch 'for-upstream-ff' into iwj

11 years agoupdate from ref for-upstream (merge -s theirs)
Ian Jackson [Sat, 4 Aug 2012 14:41:25 +0000 (15:41 +0100)]
update from ref for-upstream (merge -s theirs)

11 years agoM206: save values in eeprom
Ian Jackson [Wed, 1 Aug 2012 20:18:08 +0000 (21:18 +0100)]
M206: save values in eeprom

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the second stage of this, make the M206 home offset
parameters subject to the M500/M501/M502/M503 eeprom commands.

Bump the eeprom version to "V06".

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoM206: always use homing ("homeing") offsets
Ian Jackson [Wed, 1 Aug 2012 20:12:14 +0000 (21:12 +0100)]
M206: always use homing ("homeing") offsets

Previously the parameters set in M206 would only be used if a G82
command was sent with specific axis home values.  This limits its
usefulness.

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the first stage of this, make M206 affect every
home command.  The values set using M206 are now added to the
configuration variables [XYZ]_HOME_POS.

This is achieved by replacing all uses of [XYZ]_HOME_POS in the code
by [XYZ]_HOME_POS_A which is a macro which includes the adjustment.

fixes #200 (in ErikZalm/Marlin).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoMerge branch 'for-upstream-ff' into iwj
Ian Jackson [Wed, 1 Aug 2012 20:42:11 +0000 (21:42 +0100)]
Merge branch 'for-upstream-ff' into iwj

11 years agoMerge branch 'for-upstream-ff' into for-upstream
Ian Jackson [Wed, 1 Aug 2012 20:40:37 +0000 (21:40 +0100)]
Merge branch 'for-upstream-ff' into for-upstream

11 years agoMakefile: support V=1
Ian Jackson [Wed, 1 Aug 2012 20:31:38 +0000 (21:31 +0100)]
Makefile: support V=1

Often it can be useful to see the actual commands being run by make.
Other projects (eg, the Linux kernel) support this with a "V=1" make
parameter.  Do the same here.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoM206: save values in eeprom
Ian Jackson [Wed, 1 Aug 2012 20:18:08 +0000 (21:18 +0100)]
M206: save values in eeprom

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the second stage of this, make the M206 home offset
parameters subject to the M500/M501/M502/M503 eeprom commands.

Bump the eeprom version to "V06".

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoM206: always use homing ("homeing") offsets
Ian Jackson [Wed, 1 Aug 2012 20:12:14 +0000 (21:12 +0100)]
M206: always use homing ("homeing") offsets

Previously the parameters set in M206 would only be used if a G82
command was sent with specific axis home values.  This limits its
usefulness.

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the first stage of this, make M206 affect every
home command.  The values set using M206 are now added to the
configuration variables [XYZ]_HOME_POS.

This is achieved by replacing all uses of [XYZ]_HOME_POS in the code
by [XYZ]_HOME_POS_A which is a macro which includes the adjustment.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoMerge branch 'for-upstream-ff' into iwj
Ian Jackson [Wed, 1 Aug 2012 20:32:43 +0000 (21:32 +0100)]
Merge branch 'for-upstream-ff' into iwj

11 years agoMakefile: support V=1
Ian Jackson [Wed, 1 Aug 2012 20:31:38 +0000 (21:31 +0100)]
Makefile: support V=1

Often it can be useful to see the actual commands being run by make.
Other projects (eg, the Linux kernel) support this with a "V=1" make
parameter.  Do the same here.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoM206: save values in eeprom
Ian Jackson [Wed, 1 Aug 2012 20:18:08 +0000 (21:18 +0100)]
M206: save values in eeprom

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the second stage of this, make the M206 home offset
parameters subject to the M500/M501/M502/M503 eeprom commands.

Bump the eeprom version to "V06".

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoM206: always use homing ("homeing") offsets
Ian Jackson [Wed, 1 Aug 2012 20:12:14 +0000 (21:12 +0100)]
M206: always use homing ("homeing") offsets

Previously the parameters set in M206 would only be used if a G82
command was sent with specific axis home values.  This limits its
usefulness.

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the first stage of this, make M206 affect every
home command.  The values set using M206 are now added to the
configuration variables [XYZ]_HOME_POS.

This is achieved by replacing all uses of [XYZ]_HOME_POS in the code
by [XYZ]_HOME_POS_A which is a macro which includes the adjustment.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoRevert "remove annoying @s from Makefile"
Ian Jackson [Wed, 1 Aug 2012 20:25:09 +0000 (21:25 +0100)]
Revert "remove annoying @s from Makefile"

before redo with V=

This reverts commit acb82c90e5a1d3168847371cb91e38d69ea072b3.

11 years agoM206: save values in eeprom
Ian Jackson [Wed, 1 Aug 2012 20:18:08 +0000 (21:18 +0100)]
M206: save values in eeprom

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the second stage of this, make the M206 home offset
parameters subject to the M500/M501/M502/M503 eeprom commands.

Bump the eeprom version to "V06".

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoM206: always use homing ("homeing") offsets
Ian Jackson [Wed, 1 Aug 2012 20:12:14 +0000 (21:12 +0100)]
M206: always use homing ("homeing") offsets

Previously the parameters set in M206 would only be used if a G82
command was sent with specific axis home values.  This limits its
usefulness.

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the first stage of this, make M206 affect every
home command.  The values set using M206 are now added to the
configuration variables [XYZ]_HOME_POS.

This is achieved by replacing all uses of [XYZ]_HOME_POS in the code
by [XYZ]_HOME_POS_A which is a macro which includes the adjustment.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
11 years agoconfig fix - enable eeprom support
Ian Jackson [Wed, 1 Aug 2012 20:21:30 +0000 (21:21 +0100)]
config fix - enable eeprom support

11 years agoupdate date iwj-success-2012-07-29
Ian Jackson [Sun, 29 Jul 2012 15:24:38 +0000 (16:24 +0100)]
update date

11 years agofix bed pin and thermistor etc, now it works
Ian Jackson [Sun, 29 Jul 2012 15:23:56 +0000 (16:23 +0100)]
fix bed pin and thermistor etc, now it works

11 years agoremove annoying @s from Makefile
Ian Jackson [Sun, 29 Jul 2012 15:23:41 +0000 (16:23 +0100)]
remove annoying @s from Makefile

11 years agoconfig fixes
Ian Jackson [Sun, 29 Jul 2012 13:59:31 +0000 (14:59 +0100)]
config fixes
 - 115200 baud since zealot won't do 250000
 - thermistors set to boring 1 and 2, a la
    sprinter-reprappro.git#aec04de807fe6d84315096477674a1eccc959aee
    Sprinter_Sanguinololu/Configuration.h
 - enable SD support

11 years agoRevert "get temp tables from "RepRapPro-Huxley-July-2012" ie c33ed4dcb852815f16f0ebb7...
Ian Jackson [Sun, 29 Jul 2012 13:57:33 +0000 (14:57 +0100)]
Revert "get temp tables from "RepRapPro-Huxley-July-2012" ie c33ed4dcb852815f16f0ebb7dd9433e4d7d78590"

these are bollocks; the table 102 which we were using for hot end
sensor is not even monotonic

This reverts commit 0b3d4364b7b52efda6fb492f91aca92da70c6d19.

11 years agoget temp tables from "RepRapPro-Huxley-July-2012" ie c33ed4dcb852815f16f0ebb7dd9433e4...
Ian Jackson [Sat, 28 Jul 2012 19:56:43 +0000 (19:56 +0000)]
get temp tables from "RepRapPro-Huxley-July-2012" ie c33ed4dcb852815f16f0ebb7dd9433e4d7d78590

11 years agosettings
Ian Jackson [Sat, 28 Jul 2012 19:44:11 +0000 (19:44 +0000)]
settings

11 years agoFixed soft limits when the origin is in the middle.
Chris Palmer [Sat, 2 Jun 2012 12:17:47 +0000 (13:17 +0100)]
Fixed soft limits when the origin is in the middle.
HOME_POS is now always where the endstop is and can be outside the limits.
The limits are now defined by MIN_POS and MAX_POS rather than HOME_POS and MAX_LENGTH.
The Z is axis now homed first if direction is away from the bed.

Saguinololu limit pins change from MIN to MAX according to the homing direction.

11 years agoFixed typo
ErikZalm [Sat, 14 Jul 2012 14:25:35 +0000 (17:25 +0300)]
Fixed typo

11 years agoMerge git://github.com/daid/Marlin into Marlin_v1
Erik van der Zalm [Sat, 14 Jul 2012 13:07:14 +0000 (15:07 +0200)]
Merge git://github.com/daid/Marlin into Marlin_v1
Added invert step pins to corexy code

11 years agoAdded CoreXY support (Thanks Ilan Moyer)
Erik van der Zalm [Sat, 14 Jul 2012 12:21:53 +0000 (14:21 +0200)]
Added CoreXY support (Thanks Ilan Moyer)

11 years agodecoupled axes sucessfully at least on pure x or y jog
Erik van der Zalm [Sat, 14 Jul 2012 11:43:19 +0000 (13:43 +0200)]
decoupled axes sucessfully at least on pure x or y jog

11 years agoSupport step motor controllers with active low step pins.
daid [Fri, 29 Jun 2012 14:27:47 +0000 (16:27 +0200)]
Support step motor controllers with active low step pins.

11 years agoFixed AD595 define
Erik van der Zalm [Mon, 11 Jun 2012 15:33:42 +0000 (17:33 +0200)]
Fixed AD595 define

11 years agocorrected retract
Bernhard [Sun, 3 Jun 2012 14:56:40 +0000 (16:56 +0200)]
corrected retract

11 years ago__ header file replace
Bernhard [Sat, 2 Jun 2012 18:44:17 +0000 (20:44 +0200)]
__ header file replace

11 years agoadded firmware retract. disabled by default
Bernhard [Sat, 2 Jun 2012 18:32:28 +0000 (20:32 +0200)]
added firmware retract. disabled by default

11 years agoreadme corrected
Bernhard [Sat, 2 Jun 2012 12:14:36 +0000 (14:14 +0200)]
readme corrected

11 years agoadded individual pullup setting option to have finer control in case there is a speci...
Bernhard [Sat, 2 Jun 2012 11:47:50 +0000 (13:47 +0200)]
added individual pullup setting option to have finer control in case there is a special z-min sensor, for example

11 years agoreadme
Bernhard [Sat, 2 Jun 2012 11:44:38 +0000 (13:44 +0200)]
readme

11 years agoMerge pull request #170 from linagee/Marlin_v1
Bernhard Kubicek [Sat, 2 Jun 2012 10:46:56 +0000 (03:46 -0700)]
Merge pull request #170 from linagee/Marlin_v1

Marlin v1