Smoothieware/Smoothieware — pull request #436 by hg42 (2014-06-20 04:58:18+00:00)
Title: add Leds module for central management of leds, add post codes to main

completely redesigned leds module as discussed in #424
- replaces led code (and gpio) in main.cpp and SlowTicker.cpp
- adds POST codes to main.cpp
- POST leds can be configured separately
via space separated pin descriptions
- uses Pin to have maximum flexibility
- manages the four standard leds and play led
- dimmed mode shows that events are running without distraction
(otherwise led is bright or off, kind of blinks while activities)
- also respects leds_disable setting
- free form pin configuration
e.g. leds.pin_idle 4.28! blink
or leds.pin_idle blink 4.28!

config like current led behaviour:

leds.enable true # can be omitted
leds.pin_main blink # main loop
leds.pin_idle blink # idle event
leds.pin_gcode off # no gcode led
leds.pin_play off # no play led

example config:

leds.enable true #
leds.pin_main dimmed #
leds.pin_idle blink #
leds.pin_gcode 4.28! # use play led for gcodes
leds.pin_play off #
leds.pin_sdok # default
leds.pins_post 1.21 1.20 1.19 1.18 4.28! # POST leds reversed + play led for highest bit
play_led_disable true # PlayLed is replaced by Leds