From 49d88e3b92a1446313e6b1606f2777d02e2aefe5 Mon Sep 17 00:00:00 2001 From: Dooho Yi Date: Fri, 12 Nov 2021 18:29:26 +0900 Subject: [PATCH] added show screen conf. --- src/main.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index c5084bf..50ce02a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,12 @@ // simple player for all +//======================== +// +// 'SHOW_SCREEN' : whether if playing info. displayed or not. +// +//======================== +//#define SHOW_SCREEN + //======================== #define GAIN_MAX 1.0 // if 1.0 is too loud, give max. limit here. //======================== @@ -67,6 +74,8 @@ 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 ==="); @@ -82,6 +91,8 @@ void screen() { display.println(screen_filename.c_str()); line += line_step; +#endif + // display.display(); // @@ -194,15 +205,13 @@ void setup() { //start playing.. file_index = 0; audio.connecttoSD(file_list[file_index].c_str()); - - // - display.display(); + screen_filename = file_list[file_index]; } void loop() { // audio.loop(); // - // runner.execute(); + runner.execute(); // }