add 'pause'

This commit is contained in:
philippe44
2020-02-27 18:23:00 -08:00
parent 5fb4b14e87
commit 876ae491a1
3 changed files with 20 additions and 4 deletions

View File

@@ -289,13 +289,14 @@ void displayer_metadata(char *artist, char *album, char *title) {
/****************************************************************************************
*
*/
void displayer_scroll(char *string, int speed) {
void displayer_scroll(char *string, int speed, int pause) {
// need a display!
if (!display) return;
xSemaphoreTake(displayer.mutex, portMAX_DELAY);
if (speed) displayer.speed = speed;
if (pause) displayer.pause = pause;
displayer.offset = 0;
strncpy(displayer.string, string, SCROLLABLE_SIZE);
displayer.string[SCROLLABLE_SIZE] = '\0';