Enable numbers and symbols in text FX

Shorten `Reserved` to `RSVD`
This commit is contained in:
cschwinne 2022-08-09 18:09:43 +02:00
parent 436ce63e30
commit 7befafe7b7
3 changed files with 4 additions and 4 deletions

View File

@ -5847,7 +5847,7 @@ uint16_t mode_2Dscrollingtext(void) {
const int letterHeight = 8;
const int yoffset = map(SEGMENT.intensity, 0, 255, -rows/2, rows/2) + (rows-letterHeight)/2;
char text[33] = {'\0'};
if (SEGMENT.name && strlen(SEGMENT.name)) for (int i=0,j=0; i<strlen(SEGMENT.name); i++) if (SEGMENT.name[i]>63 && SEGMENT.name[i]<128) text[j++] = SEGMENT.name[i];
if (SEGMENT.name && strlen(SEGMENT.name)) for (int i=0,j=0; i<strlen(SEGMENT.name); i++) if (SEGMENT.name[i]>31 && SEGMENT.name[i]<128) text[j++] = SEGMENT.name[i];
if (!strlen(text) || !strncmp_P(text,PSTR("#DATE"),5) || !strncmp_P(text,PSTR("#TIME"),5)) { // fallback if empty segment name: display date and time
char sec[5];
@ -7264,7 +7264,7 @@ static const char _data_FX_MODE_2DAKEMI[] PROGMEM = "Akemi@Color speed,Dance;Hea
//////////////////////////////////////////////////////////////////////////////////////////
// mode data
static const char _data_RESERVED[] PROGMEM = "Reserved";
static const char _data_RESERVED[] PROGMEM = "RSVD";
// add (or replace reserved) effect mode and data into vector
// use id==255 to find unallocatd gaps (with "Reserved" data string)

View File

@ -825,7 +825,7 @@ function populateEffects()
let id = ef.id;
let nm = ef.name+" ";
let fd = "";
if (ef.name.indexOf("Reserved") < 0) {
if (ef.name.indexOf("RSVD") < 0) {
if (Array.isArray(fxdata) && fxdata.length>id) {
if (fxdata[id].length==0) fd = ";;!;1d"
else fd = fxdata[id].substr(1);

View File

@ -644,7 +644,7 @@ function populateEffects()
for (let i = 0; i < effects.length; i++) {
// WLEDSR: add slider and color control to setEffect (used by requestjson)
if (effects[i].name.indexOf("Reserved") < 0) {
if (effects[i].name.indexOf("RSVD") < 0) {
var posAt = effects[i].name.indexOf("@");
var extra = '';
if (posAt > 0)