Menu entry for toggling case light#5243
Closed
Kaibob2 wants to merge 7 commits intoMarlinFirmware:RCBugFixfrom
Kaibob2:Case-Light-entry
Closed
Menu entry for toggling case light#5243Kaibob2 wants to merge 7 commits intoMarlinFirmware:RCBugFixfrom Kaibob2:Case-Light-entry
Kaibob2 wants to merge 7 commits intoMarlinFirmware:RCBugFixfrom
Kaibob2:Case-Light-entry
Conversation
thinkyhead
reviewed
Nov 19, 2016
| #else | ||
| ; | ||
| ; | ||
| #endif |
Member
There was a problem hiding this comment.
Oops. Already patched this region.
thinkyhead
reviewed
Nov 19, 2016
| if (code_seen('S')) { | ||
| case_light_on = code_value_bool(); | ||
| if (case_light_on == 0) caselight = false; | ||
| if (case_light_on == 1) caselight = true; |
Member
There was a problem hiding this comment.
This instead:
caselight = case_light_on = code_value_bool();…or actually, just make case_light_on a global so it can be used by ultralcd.cpp.
thinkyhead
reviewed
Nov 19, 2016
| #endif | ||
| #if HAS_CASE_LIGHT | ||
| extern bool caselight; | ||
| #endif |
Member
There was a problem hiding this comment.
Instead of two flags for the same thing, just use extern bool case_light_on and make case_light_on a global instead of a static local to gcode_M355.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Referenced to this #5194 i implemented a (definable) Menu entry on the main screen to toggle the case lights. I had this long before the
#define CASE_LIGHT_PIN 4and always found it extremely useful to be able to switch off the case light from by LCD. The host is shut down most of the time, so if#define CASE_LIGHT_DEFAULT_ONis enabled there is no way to switch of the case light if the printer is printing for 20 hours.