Skip to content

Filelisting with createMenu? #172

@mannitb303

Description

@mannitb303

Hi,
in my project i need to read the filenames from sd card and display it on an oled display. I can read the filenames from card and store it in an array. I can display the filenames with the ssd1306_createMenu function on the oled display. The problem is the number of menuItems. If i declare the structure as const char *fileItems[12]; i have 12 entrys for my filenames but if i have only 3 files on the sd card i have 9 empty entrys where i can scroll in the list (i hope you know what i mean). I changed the delaration to const char *fileItems[numFiles]; to have a variable value but there must be a constant, so i get the error from Compiler: "the value of variable "numFiles" (declared at line 253) cannot be used as a constant". How can i use the createMenu for listing files(without empty entrys) on the oled display?

Thank you.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions