summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--disp_proj.ino4
-rw-r--r--marquee.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/disp_proj.ino b/disp_proj.ino
index 0c16b94..6b50499 100644
--- a/disp_proj.ino
+++ b/disp_proj.ino
@@ -68,11 +68,11 @@ void loop() {
}
write_marquee(marquee);
if (marquee->scrolledBy == 0) {
- delay(1000);
+ delay(500);
}
//check if message needs to be scrolled
if (marquee->doesScroll) {
- scroll_marquee(marquee, 2);
+ scroll_marquee(marquee, 3);
}
delay(1);
}
diff --git a/marquee.c b/marquee.c
index 37b2fc4..fb4f8f9 100644
--- a/marquee.c
+++ b/marquee.c
@@ -7,13 +7,12 @@ marquee_t make_marquee(char* str) {
strcpy(marquee.text, str);
marquee.scrolledBy = 0;
int pixelLength = marquee.textLength * 21;
- marquee.scrollMax = 5 + pixelLength;
+ marquee.scrollMax = 60 + pixelLength;
marquee.doesScroll = pixelLength > 128;
return marquee;
}
void scroll_marquee(marquee_t* marquee, int increment) {
//define the wrap point
- int scrollMax = 5 + (marquee->textLength * 21);
//calculate the new scroll amount
int newScroll = marquee->scrolledBy + increment;
marquee->scrolledBy = newScroll <= marquee->scrollMax ? newScroll : 0;