- missing Transpose (seglen)
- reduce flickering for static text (ScrollingText FX #3050)
This commit is contained in:
Blaz Kristan 2023-01-24 16:35:31 +01:00
parent 57323af167
commit 178c4d15b7
6 changed files with 1760 additions and 1762 deletions

View File

@ -5887,10 +5887,8 @@ uint16_t mode_2Dscrollingtext(void) {
++SEGENV.aux1 &= 0xFF; // color shift ++SEGENV.aux1 &= 0xFF; // color shift
SEGENV.step = millis() + map(SEGMENT.speed, 0, 255, 10*FRAMETIME_FIXED, 2*FRAMETIME_FIXED); SEGENV.step = millis() + map(SEGMENT.speed, 0, 255, 10*FRAMETIME_FIXED, 2*FRAMETIME_FIXED);
if (!SEGMENT.check2) { if (!SEGMENT.check2) {
// we need it 3 times for (int y = 0; y < rows; y++) for (int x = 0; x < cols; x++ )
SEGMENT.fade_out(255 - (SEGMENT.custom1>>5)); // fade to background color SEGMENT.blendPixelColorXY(x, y, SEGCOLOR(1), 255 - (SEGMENT.custom1>>1));
SEGMENT.fade_out(255 - (SEGMENT.custom1>>5)); // fade to background color
SEGMENT.fade_out(255 - (SEGMENT.custom1>>5)); // fade to background color
} }
} }
for (int i = 0; i < numberOfLetters; i++) { for (int i = 0; i < numberOfLetters; i++) {

View File

@ -528,7 +528,7 @@ void Segment::drawCharacter(unsigned char chr, int16_t x, int16_t y, uint8_t w,
for (int j = 0; j<w; j++) { // character width for (int j = 0; j<w; j++) { // character width
int16_t x0 = x + (w-1) - j; int16_t x0 = x + (w-1) - j;
if ((x0 >= 0 || x0 < cols) && ((bits>>(j+(8-w))) & 0x01)) { // bit set & drawing on-screen if ((x0 >= 0 || x0 < cols) && ((bits>>(j+(8-w))) & 0x01)) { // bit set & drawing on-screen
addPixelColorXY(x0, y0, col); setPixelColorXY(x0, y0, col);
} }
} }
} }

View File

@ -1189,7 +1189,7 @@ TD .checkmark, TD .radiomark {
} }
.bp { .bp {
margin-bottom: 5px; margin-bottom: 8px;
} }
/* segment & preset wrapper */ /* segment & preset wrapper */

View File

@ -772,7 +772,7 @@ function populateSegments(s)
<tr> <tr>
<td><input class="noslide segn" id="seg${i}grp" type="number" min="1" max="255" value="${inst.grp}" oninput="updateLen(${i})" onkeydown="segEnter(${i})"></td> <td><input class="noslide segn" id="seg${i}grp" type="number" min="1" max="255" value="${inst.grp}" oninput="updateLen(${i})" onkeydown="segEnter(${i})"></td>
<td><input class="noslide segn" id="seg${i}spc" type="number" min="0" max="255" value="${inst.spc}" oninput="updateLen(${i})" onkeydown="segEnter(${i})"></td> <td><input class="noslide segn" id="seg${i}spc" type="number" min="0" max="255" value="${inst.spc}" oninput="updateLen(${i})" onkeydown="segEnter(${i})"></td>
<td><button class="btn btn-xs" onclick="setSeg(${i})"><i class="icons btn-icon" id="segc${i}">&#xe390;</i></button></td> <td style="text-align:left;"><button class="btn btn-xs" onclick="setSeg(${i})"><i class="icons btn-icon" id="segc${i}">&#xe390;</i></button></td>
</tr> </tr>
</table> </table>
<div class="h bp" id="seg${i}len"></div> <div class="h bp" id="seg${i}len"></div>
@ -1047,13 +1047,13 @@ function updateLen(s)
{ {
if (!gId(`seg${s}s`)) return; if (!gId(`seg${s}s`)) return;
var start = parseInt(gId(`seg${s}s`).value); var start = parseInt(gId(`seg${s}s`).value);
var stop = parseInt(gId(`seg${s}e`).value); var stop = parseInt(gId(`seg${s}e`).value) + (cfg.comp.seglen?start:0);
var len = stop - (cfg.comp.seglen?0:start); var len = stop - start;
if (isM) { if (isM) {
// matrix setup // matrix setup
let startY = parseInt(gId(`seg${s}sY`).value); let startY = parseInt(gId(`seg${s}sY`).value);
let stopY = parseInt(gId(`seg${s}eY`).value); let stopY = parseInt(gId(`seg${s}eY`).value) + (cfg.comp.seglen?startY:0);
len *= (stopY-(cfg.comp.seglen?0:startY)); len *= (stopY-startY);
let tPL = gId(`seg${s}lbtm`); let tPL = gId(`seg${s}lbtm`);
if (stop-start>1 && stopY-startY>1) { if (stop-start>1 && stopY-startY>1) {
// 2D segment // 2D segment

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
*/ */
// version code in format yymmddb (b = daily build) // version code in format yymmddb (b = daily build)
#define VERSION 2301170 #define VERSION 2301240
//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