added show screen conf.

This commit is contained in:
Dooho Yi 2021-11-12 18:29:26 +09:00
parent 9392d959b2
commit 49d88e3b92

View file

@ -1,5 +1,12 @@
// simple player for all
//============<configurations>============
//
// 'SHOW_SCREEN' : whether if playing info. displayed or not.
//
//============</configurations>============
//#define SHOW_SCREEN
//============<audioooo-param>============
#define GAIN_MAX 1.0 // if 1.0 is too loud, give max. limit here.
//============<audioooo-param>============
@ -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();
//
}