Scrollers start at a random offset (timer % <length> basically). So if you present an alert with a long string in a scroller, you don't get to see the beginning of the sentence until it has finished scrolling to the end.
What I would expect: User sticks in USB dongle, unit recognises it and starts downloading the firmware off it, and presents the user with an alert on what it is doing on the 20x2 LCD. However, the user sees a partial message while waiting for the message to appear to confirm the download.
It would require an extra field in the widget struct. I'd be more than happy to come up with a patch for this if this is considered a good change.
A patch to implement to start the scroller at the start of the string, for all scrollers (h,v,m). It starts (for a marquee scroller) at the right with the first char. I've considered displaying the first widget-width characters of the string, but that means the text will start to scroll off immediately.
Hope this is of any use.
~~~~~~
Index: server/render.c
===================================================================
--- server/render.c (revision 14474)
+++ server/render.c (working copy)
@@ -469,6 +469,10 @@
debug(RPT_DEBUG, "%s(w=%p, left=%d, top=%d, right=%d, bottom=%d, timer=%ld)",
FUNCTION, w, left, top, right, bottom, timer);
+
if ((w->text != NULL) && (w->right >= w->left)) {
char str[BUFSIZE];
int length;
Index: server/widget.c
===================================================================
--- server/widget.c (revision 14474)
+++ server/widget.c (working copy)
@@ -111,6 +111,7 @@
w->length = 1;
w->speed = 1;
w->text = NULL;
w->offset = 0;
//w->kids = NULL;
if (w->type == WID_FRAME) {
Index: server/widget.h
===================================================================
--- server/widget.h (revision 14474)
+++ server/widget.h (working copy)
@@ -41,6 +41,7 @@
int left, top, right, bottom; /< bounding rectangle */
int length; /< size or direction /
int speed; /< For scroller... */
+ long offset; /< Initial offset for scroller /
char text; /< text or binary data /
struct Screen frame_screen; /< frame widget get an associated screen /
//LinkedList kids; / Frames can contain more widgets...*/
~~~~~~~