upd
This commit is contained in:
parent
7523628865
commit
ce614f289e
1 changed files with 11 additions and 4 deletions
13
src/main.cpp
13
src/main.cpp
|
|
@ -51,6 +51,11 @@ Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
|
|||
#define I2S_LRC 25
|
||||
Audio audio;
|
||||
|
||||
//globals
|
||||
String file_list[100]; //<-- later change this to be a vector (variable length)
|
||||
int file_num = 0;
|
||||
int file_index = 0;
|
||||
|
||||
//screen task
|
||||
String screen_filename = "/___.mp3";
|
||||
|
||||
|
|
@ -90,6 +95,11 @@ void screen() {
|
|||
display.println(screen_filename.c_str());
|
||||
line += line_step;
|
||||
|
||||
//line3 - file_index, filenum
|
||||
display.setCursor(0, line);
|
||||
display.println("file i-N : " + String(file_index) + "-" + String(file_num));
|
||||
line += line_step;
|
||||
|
||||
//
|
||||
display.display();
|
||||
//
|
||||
|
|
@ -98,9 +108,6 @@ Task screen_task(SCREEN_PERIOD, TASK_FOREVER, &screen, &runner, true);
|
|||
#endif
|
||||
|
||||
//audio files (wav & mp3)
|
||||
String file_list[100]; //<-- later change this to be a vector (variable length)
|
||||
int file_num = 0;
|
||||
int file_index = 0;
|
||||
int get_music_list(fs::FS &fs, const char *dirname, uint8_t levels, String wavlist[100])
|
||||
{
|
||||
Serial.printf("Listing directory: %s\n", dirname);
|
||||
|
|
|
|||
Loading…
Reference in a new issue