Skip to content

Commit 1b799f7

Browse files
committed
Fixes for compilation errors on '0_15' branch
1 parent fd16120 commit 1b799f7

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

wled00/FX.cpp

Lines changed: 6 additions & 2 deletions
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
/////////////////////////////
@@ -4893,14 +4894,15 @@ uint16_t mode_2DAnalogClock(void) { // By Andras Fekete (bandi1
48934894
uint16_t second_y = centerY + second_len * sin_t(second_angle);
48944895

48954896
SEGMENT.fill(BLACK);
4896-
SEGMENT.draw_circle_antialiased(centerX, centerY, radius, DARKSLATEGRAY);
4897+
SEGMENT.drawCircleAntialiased(centerX, centerY, radius, 0x333333);
48974898
SEGMENT.drawLineAntialiased(centerX, centerY, second_x, second_y, BLUE);
48984899
SEGMENT.drawLineAntialiased(centerX, centerY, minute_x, minute_y, GREEN);
48994900
SEGMENT.drawLineAntialiased(centerX, centerY, hour_x, hour_y, RED);
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: 3 additions & 1 deletion
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 draw_circle(uint16_t cx, uint16_t cy, uint8_t radius, CRGB c);
629-
void draw_circle_antialiased(uint16_t cx, uint16_t cy, uint8_t radius, CRGB c);
629+
#ifdef WLED_USE_AA_PIXELS
630+
void drawCircleAntialiased(uint16_t cx, uint16_t cy, uint8_t radius, CRGB c);
631+
#endif
630632
void fill_circle(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: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ void Segment::box_blur(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,7 +471,8 @@ void Segment::draw_circle(uint16_t cx, uint16_t cy, uint8_t radius, CRGB col) {
471471
}
472472
}
473473

474-
void Segment::draw_circle_antialiased(uint16_t cx, uint16_t cy, uint8_t radius, CRGB col) {
474+
#ifdef WLED_USE_AA_PIXELS
475+
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();
477478
const uint16_t rows = virtualHeight();
@@ -496,6 +497,7 @@ void Segment::draw_circle_antialiased(uint16_t cx, uint16_t cy, uint8_t radius,
496497
}
497498
}
498499
}
500+
#endif
499501

500502
// by stepko, taken from https://editor.soulmatelights.com/gallery/573-blobs
501503
void Segment::fill_circle(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)