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:
parent
fc123af51b
commit
e129699a50
2 changed files with 4 additions and 4 deletions
|
@ -39,11 +39,11 @@ config MICROBIT_DISPLAY_STR_MAX
|
||||||
config MICROBIT_DISPLAY_SCROLL_STEP
|
config MICROBIT_DISPLAY_SCROLL_STEP
|
||||||
int "Duration between two string scrolling steps (in milliseconds)"
|
int "Duration between two string scrolling steps (in milliseconds)"
|
||||||
range 20 2000
|
range 20 2000
|
||||||
default 100
|
default 80
|
||||||
help
|
help
|
||||||
This value specifies the time between two scrolling steps of the
|
This value specifies the time between two scrolling steps of the
|
||||||
string scrolling functionality. Smaller values mean faster
|
string scrolling functionality. Smaller values mean faster
|
||||||
scrolling whereas bigger values mean slower scrolling. It is
|
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
|
endif # MICROBIT_DISPLAY
|
||||||
|
|
|
@ -139,13 +139,13 @@ static inline void update_pins(struct mb_display *disp, uint32_t val)
|
||||||
|
|
||||||
static void update_scroll(struct mb_display *disp)
|
static void update_scroll(struct mb_display *disp)
|
||||||
{
|
{
|
||||||
if (disp->scroll < 5) {
|
if (disp->scroll < 6) {
|
||||||
struct mb_image img;
|
struct mb_image img;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 5; i++) {
|
for (i = 0; i < 5; i++) {
|
||||||
img.row[i] = (disp->img[0].row[i] >> disp->scroll) |
|
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++;
|
disp->scroll++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue