added show screen conf.
This commit is contained in:
parent
9392d959b2
commit
49d88e3b92
1 changed files with 13 additions and 4 deletions
17
src/main.cpp
17
src/main.cpp
|
|
@ -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();
|
||||
//
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue