mirror of
https://github.com/wled/WLED.git
synced 2025-07-19 08:46:34 +00:00
Added two more fonts to Scrolling text.
This commit is contained in:
parent
4e0cf380be
commit
52e5f467b0
@ -5840,8 +5840,15 @@ uint16_t mode_2Dscrollingtext(void) {
|
|||||||
const uint16_t cols = SEGMENT.virtualWidth();
|
const uint16_t cols = SEGMENT.virtualWidth();
|
||||||
const uint16_t rows = SEGMENT.virtualHeight();
|
const uint16_t rows = SEGMENT.virtualHeight();
|
||||||
|
|
||||||
const int letterWidth = SEGMENT.custom2 > 127 ? 6 : 5;
|
int letterWidth;
|
||||||
const int letterHeight = 8;
|
int letterHeight;
|
||||||
|
switch (map(SEGMENT.custom2, 0, 255, 1, 4)) {
|
||||||
|
default:
|
||||||
|
case 1: letterWidth = 5; letterHeight = 8; break;
|
||||||
|
case 2: letterWidth = 6; letterHeight = 8; break;
|
||||||
|
case 3: letterWidth = 7; letterHeight = 9; break;
|
||||||
|
case 4: letterWidth = 5; letterHeight = 12; break;
|
||||||
|
}
|
||||||
const int yoffset = map(SEGMENT.intensity, 0, 255, -rows/2, rows/2) + (rows-letterHeight)/2;
|
const int yoffset = map(SEGMENT.intensity, 0, 255, -rows/2, rows/2) + (rows-letterHeight)/2;
|
||||||
char text[33] = {'\0'};
|
char text[33] = {'\0'};
|
||||||
if (SEGMENT.name) for (size_t i=0,j=0; i<strlen(SEGMENT.name); i++) if (SEGMENT.name[i]>31 && SEGMENT.name[i]<128) text[j++] = SEGMENT.name[i];
|
if (SEGMENT.name) for (size_t i=0,j=0; i<strlen(SEGMENT.name); i++) if (SEGMENT.name[i]>31 && SEGMENT.name[i]<128) text[j++] = SEGMENT.name[i];
|
||||||
|
6174
wled00/FX_2Dfcn.cpp
6174
wled00/FX_2Dfcn.cpp
File diff suppressed because it is too large
Load Diff
4099
wled00/console_font_5x12.h
Normal file
4099
wled00/console_font_5x12.h
Normal file
File diff suppressed because it is too large
Load Diff
3075
wled00/console_font_5x8.h
Normal file
3075
wled00/console_font_5x8.h
Normal file
File diff suppressed because it is too large
Load Diff
3075
wled00/console_font_6x8.h
Normal file
3075
wled00/console_font_6x8.h
Normal file
File diff suppressed because it is too large
Load Diff
3331
wled00/console_font_7x9.h
Normal file
3331
wled00/console_font_7x9.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// version code in format yymmddb (b = daily build)
|
||||||
#define VERSION 2208101
|
#define VERSION 2208111
|
||||||
|
|
||||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||||
//#define WLED_USE_MY_CONFIG
|
//#define WLED_USE_MY_CONFIG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user