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
|
// simple player for all
|
||||||
|
|
||||||
|
//============<configurations>============
|
||||||
|
//
|
||||||
|
// 'SHOW_SCREEN' : whether if playing info. displayed or not.
|
||||||
|
//
|
||||||
|
//============</configurations>============
|
||||||
|
//#define SHOW_SCREEN
|
||||||
|
|
||||||
//============<audioooo-param>============
|
//============<audioooo-param>============
|
||||||
#define GAIN_MAX 1.0 // if 1.0 is too loud, give max. limit here.
|
#define GAIN_MAX 1.0 // if 1.0 is too loud, give max. limit here.
|
||||||
//============<audioooo-param>============
|
//============<audioooo-param>============
|
||||||
|
|
@ -67,6 +74,8 @@ void screen() {
|
||||||
display.setTextColor(SSD1306_WHITE);
|
display.setTextColor(SSD1306_WHITE);
|
||||||
display.setTextSize(1);
|
display.setTextSize(1);
|
||||||
|
|
||||||
|
#if defined(SHOW_SCREEN)
|
||||||
|
|
||||||
//line1 - mode line (playing / stopped) + notify mark
|
//line1 - mode line (playing / stopped) + notify mark
|
||||||
display.setCursor(0, line);
|
display.setCursor(0, line);
|
||||||
if (audio.isRunning()) display.println("= playing ===");
|
if (audio.isRunning()) display.println("= playing ===");
|
||||||
|
|
@ -82,6 +91,8 @@ void screen() {
|
||||||
display.println(screen_filename.c_str());
|
display.println(screen_filename.c_str());
|
||||||
line += line_step;
|
line += line_step;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
display.display();
|
display.display();
|
||||||
//
|
//
|
||||||
|
|
@ -194,15 +205,13 @@ void setup() {
|
||||||
//start playing..
|
//start playing..
|
||||||
file_index = 0;
|
file_index = 0;
|
||||||
audio.connecttoSD(file_list[file_index].c_str());
|
audio.connecttoSD(file_list[file_index].c_str());
|
||||||
|
screen_filename = file_list[file_index];
|
||||||
//
|
|
||||||
display.display();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
//
|
//
|
||||||
audio.loop();
|
audio.loop();
|
||||||
//
|
//
|
||||||
// runner.execute();
|
runner.execute();
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue