Liu Song’s Projects


~/Projects/AWTRIX2.0-Controller

git clone https://code.lsong.org/AWTRIX2.0-Controller

Commit

Commit
4d24b654b1eb0b1d05d0239f2c6ee9c06b47efef
Author
Stephan Mühl <31169771+[email protected]>
Date
2019-03-27 22:26:44 +0100 +0100
Diffstat
 src/AWTRIXController.cpp | 4 ++++

add volume


diff --git a/.vscode/ipch/4fe347cdef2f7c50/AWTRIXCONTROLLER.ipch b/.vscode/ipch/4fe347cdef2f7c50/AWTRIXCONTROLLER.ipch
index 1baf60e13cb8d921a25111028c87568bcfa37a9c..3f7ff16b9b43a6460e84be4fb2513e8ba093c1da 100644
Binary files a/.vscode/ipch/4fe347cdef2f7c50/AWTRIXCONTROLLER.ipch and b/.vscode/ipch/4fe347cdef2f7c50/AWTRIXCONTROLLER.ipch differ




diff --git a/src/AWTRIXController.cpp b/src/AWTRIXController.cpp
index a1be06bff269ca53c568048f631e43e3098809e2..856b1e08e3cda5c435e7ab70f4a5db01001c1cba 100644
--- a/src/AWTRIXController.cpp
+++ b/src/AWTRIXController.cpp
@@ -184,6 +184,8 @@ 		matrix->drawPixel(json["x"].as(), json["y"].as(), matrix->Color(json["color"][0].as(), json["color"][1].as(), json["color"][2].as()));
 	}
 	else if (channel.equals("play"))
 	{
+		myMP3.volume(json["vol"].as<int8>());
+		delay(20);
 		myMP3.playFolder(json["folder"].as<int8>(),json["file"].as<int8>());
 	}
 	else if (channel.equals("setBrightness"))
@@ -317,6 +319,8 @@ 		matrix->setBrightness(json["brightness"].as());
 	}
 		else if (type.equals("play"))
 	{
+		myMP3.volume(json["vol"].as<int8>());
+		delay(20);
 		myMP3.playFolder(json["folder"].as<int8>(),json["file"].as<int8>());
 	}
 	else if (type.equals("speedtest"))