Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Usage of PROGMEM strings #2

Closed
Geusantropy opened this issue Aug 19, 2016 · 2 comments
Closed

Usage of PROGMEM strings #2

Geusantropy opened this issue Aug 19, 2016 · 2 comments
Labels
status: complete (3/3) Bug fixed or feature implemented. type: feature request New feature or request.

Comments

@Geusantropy
Copy link

hello, due to some problems with a too low amount of RAM I've tried to use the Flash memory to store the text lines present inside the menu.. but I had some problems. I've tried to use the PROGMEM command and the relative methods to recall stored data, but the printet characters on lcd seems to be wrong converted (numbers or simbols). Can you explain the correct way to put flash stored text inside a liquidline object? Please, be detailed... I'm just a mechanical engineer :-)

@VasilKalchev
Copy link
Owner

Hi, I added support for printing text lines stored in the flash memory as const char[].
The way to do it is by defining the text line like this:

const char text[] PROGMEM = "Some text";

then attach it to the LiquidLine object as usual:

LiquidLine someLine(0, 0, text);

and finally call the function:

someLine.set_asProgmem(1);

this function tells the object that this variable is stored in the flash. '1' is the consecutive number of the variable for this LiquidLine object.

This update is released as beta here.

@Geusantropy
Copy link
Author

thanks, works fine

@VasilKalchev VasilKalchev added the type: feature request New feature or request. label Dec 13, 2016
@VasilKalchev VasilKalchev self-assigned this Dec 13, 2016
@VasilKalchev VasilKalchev changed the title LiquidMenu RAM memory problem Usage of PROGMEM strings Nov 2, 2021
@VasilKalchev VasilKalchev changed the title Usage of PROGMEM strings Usage of PROGMEM strings Nov 2, 2021
@VasilKalchev VasilKalchev added the status: complete (3/3) Bug fixed or feature implemented. label Nov 3, 2021
@VasilKalchev VasilKalchev removed their assignment Nov 3, 2021
Repository owner locked and limited conversation to collaborators Nov 4, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
status: complete (3/3) Bug fixed or feature implemented. type: feature request New feature or request.
Projects
None yet
Development

No branches or pull requests

2 participants