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

[1.1.x] led control menu #8488

Merged
merged 4 commits into from Nov 30, 2017

Conversation

Tannoo
Copy link
Contributor

@Tannoo Tannoo commented Nov 18, 2017

Gives control of LEDs from the LCD.

@Tannoo Tannoo force-pushed the 1.1.x-led_control_menu branch 2 times, most recently from 7d17ad2 to 049426e Compare November 22, 2017 02:26
@thinkyhead thinkyhead added Needs: Work More work is needed S: Don't Merge Work in progress or under discussion. labels Nov 27, 2017
@thinkyhead
Copy link
Member

I'm cleaning this up and will push the updated HEAD for your review when it's ready.

@thinkyhead thinkyhead force-pushed the 1.1.x-led_control_menu branch 3 times, most recently from 2b3b975 to 6cf9ae4 Compare November 28, 2017 05:21
@thinkyhead
Copy link
Member

thinkyhead commented Nov 28, 2017

I've rebased and applied several patches to this PR.
To pull down the latest version (any local changes will be lost):

git checkout 1.1.x-led_control_menu
git fetch origin
git reset --hard origin/1.1.x-led_control_menu

Changes include:

  • Split up LED-related code similarly to 2.0.x
  • Added a typedef LEDColor for use by set_led_color and related functions.
  • Switched to LEDColor for most led-related code.
  • Combined strings for better translations. (e.g., in French blue light = lumière bleue)
  • Show Lights Off when lights are on, Lights On when lights are off.

As with any big set of changes, there may be bugs. Please test whenever you have a chance.

@thinkyhead thinkyhead force-pushed the 1.1.x-led_control_menu branch 2 times, most recently from 41462ff to f85db55 Compare November 28, 2017 05:48
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
#define LED_USER_PRESET_INTENSITY 255 // User defined intensity
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
Copy link
Member

Choose a reason for hiding this comment

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

@Tannoo What is the normal startup state for the LEDs? I assume they are simply turned off by default. Is this option intended to have the LEDs set to a certain color whenever Marlin re-starts (as it does on host connect)? I didn't see any code added to Marlin's init() function as a result of this setting, but only an interesting bool flag in ultralcd.cpp.

@psavva
Copy link
Contributor

psavva commented Nov 28, 2017

Maybe an advanced config for setting the start-up led state/colour?

@thinkyhead thinkyhead force-pushed the 1.1.x-led_control_menu branch 3 times, most recently from 99e0805 to 7f6a42e Compare November 28, 2017 20:02
@thinkyhead
Copy link
Member

thinkyhead commented Nov 28, 2017

Maybe an advanced config for setting the start-up led state/colour?

A Set Default LED menu item would suffice, and then code to save/load the set color from EEPROM.

@thinkyhead thinkyhead force-pushed the 1.1.x-led_control_menu branch 10 times, most recently from d0bc277 to b3112a9 Compare November 28, 2017 21:27
@thinkyhead thinkyhead added Needs: Testing Testing is needed for this change and removed Needs: Work More work is needed labels Nov 28, 2017
@thinkyhead thinkyhead force-pushed the 1.1.x-led_control_menu branch 3 times, most recently from 3b4ed87 to d4c2852 Compare November 30, 2017 02:11
@thinkyhead thinkyhead force-pushed the 1.1.x-led_control_menu branch 6 times, most recently from 1335b45 to 6153927 Compare November 30, 2017 05:42
@thinkyhead thinkyhead merged commit ace3e50 into MarlinFirmware:bugfix-1.1.x Nov 30, 2017
@Tannoo Tannoo deleted the 1.1.x-led_control_menu branch December 17, 2017 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Testing Testing is needed for this change S: Don't Merge Work in progress or under discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants