diff --git a/src/main.cpp b/src/main.cpp index 50ce02a..685830f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,10 +2,10 @@ //======================== // -// 'SHOW_SCREEN' : whether if playing info. displayed or not. +// 'ENABLE_SCREEN' : whether if playing info. displayed or not. // //======================== -//#define SHOW_SCREEN +//#define ENABLE_SCREEN //======================== #define GAIN_MAX 1.0 // if 1.0 is too loud, give max. limit here. @@ -55,6 +55,7 @@ Audio audio; String screen_filename = "/___.mp3"; // +#if defined(ENABLE_SCREEN) extern Task screen_cmd_notify_task; bool cmd_notify = false; void screen_cmd_notify() { @@ -74,8 +75,6 @@ void screen() { display.setTextColor(SSD1306_WHITE); display.setTextSize(1); -#if defined(SHOW_SCREEN) - //line1 - mode line (playing / stopped) + notify mark display.setCursor(0, line); if (audio.isRunning()) display.println("= playing ==="); @@ -91,13 +90,12 @@ void screen() { display.println(screen_filename.c_str()); line += line_step; -#endif - // display.display(); // } 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) @@ -206,6 +204,10 @@ void setup() { file_index = 0; audio.connecttoSD(file_list[file_index].c_str()); screen_filename = file_list[file_index]; + + //clear screen (make it black out, for sure.) + display.clearDisplay(); + display.display(); } void loop() {