mirror of
https://github.com/wled/WLED.git
synced 2025-07-23 02:36:39 +00:00
Fix some compiler warnings
This commit is contained in:
parent
27bec89386
commit
f6c47ac19c
@ -185,14 +185,14 @@ void IRAM_ATTR Segment::setPixelColorXY(int x, int y, uint32_t col)
|
|||||||
x *= groupLength(); // expand to physical pixels
|
x *= groupLength(); // expand to physical pixels
|
||||||
y *= groupLength(); // expand to physical pixels
|
y *= groupLength(); // expand to physical pixels
|
||||||
|
|
||||||
unsigned W = width();
|
int W = width();
|
||||||
unsigned H = height();
|
int H = height();
|
||||||
if (x >= W || y >= H) return; // if pixel would fall out of segment just exit
|
if (x >= W || y >= H) return; // if pixel would fall out of segment just exit
|
||||||
|
|
||||||
uint32_t tmpCol = col;
|
uint32_t tmpCol = col;
|
||||||
for (unsigned j = 0; j < grouping; j++) { // groupping vertically
|
for (int j = 0; j < grouping; j++) { // groupping vertically
|
||||||
for (unsigned g = 0; g < grouping; g++) { // groupping horizontally
|
for (int g = 0; g < grouping; g++) { // groupping horizontally
|
||||||
unsigned xX = (x+g), yY = (y+j);
|
int xX = (x+g), yY = (y+j);
|
||||||
if (xX >= W || yY >= H) continue; // we have reached one dimension's end
|
if (xX >= W || yY >= H) continue; // we have reached one dimension's end
|
||||||
|
|
||||||
#ifndef WLED_DISABLE_MODE_BLEND
|
#ifndef WLED_DISABLE_MODE_BLEND
|
||||||
|
@ -905,8 +905,8 @@ uint32_t IRAM_ATTR Segment::getPixelColor(int i) const
|
|||||||
|
|
||||||
#ifndef WLED_DISABLE_2D
|
#ifndef WLED_DISABLE_2D
|
||||||
if (is2D()) {
|
if (is2D()) {
|
||||||
unsigned vH = virtualHeight(); // segment height in logical pixels
|
int vH = virtualHeight(); // segment height in logical pixels
|
||||||
unsigned vW = virtualWidth();
|
int vW = virtualWidth();
|
||||||
switch (map1D2D) {
|
switch (map1D2D) {
|
||||||
case M12_Pixels:
|
case M12_Pixels:
|
||||||
return getPixelColorXY(i % vW, i / vW);
|
return getPixelColorXY(i % vW, i / vW);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user