Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre home display - Stepper release #2989

Merged
merged 10 commits into from
Mar 6, 2016
Merged

Conversation

AnHardt
Copy link
Contributor

@AnHardt AnHardt commented Feb 10, 2016

a reactivated #2676

Maybe now someone is interested.

This PR

  • enables the character-displays to blink,
  • shows again the relative to boot position coordinates on the displays - instead of "---",
  • indicates an unhomed axis with a blinking '?' on the place of the axis letters 'X', 'Y','Z'
  • indicates an axis where the stepper was disabled after homing with a blinking ' ' on the position of the axis letter, when the new configuration option #define DISABLE_REDUCED_ACCURACY_WARNING is commented.
  • introduces a new set of configuration options
#define DISABLE_INACTIV_X true
#define DISABLE_INACTIV_Y true
#define DISABLE_INACTIV_Z true  // set to false if the nozzle will fall down on your printed part when print has finished.
#define DISABLE_INACTIV_E true

what are used in conjunction with DEFAULT_STEPPER_DEACTIVE_TIME. Disabling the steppers after DEFAULT_STEPPER_DEACTIVE_TIME is then independent from the DISABLE_? settings.

  • the DISABLE_? configurations the will be used only for the imidiad disabling of the steppers when they are not used (buffer enpty).

The other configurations will be changed if i see some acceptance for this PR.

Option names can be discussed.
Moving the DISABLE_? block from 'Configuration.h' to 'Configuration_adv.h' should be considered.

You can find some links to optical examples in #2661, https://github.com/MarlinFirmware/MarlinDev/issues/355

Happy testing.

#define DISABLE_INACTIV_X true
#define DISABLE_INACTIV_Y true
#define DISABLE_INACTIV_Z true // set to false if the nozzle will fall down on your printed part when print has finished.
#define DISABLE_INACTIV_E true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename these as DISABLE_INACTIVE_* and I think this PR can be moved forward. It addresses two behaviors that are somewhat related. I guess the axis_homed stuff conflicts with my recent PR on that subject. I suppose this PR should precede that one, because mine is smaller and will be easier to patch up..

Implement and test blinking for char-lcds

# Conflicts:
#	Marlin/ultralcd_implementation_hitachi_HD44780.h
solved
Introduce additional variable axis_homed to replace axix_known_position
when the coordinate display should indicate the axis is not homed.
This is to distinguish between "not homed" and "inexact position possible
because stepper was disabled".

# Conflicts:
#	Marlin/ultralcd_implementation_hitachi_HD44780.h
solved
Make stepper shutdown after inactivity dependent on a new set of
#defines.
DISABLE_INACTIV_X
DISABLE_INACTIV_Y
DISABLE_INACTIV_Z
DISABLE_INACTIV_E

And make exemplaric Configuration.
Names can be discussed.

This makes the disabling of the steppers independent from the DISABLE_?
settings witch shut down the steppers immediately.
In the wait loops of M109 M190 idle() is called, what checks
stepper_inactive_time against previous_cmd_ms.
Because we can be several minutes inside the loop, resetting
previous_cmd_ms only outside the loop caused stepper shutdowns.

The name of previous_cmd_ms does not really reflect its use. It's set
not only when a new command was received or executed but also in many of
the movement routines. For that the little extension of using it during
the wait will (hopefully) not hurt.

# Conflicts:
#	Marlin/Configuration_adv.h
@AnHardt
Copy link
Contributor Author

AnHardt commented Feb 28, 2016

Updated, rebased, retested.

@thinkyhead
If you really want the bit-field patch (AnHardt@e5bc3e2) analog to #2991 for this, it's a few clicks away. It indeed saves 4 byte of RAM, but costs 98 bytes of progmem.

@AnHardt AnHardt force-pushed the fix2661 branch 2 times, most recently from 6a6170a to 5c80182 Compare February 28, 2016 22:18
Replaced displaying "---" instead of the value of a coordinate when
unhomed or with reduced precision
with blinking the coordinate-prefix-character ('X','Y','Z').
For "unhomed" a '?' is shown every second second - until that axis is
homed. The value displayed is, as before the "---" where displayed, the
relative to the reset position coordinate value.
When the axis stepper was disabled, now we can display a hint on that,
by showing a blinking ' ' instead of the axis letter, when
WARN_REDUCED_ACCURACY is defined.

I suppose the code itself is here the better documentation.

A '+/-' character is in non of our charsets so i decided for a '?' for
now to reduce the work.
There is no additional space on the displays one could use to display
the information, so replacing something is the only option. As the axis
letters are totally redundant with their positions on the display they
contain the least information.
So my decision was to overwrite them.
Refresh previous_cmd_ms during run_z_probe() to prevent:
stepper shutdown for expired DEFAULT_STEPPER_DEACTIVE_TIME
and extrudes for expired EXTRUDER_RUNOUT_SECONDS
(https://github.com/MarlinFirmware/MarlinDev/issues/238)
Renamed `WARN_REDUCED_ACCURACY` to `DISABLE_REDUCED_ACCURACY_WARNING`

Changed the condition for blinking from
```
#if ENABLED(WARN_REDUCED_ACCURACY)
```
to
```
#if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
```
Include MarlinFirmware#2892 to fix the isHeating symbol in the extruder graphics
@thinkyhead
Copy link
Member

costs 98 bytes of progmem

Ha, it's funny how it always seems to work that way. I presume because the optimizer is better when you keep code very simple.

Well I'll merge this happily, as it kills two birds with one stone. I should be able to get through another dozen PRs this weekend, with luck tagging RC4 so we can say farewell to Tune Menu bugs and other things that slipped through.

@jbrazio jbrazio added this to the 1.1.0 milestone Jul 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants