Commit graph

4358 commits

Author SHA1 Message Date
AnHardt 468f7f03a2 homeaxis() can leave early
when no known axis needs to be homed.

Most changes are only caused from altering the indentation.
```
if (axis == X_AXIS ? HOMEAXIS_DO(X) : axis == Y_AXIS ? HOMEAXIS_DO(Y) : axis == Z_AXIS ? HOMEAXIS_DO(Z) : 0) {
  ...
}

to

if (!(axis == X_AXIS ? HOMEAXIS_DO(X) : axis == Y_AXIS ? HOMEAXIS_DO(Y) : axis == Z_AXIS ? HOMEAXIS_DO(Z) : 0)) return;
...

```
2016-07-08 15:59:33 +02:00
AnHardt eff7912243 Ensble/disable hardware endstops in G28 globally.
For moving away from the endstops we do not have to disable them.
They are not tested anyway.
2016-07-08 15:49:10 +02:00
AnHardt f69434d81c Eliminate void setup_for_endstop_move() 2016-07-08 15:23:20 +02:00
AnHardt 0ea6247fc2 Use logic in Z_SAFE_HOMING
Use logic in Z_SAFE_HOMING

From
```
if (home_all_axis || homeZ) {
  if (home_all_axis) {
  ...
  home z
  }
  else if (homeZ) { // Don't need to Home Z twice
  home z
  }
}

```
to
```
if (home_all_axis || homeZ) {
  if (home_all_axis) {
  ...
  }
  home z
}
```
2016-07-08 15:08:50 +02:00
AnHardt de3a169336 Always define MIN_Z_HEIGHT_FOR_HOMING even if 0
Always define MIN_Z_HEIGHT_FOR_HOMING even if 0
Always make a potential rise to `home_offset[Z_AXIS]` possible in G28.
Get rid of some very ugly constructs in MBL (ultralcd.cpp).
2016-07-08 15:08:32 +02:00
AnHardt 88ed232f53 Remove HAS_BED_PROBE case in first raise in G28
Differentiating made sense here when we could save a dozen lines of code,
but not for one line.
2016-07-08 14:59:44 +02:00
AnHardt 653eff3b31 Clean up quick_home_xy()
Since we do the actual homing now in the 'normal' routines `quick_home_xy()`
can be simplified to a relative simple diagonal move.
2016-07-08 14:59:27 +02:00
Scott Lahteine 98d0167a57 Merge pull request #4226 from thinkyhead/rc_emergency_command_parser
MarlinSerial emergency-command parser (with M108)
2016-07-07 16:53:55 -07:00
Scott Lahteine 2ee4e4f791 Make wait_for_heatup volatile 2016-07-07 16:37:23 -07:00
Scott Lahteine bd5a825b8b Wait for end of line before invoking action 2016-07-07 16:37:23 -07:00
Scott Lahteine ea47803ae2 Simplify emergency parser (only parse initial command) 2016-07-07 16:37:22 -07:00
Scott Lahteine 834ad14c8d Add quickstop_stepper to update current position with stepper.quick_stop() 2016-07-07 16:37:22 -07:00
Scott Lahteine ecffe92e20 Group EMERGENCY_PARSER commands 2016-07-07 16:37:22 -07:00
AnHardt a129078927 Add an emergency-command parser to MarlinSerial (supporting M108)
Add an emergency-command parser to MarlinSerial's RX interrupt.

The parser tries to find and execute M108,M112,M410 before the commands disappear in the RX-buffer.

To avoid false positives for M117, comments and commands followed by filenames (M23, M28, M30, M32, M33) are filtered.

This enables Marlin to receive and react on the Emergency command at all times - regardless of whether the buffers are full or not. It remains to convince hosts to send the commands. To inform the hosts about the new feature a new entry in the M115-report was made. "`EMERGENCY_CODES:M112,M108,M410;`".

The parser is fast. It only ever needs two switch decisions and one assignment of the new state for every character.

One problem remains. If the host has sent an incomplete line before sending an emergency command the emergency command could be omitted when the parser is in `state_IGNORE`.
In that case the host should send "\ncommand\n"

Also introduces M108 to break the waiting for the heaters in M109, M190 and M303.

