-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
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
[2.0.x] Light-weight status screen for ST7920 based printers #9637
[2.0.x] Light-weight status screen for ST7920 based printers #9637
Conversation
- The status screen uses the ST7920 character generator to greatly reduce SPI traffic and MCU load when updating the status screen. - Has been tested with the RepRapDiscount Full Graphics Smart Controller but should work with any LCD that uses an ST7920 or fully compatible controller.
- avr-gcc is more strict than the Arduino IDE, it seems.
Is this compatible with any other ST7920 displays aside from the RRD FGSC?
|
263b742
to
3e2f86a
Compare
@thinkyhead : It should be compatible with all displays that have a ST7920 or a 100% compatible chip and provided the memory map is identical (which I assume will be for all 128x64 displays). I wasn't exactly sure which these were so I only listed the RRD FGSC, but if you know these other displays use the ST7920 then in all likelihood they would work too. Some of the displays out there, such as the MKS 12864 OLED, are 128x64 but they seem to use a chip that only has a graphics buffer. These would not be compatible and would need to continue to use the U8G-based code. |
Incidentally, one could possibly write a software character generator that emulates the ST7920 for displays that don't have one. This would negate some of the savings in SPI traffic, but it would probably run much faster than the U8G code since the characters glyphs would be byte-aligned. If there is a strong interest in this, I could look into writing such a compatibility layer to allow the light-weight status screen to work on all 128x64 displays, even the bitmap based ones. Maybe we see how popular this new interface becomes first, as it would be a fairly complex undertaking. |
Just a point to note: The ST7920 is the slowest controller. All the others are, at least 2x faster, and OLED based ones are probably 20x faster. I am referring to the acievable SPI transfer speed. So, i guess this PR is mostly expremely valuable for the ST7920... |
@ejtagle : That's perfect then. I started this work mostly because I wanted to learn more about the ST7920, not because I was trying to solve any particular problem; but it's nice to know I solved a problem by accident :) |
I've enable this feature for the displays I listed above. If one of them happens not to work we're sure to find out eventually. Please test this PR with the changes I've made. If everything functions properly then this can be merged anytime. |
3e2f86a
to
235e0c8
Compare
And now you've taught us all a thing or two. One of the things I like about Marlin as a project is that it collects together so much knowledge about the boards and peripherals we all use. It's one of the reasons I prefer to preserve support for older boards and obscure machines. That said, we still might retire the Makibox configuration for 2.1. |
c5a74de
to
6eb8585
Compare
- The status screen uses the ST7920 character generator to greatly reduce SPI traffic and MCU load when updating the status screen. - Has been tested with the RepRapDiscount Full Graphics Smart Controller but should work with any LCD that uses an ST7920 or fully compatible controller.
3e5ef53
to
ab39dec
Compare
ab39dec
to
79272f9
Compare
|
Thinking about smarter status messages…. Some (e.g., "Heating Done") may be fine to expire after a period of time (as they can do with an |
- Also deleted old implementation files which had been renamed.
@cjsoong : I pushed a fix. Thank you for spotting that. Did you also change the bed icon? I notice it has corners in your screenshot :) |
- This will slightly reduce the SPI requirements for updating the progress bar.
- This makes it look less like a dash (idea stolen from cjsoong).
Rebasing and squashing… Be sure to get a fresh copy before adding on. |
860dc6c
to
a8f6a3e
Compare
- This status screen uses the ST7920 character generator to greatly reduce SPI traffic and MCU load when updating the status screen. - Has been tested with the RepRapDiscount Full Graphics Smart Controller but should work with any LCD that uses an ST7920 or fully compatible controller.
a8f6a3e
to
556abc0
Compare
@marcio-ao |
@cjsoong : I made a commit with your modified bed icon. It does help make it look less like a plus sign. Thank you! One thing that's nice is that in the "lightweight" UI, the bed icon is underneath the nozzle, so it's a bit more visually unambiguous than it is in the standard UI screen, where they are side-by-side. |
@thinkyhead : I like the fan icons with more frames, but unfortunately for maximum efficiency on the ST7920, I only have four custom characters to work with, and right now they are split between the fan and the heated bed, so just two frames a piece. A perspective bed icon might look decent on the lightweight UI, but there are fewer pixels to work with, so I'm not sure how good it'll look until I try scaling it down. I'll try it out. |
…ite-st7920-status
Nope. Doesn't look good at all, not enough pixels. I think @cjsoong has the best icon so far for the lightweight GUI. |
Actually, with the nozzle over the parallelogram, you can totally grok in-context that it's the bed. |
What happens if you use 1 character, but you redefine its bitmap between screen renderings? If that can be done then it would allow for any number of frames. Is that allowed during operation, or does it have to be part of the initialization? |
Than you have to transfer 16 bytes per phase instead ot 1. The same amount as when drawing the icon in graphic-mode. Running in circles. For my taste the vertical lines in the FR-icon could be a bit fatter to match the on chip font. It looks a bit 'skinny'. |
I see. Of course, it could be done at any point in the lengthy 1s downtime between screen updates.
Not a big Jony Ive fan? Me neither. And I agree, it would look better with a little weight. |
@thinkyhead, @AnHardt : It's fairly easy to change the icons. I think at one point I had a fatter FR icon, but I wasn't satisfied with how it looked, so I gave up on making one. Can't say I am a fan of the parallelogram for the bed, but again, simple to change if that is desired. Thank you for merging this in! :) |
In future we'll have more configurable display options. I like the flat bed icon well enough that I don't feel the need to go all 3D. (I'd need to design a 3D nozzle first!) |
Hi, I was wondering if you had any idea why my screen is doing the following... https://www.youtube.com/watch?v=yh-PQ7BpZl8 It was fine in 1.1.8 but now I've moved everything over to 1.1.9 the screen isn't right. However, if I enable Light-weight option, it displays the main info screen correctly but not the menus. Any ideas? Thanks, |
@CdRsKuLL — See #3815 (comment) |
The Klipper FW is using a port of the lighweight UI. There are some cool new icon concepts being discussed there: |
Interesting! Checking it out… |
@@ -656,6 +656,22 @@ | |||
// Swap the CW/CCW indicators in the graphics overlay | |||
//#define OVERLAY_GFX_REVERSE | |||
|
|||
#if ENABLED(U8GLIB_ST7920) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make more sense to put the check for a U8GLIB_ST7920-based display into the LIGHTWEIGHT_UI code, then put a "LIGHTWEIGHT_UI requires a U8GLIB_ST7920 based graphical display." into SanityCheck.h ?
How will users know they have a U8GLIB_ST7920-based display without digging deeper beyond both Configuration*.h and the board pin*.h files ?
(I mention this because I ran into this confusion by setting LIGHTWEIGHT_UI on what I thought was a U8GLIB_ST7920 based LCD and not seeing any change, but turns out it was an U8GLIB_SSD1306 LCD).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configurator uses these #if
wrappers to decide whether to present the option. But we should also add a sanity check.
Added an alternative light-weight status screen for the ST7920 as originally discussed in #9190
The status screen uses the ST7920 character generator to greatly
reduce SPI traffic and MCU load when updating the status screen.
The status screen by-passes u8g and writes commands directly
to the controller. All other menus will continue to use the u8g library.
Has been tested with the RepRapDiscount Full Graphics Smart Controller
but should work with any 128x64 LCD that uses an ST7920 or fully compatible
controller.