Skip to content

Commit bbe411f

Browse files
committed
Fixes for compilation errors on '0_15' branch
1 parent 2b72baf commit bbe411f

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

wled00/FX.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4861,6 +4861,7 @@ static const char _data_FX_MODE_FLOWSTRIPE[] PROGMEM = "Flow Stripe@Hue speed,Ef
48614861
#define XY(x,y) SEGMENT.XY(x,y)
48624862

48634863

4864+
#ifdef WLED_USE_AA_PIXELS
48644865
/////////////////////////////
48654866
// 2D Analog Clock //
48664867
/////////////////////////////
@@ -4900,7 +4901,8 @@ uint16_t mode_2DAnalogClock(void) { // By Andras Fekete (bandi1
49004901

49014902
return (1000 / WLED_FPS); // calculate once per second
49024903
} // mode_2DAnalogClock()
4903-
static const char _data_FX_MODE_2DANALOGCLOCK[] PROGMEM = "AnalogClock2D@;";
4904+
static const char _data_FX_MODE_2DANALOGCLOCK[] PROGMEM = "Analog Clock 2D@;";
4905+
#endif
49044906

49054907
// Black hole
49064908
uint16_t mode_2DBlackHole(void) { // By: Stepko https://editor.soulmatelights.com/gallery/1012 , Modified by: Andrew Tuline
@@ -8133,7 +8135,9 @@ void WS2812FX::setupEffectData() {
81338135

81348136
addEffect(FX_MODE_2DGEQ, &mode_2DGEQ, _data_FX_MODE_2DGEQ); // audio
81358137

8138+
#ifdef WLED_USE_AA_PIXELS
81368139
addEffect(FX_MODE_2DANALOGCLOCK, &mode_2DAnalogClock, _data_FX_MODE_2DANALOGCLOCK);
8140+
#endif
81378141
addEffect(FX_MODE_2DNOISE, &mode_2Dnoise, _data_FX_MODE_2DNOISE);
81388142

81398143
addEffect(FX_MODE_2DFIRENOISE, &mode_2Dfirenoise, _data_FX_MODE_2DFIRENOISE);

wled00/FX.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,9 @@ typedef struct Segment {
626626
void moveY(int8_t delta, bool wrap = false);
627627
void move(uint8_t dir, uint8_t delta, bool wrap = false);
628628
void drawCircle(uint16_t cx, uint16_t cy, uint8_t radius, CRGB c);
629+
#ifdef WLED_USE_AA_PIXELS
629630
void drawCircleAntialiased(uint16_t cx, uint16_t cy, uint8_t radius, CRGB c);
631+
#endif
630632
void fillCircle(uint16_t cx, uint16_t cy, uint8_t radius, CRGB c);
631633
void drawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint32_t c);
632634
inline void drawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, CRGB c) { drawLine(x0, y0, x1, y1, RGBW32(c.r,c.g,c.b,0)); } // automatic inline

wled00/FX_2Dfcn.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ void Segment::boxBlur(uint16_t i, bool vertical, fract8 blur_amount) {
370370
for (unsigned j = 0; j < dim1; j++) {
371371
unsigned x = vertical ? i : j;
372372
unsigned y = vertical ? j : i;
373-
setPixelColorXY(x, y, tmp[j]);
373+
setPixelColorXY((int)x, (int)y, tmp[j]);
374374
}
375375
}
376376

@@ -471,6 +471,7 @@ void Segment::drawCircle(uint16_t cx, uint16_t cy, uint8_t radius, CRGB col) {
471471
}
472472
}
473473

474+
#ifdef WLED_USE_AA_PIXELS
474475
void Segment::drawCircleAntialiased(uint16_t cx, uint16_t cy, uint8_t radius, CRGB col) {
475476
if (!isActive() || radius == 0) return; // not active
476477
const uint16_t cols = virtualWidth();
@@ -496,6 +497,7 @@ void Segment::drawCircleAntialiased(uint16_t cx, uint16_t cy, uint8_t radius, CR
496497
}
497498
}
498499
}
500+
#endif
499501

500502
// by stepko, taken from https://editor.soulmatelights.com/gallery/573-blobs
501503
void Segment::fillCircle(uint16_t cx, uint16_t cy, uint8_t radius, CRGB col) {
@@ -517,7 +519,7 @@ void Segment::nscale8(uint8_t scale) {
517519
const unsigned cols = virtualWidth();
518520
const unsigned rows = virtualHeight();
519521
for (unsigned y = 0; y < rows; y++) for (unsigned x = 0; x < cols; x++) {
520-
setPixelColorXY(x, y, CRGB(getPixelColorXY(x, y)).nscale8(scale));
522+
setPixelColorXY((int)x, (int)y, CRGB(getPixelColorXY(x, y)).nscale8(scale));
521523
}
522524
}
523525

0 commit comments

Comments
 (0)