Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐢 🐇 Add variable delay to Myfont::Banner #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Myfont.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ void Myfont::Draw(int xval, unsigned char chr) /*draws an ascii char to the scre
}
}

void Myfont::Banner(int len, unsigned char* text){ /* text banner creator. use with example code!!*/
void Myfont::Banner(int len, unsigned char* text, unsigned int scrollingDelay){ /* text banner creator. use with example code!!*/


int xoff=14;/* setmx offset to the right end of the screen*/
Expand All @@ -185,7 +185,7 @@ void Myfont::Banner(int len, unsigned char* text){ /* text banner creator. use w
Myfont::Draw(xoff + j*6, text[j]); /* call the draw font function*/
}
xoff--; /* decrement x offset*/
delay(70); /*scrolling speed increments if delay goes down*/
delay(scrollingDelay); /*scrolling speed increments if delay goes down*/
LedSign::Clear(); /*empty the screen */
}

Expand Down
2 changes: 1 addition & 1 deletion Myfont.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
namespace Myfont
{
extern void Draw(int xval, unsigned char chr);
extern void Banner(int len, unsigned char* text);
extern void Banner(int len, unsigned char* text, unsigned int scrollingDelay = 70);
}
#endif