Rename `cancel_heatup` to `wait_for_heatup` to better see the purpose.
2016-07-07 16:37:22 -07:00
Scott Lahteine 9f42b1a075 Merge pull request #4235 from thinkyhead/rc_revert_quickhome_test
Fix quick homing, tweak MIN_Z_HEIGHT_FOR_HOMING
2016-07-07 13:37:14 -07:00
Scott Lahteine ad968f2325 Merge pull request #4234 from thinkyhead/rc_better_position_logging
Move XYZ in print_xyz and DEBUG_POS to the front
2016-07-07 12:31:15 -07:00
Scott Lahteine 4036c73cdd Don't raise Z if only homing Z 2016-07-07 12:28:37 -07:00
Scott Lahteine 0b6f8f8244 Apply MIN_Z_HEIGHT_FOR_HOMING raise literally 2016-07-07 12:25:02 -07:00
Scott Lahteine 177ec20bf0 Revert quick-home changes 2016-07-07 12:17:34 -07:00
Scott Lahteine 9c5b462ef2 Move XYZ in print_xyz and DEBUG_POS to the front 2016-07-07 11:42:19 -07:00
Scott Lahteine 4e84c803a3 Merge pull request #4232 from thinkyhead/rc_no_axis_codes_needed
Don't use axis_codes if a literal will do
2016-07-06 20:05:16 -07:00
Scott Lahteine e2f7cb0905 Don't use axis_codes if a literal will do 2016-07-06 18:37:21 -07:00
Scott Lahteine 6559f7359f Fix comment on Z raise for homing, save a few bytes 2016-07-06 16:21:51 -07:00
Scott Lahteine 799c60cadc Merge pull request #4217 from thinkyhead/rc_fix_homing_raise
Don't do_probe_raise with MIN_Z_HEIGHT_FOR_HOMING
2016-07-06 14:39:37 -07:00
Scott Lahteine d7e9647505 Sanity Check for probe raises 2016-07-06 13:46:06 -07:00
Scott Lahteine d0b29cabf3 Don't re-home X and Y if you quick homed 2016-07-06 13:46:06 -07:00
Scott Lahteine e0a6b978f5 Don't do_probe_raise with MIN_Z_HEIGHT_FOR_HOMING 2016-07-06 13:46:05 -07:00
petrzjunior b81b77111b Update language_cz.h 2016-07-06 21:04:34 +02:00
Scott Lahteine 7735ec5e7a Merge pull request #4223 from thinkyhead/rc_rename_heatup
Change cancel_heatup to wait_for_heatup
2016-07-06 11:25:44 -07:00
Scott Lahteine 160a2be117 Change cancel_heatup to wait_for_heatup 2016-07-06 09:17:50 -07:00
AnHardt 16c83d203b Make use of the good features of a sled probe for all probes.
Move and extend axis_unhomed test to deploy/stow_z_probe().
Move and extend position store/restore to deploy/stow_z_probe().

Now all kinds of probes can use the 'E' parameter in G29/M48.
Allen key probes can be used now for grid and 3-point levelling.

Deploying the Allen Key probe uses big moves in z direction.
Too dangerous for an unhomed z-axis.
Throw a compile time error when we try to configure an
Allen Key probe homing to z-min and having no other z-min-endstop.
2016-07-06 04:11:04 +02:00
AnHardt 8555816a11 Generalize and simplify 'triggered when stowed test`
The `PROBE_IS_TRIGGERED_WHEN_STOWED_TEST` is able to detect if a probe is
successfully deployed/stowed.
It was part of the Allen Key probes code only.
Now the function is generally available.

Currently this test is compulsory for Allen Key probes to not alter the used behaviour
If you want to add the test for an other type of probe simply add
```
#define PROBE_IS_TRIGGERED_WHEN_STOWED_TEST
```
to your config.
2016-07-06 03:56:17 +02:00
AnHardt 5126cce7fd Move Allen Key probe move scripts to their own functions
There was an hidden extra move after the scripts. This is configurable now.
Added the extra moves to the relevant configs.
2016-07-06 03:46:40 +02:00
AnHardt 7d063c111c Add a optional feedrate parameter to do_blocking_move()
Add a optional feedrate parameter to `do_blocking_move()` and its companions.
2016-07-06 03:46:34 +02:00
Scott Lahteine b114b6a0b3 Save 152 bytes using uint8_t for command indices 2016-07-05 16:29:28 -07:00
Scott Lahteine 0d4ff0c48b Allow the queue to be cleared from within commands 2016-07-05 16:25:20 -07:00
Scott Lahteine c450851401 Merge pull request #4209 from AnHardt/too-high-G28
Make raise for probe deploy relative in homeaxis()
2016-07-05 11:07:42 -07:00
AnHardt f799f18388 MBL typo 2016-07-05 18:19:53 +02:00
AnHardt 8b02e68cb6 Make raise for probe deploy relative in homeaxis()
Make raise for probe deploy relative in homeaxis()
by setting `current_position[axis]` to zero later.
2016-07-05 10:42:33 +02:00
Scott Lahteine e48502866b Merge pull request #3611 from alephobjects/M108_cancel_heatup
Introduce M108 cancel wait for heatup/cooldown of the hotend and bed
2016-07-04 01:19:31 -07:00
Scott Lahteine d70197f514 Merge pull request #4204 from thinkyhead/rc_fix_gcode_t_position
Additional patches for gcode_T position change
2016-07-04 01:16:22 -07:00
Scott Lahteine 869b517589 Merge pull request #4205 from thinkyhead/rc_fixup_unit_references
References to millimeters in code comments need an update
2016-07-04 01:15:34 -07:00
Scott Lahteine e104b91ea6 References to millimeters in code comments need an update 2016-07-03 20:13:29 -07:00
AnHardt ff91d28a3a Remove wants_to_cool warning
Remove wants_to_cool warning
2016-07-04 03:12:11 +02:00
Scott Lahteine c9e536cf87 Additional patches for gcode_T position change 2016-07-03 18:11:02 -07:00
Scott Lahteine 60865fc45b Merge pull request #4202 from thinkyhead/rc_fix_gcode_t_position
Fix position adjustment with gcode_T and MBL
2016-07-03 17:55:43 -07:00
Scott Lahteine f841038313 Merge pull request #4201 from thinkyhead/rc_info_fit
Shorter labels for Print Stats info
2016-07-03 17:47:00 -07:00
Scott Lahteine f31af61ee2 Fix position adjustment with gcode_T and MBL 2016-07-03 17:44:04 -07:00
Scott Lahteine a8f5c2bf96 Merge pull request #4192 from birkett/k8400
Add Velleman K8400 board support.
2016-07-03 17:41:13 -07:00
Scott Lahteine ef8980bfa0 Shorter labels for Print Stats info 2016-07-03 16:00:24 -07:00