drivers: display: mb_display: Add empty column to scrolling text

Add an empty column between characters of scrolling text so that the
individual characters are more easily distinguishable instead of being
back-to-back mashed together.

Also adjust the default scrolling step interval so that the character
display frequency stays roughly the same as before.

Change-Id: Idca0dc149a84f3f99b753a28ad1120ce75b97667
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-04-05 11:08:48 +03:00 committed by Anas Nashif
commit e129699a50
2 changed files with 4 additions and 4 deletions

View file

@ -39,11 +39,11 @@ config MICROBIT_DISPLAY_STR_MAX
config MICROBIT_DISPLAY_SCROLL_STEP
int "Duration between two string scrolling steps (in milliseconds)"
range 20 2000
default 100
default 80
help
This value specifies the time between two scrolling steps of the
string scrolling functionality. Smaller values mean faster
scrolling whereas bigger values mean slower scrolling. It is
usually best to leave this at its default value (100ms).
usually best to leave this at its default value (80ms).
endif # MICROBIT_DISPLAY

View file

@ -139,13 +139,13 @@ static inline void update_pins(struct mb_display *disp, uint32_t val)
static void update_scroll(struct mb_display *disp)
{
if (disp->scroll < 5) {
if (disp->scroll < 6) {
struct mb_image img;
int i;
for (i = 0; i < 5; i++) {
img.row[i] = (disp->img[0].row[i] >> disp->scroll) |
(disp->img[1].row[i] << (5 - disp->scroll));
(disp->img[1].row[i] << (6 - disp->scroll));
}
disp->scroll++;