Commit graph

474 commits

Author SHA1 Message Date
Ian Jackson 7bb326d389 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>
2012-08-11 01:42:59 +01:00
Ian Jackson 957e966d2d 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>
2012-08-11 01:35:03 +01:00
Ian Jackson faccb35850 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>
2012-08-10 19:36:30 +01:00
Ian Jackson 3f15b7c7b8 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>
2012-08-10 19:36:30 +01:00
Ian Jackson 0c35facc94 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>
2012-08-10 19:36:29 +01:00
Ian Jackson 71404eef29 .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>
2012-08-10 19:36:29 +01:00
Ian Jackson a873541ef6 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>
2012-08-10 19:36:29 +01:00
Chris Palmer 538189cc19 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.
2012-07-14 22:24:26 +02:00
ErikZalm 686011a548 Fixed typo 2012-07-14 17:25:35 +03:00
Erik van der Zalm cd57bf305b Merge git://github.com/daid/Marlin into Marlin_v1
Added invert step pins to corexy code
2012-07-14 15:07:14 +02:00
Erik van der Zalm ea2c19f978 Added CoreXY support (Thanks Ilan Moyer) 2012-07-14 14:21:53 +02:00
Erik van der Zalm aa65fe22ed decoupled axes sucessfully at least on pure x or y jog 2012-07-14 13:43:19 +02:00
daid 12de8fff81 Support step motor controllers with active low step pins. 2012-06-29 16:27:47 +02:00
Erik van der Zalm b67dacdc8f Fixed AD595 define 2012-06-11 17:33:42 +02:00
Bernhard d3002ef741 corrected retract 2012-06-03 16:56:40 +02:00
Bernhard 0c123950e9 __ header file replace 2012-06-02 20:44:17 +02:00
Bernhard bf077125b9 added firmware retract. disabled by default 2012-06-02 20:32:28 +02:00
Bernhard 88d2a671cc readme corrected 2012-06-02 14:14:36 +02:00
Bernhard 0e5e249ab5 added individual pullup setting option to have finer control in case there is a special z-min sensor, for example 2012-06-02 13:47:50 +02:00
Bernhard e792d62f47 readme 2012-06-02 13:44:38 +02:00
Bernhard Kubicek 6b14f95b3e Merge pull request #170 from linagee/Marlin_v1
Marlin v1
2012-06-02 03:46:56 -07:00
Bernhard Kubicek c7ce99d495 Merge pull request #172 from daid/Marlin_v1
Add M401 - Wait for user to press button on LCD (with optional timeout) minor fix in M115.
2012-06-02 03:44:03 -07:00
Bernhard Kubicek b7fc14bc65 repaired thermistortable_6 by graphcial fitting of the off-slope values. see issue 179. Erik, I know you asked for no changes, but this file probably is not related and hopefully allright. 2012-05-30 14:14:36 +03:00
ErikZalm 9e1021efbe Fixed SL bug. 2012-05-28 22:32:53 +03:00
Daid e9bec9b6fe Fixed E1_ENABLE pin for Ultimaker. This was wrong for the 1.5.4 and 1.5.3 PCB (I cannot check the 1.5.6) 2012-05-24 18:36:55 +02:00
linagee fbd282b3ba Update Marlin/Configuration.h 2012-05-20 13:19:28 -06:00
linagee 2e8c5049c5 Update Marlin/thermistortables.h 2012-05-20 13:18:45 -06:00
linagee 2d0d8e5272 Small correction. 2012-05-20 11:09:07 -06:00
Daid 4d7fe7115f Changed M401 to M0/M1 as suggested, so they match normal CNC stop commands. 2012-05-20 14:37:30 +02:00
linagee 9e9db65c3f Update Marlin/thermistortables.h 2012-05-20 05:51:29 -06:00
linagee bd966ef389 Update Marlin/thermistortables.h 2012-05-20 05:49:01 -06:00
linagee 775da3f103 Added top ratings and extended to ADC=1 for table 3 and 5. 2012-05-20 05:35:57 -06:00
linagee 96a4baa0be Update Marlin/thermistortables.h 2012-05-20 04:55:22 -06:00
linagee 2aa9f7b131 Update Marlin/thermistortables.h 2012-05-20 04:35:28 -06:00
linagee c4490f5f3d Update Marlin/Configuration.h 2012-05-20 04:27:52 -06:00
linagee dd9144994e Tested May 19 - It works! Verified with separate thermocouple TM-902C also. 2012-05-20 04:13:29 -06:00
linagee 4c37d0d9f1 Extended range above 250C. (Operating range states up to 300C) 2012-05-20 04:01:30 -06:00
Daid b59724e42b Add strigification for extruder amount in M115 report. 2012-05-19 19:01:14 +02:00
Daid 16413bb8f2 Last M401 update, refresh the LCD during an M401 wait. 2012-05-19 18:53:56 +02:00
Daid b3941fce5c Update after testing 2012-05-19 18:48:43 +02:00
Daid d494688565 Do not initialize in the header file. 2012-05-19 17:57:52 +02:00
Daid 516ec90242 Add M401 - Wait for user on LCD button press 2012-05-19 17:54:07 +02:00
Daid 7244aa7eb7 Merge branch 'Marlin_v1' of https://github.com/ErikZalm/Marlin into Marlin_v1 2012-05-19 17:38:46 +02:00
linagee de2ca3b2e8 Grammar correction. 2012-05-19 07:40:35 -06:00
linagee c2fc466e1b Update Marlin/Configuration.h 2012-05-19 05:56:17 -06:00
linagee 241f5a4c0e Update Marlin/thermistortables.h 2012-05-19 05:52:12 -06:00
linagee 9f9f498491 Update Marlin/Configuration.h 2012-05-19 05:47:30 -06:00
Erik van der Zalm e31bef31ad Limit PID autotune PWM to PID_MAX 2012-05-16 19:32:23 +02:00
ErikZalm b2a9ccdb97 Merge pull request #159 from MaikStohn/Marlin_v1
Marlin v1 - BUG FIXES / CORRECTIONS
2012-05-16 12:32:35 -07:00
Erik van der Zalm d459fb41b7 Merge branch 'Marlin_v1' of github.com:ErikZalm/Marlin into Marlin_v1 2012-05-16 19:22:08 +02:00