-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
Increase Default MKS MINI 12864 Init Contrast #15139
Increase Default MKS MINI 12864 Init Contrast #15139
Conversation
Upon further testing, without ...but then users can't change the contrast below 195. Is there a way for Marlin to use |
Try |
That’s part of my flashing procedure in OctoPrint (using the FirmwareUpdater plugin), but I’ll give another go manually. |
@thinkyhead: It's still not working correctly with this commit (but at least the custom boot screen is showing up), even after running It's using the Here's a video of what happens: https://youtu.be/_98_RRU3d28 |
|
Printers with I'll see if I can figure out where this is happening in the code and more importantly, if I can fix it. 😄 |
It looks like the jump in contrast half way through the second boot screen is probably occurring at line 2468 of
That's in the configuration reset so it ends up being stored in EEPROM. Then when the configuration is loaded:
|
I was just sifting through all the "contrast" results, so thanks for hunting that down @ManuelMcLure 😄I'll play with the code and see what I can come up with. |
GNU Global helps a lot in tracking down this type of thing. |
I mainly stick to board pins & printer configs, but I'm slowly branching out to other parts of Marlin. I'll work on it tonight and report back. |
It's above my paygrade. I can't seem to get the correct contrast setting to initialize sooner than it already is, so I'll have to leave it to someone else to figure out down the road. Thanks for trying to help @ManuelMcLure! |
FWIW #if HAS_LCD_CONTRAST
- refresh_contrast();
+ set_contrast(DEFAULT_LCD_CONTRAST);
#endif May be this will help to track down the root cause. |
EEPROM reset is only done if no EEPROM exists or the saved data could not be loaded.
That's a reasonable solution. The default contrast will be used if the EEPROM has not yet loaded. And if it has loaded, then the last-saved contrast will be used. Here's another proposal: #if HAS_LCD_CONTRAST
- int16_t MarlinUI::contrast; // Initialized by settings.load()
+ int16_t MarlinUI::contrast = DEFAULT_LCD_CONTRAST;
void MarlinUI::set_contrast(const int16_t value) {
contrast = constrain(value, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX);
u8g.setContrast(contrast);
}
#endif |
I haven't tested it yet, but it sounds good to me! There's still a bunch of LCD issues going on over in #15141, so we'll see. |
More likely SPI issues. |
This works great! @thinkyhead: Should I put in a PR for this change? Edit: Just saw the commit. |
Description
The default init LCD contrast of 150 for the
MKS_MINI_12864
is still too low. This PR bumps it to 195.Benefits
Increases the default contrast to make the LCD readable without having to increase it via LCD or gcode.
Related Issues
#14174, #14889
Also, custom bootscreens still aren't shown,
but I don't think that's related to this LCD contrast issueSee my comment below.