fixing some compiler warnings
signed vs. unsigned, deprecated functions, printf parameter size mismatch
This commit is contained in:
@@ -335,7 +335,7 @@ void IRAM_ATTR_YN Segment::setPixelColorXY(int x, int y, uint32_t col) //WLEDMM:
|
||||
|
||||
x *= glen_; // expand to physical pixels
|
||||
y *= glen_; // expand to physical pixels
|
||||
if (x >= wid_ || y >= hei_) return; // if pixel would fall out of segment just exit
|
||||
if (unsigned(x) >= wid_ || unsigned(y) >= hei_) return; // if pixel would fall out of segment just exit
|
||||
|
||||
const int grp_ = grouping; // WLEDMM optimization
|
||||
for (int j = 0; j < grp_; j++) { // groupping vertically
|
||||
|
||||
@@ -1860,13 +1860,13 @@ void WS2812FX::finalizeInit(void)
|
||||
// problem: suspendStripService provides interlocking, but there’s a window before service() observes it,
|
||||
// and ESP32 is dual-core. A critical section closes that window so the pointer swap is atomic across cores.
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
taskENTER_CRITICAL(&s_wled_strip_mux);
|
||||
portENTER_CRITICAL(&s_wled_strip_mux);
|
||||
#endif
|
||||
free(Segment::_globalLeds);
|
||||
Segment::_globalLeds = nullptr;
|
||||
purgeSegments(true); // WLEDMM moved here, because it seems to improve stability.
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
taskEXIT_CRITICAL(&s_wled_strip_mux);
|
||||
portEXIT_CRITICAL(&s_wled_strip_mux);
|
||||
#endif
|
||||
}
|
||||
if (useLedsArray && getLengthTotal()>0) { // WLEDMM avoid malloc(0)
|
||||
|
||||
@@ -92,7 +92,7 @@ void wsEvent(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventTyp
|
||||
handleE131Packet((e131_packet_t*)&data[offset], client->remoteIP(), P_ARTNET);
|
||||
break;
|
||||
case BINARY_PROTOCOL_DDP:
|
||||
if (len < 10 + offset) return; // DDP header is 10 bytes (+1 protocol byte)
|
||||
if (len < unsigned(10 + offset)) return; // DDP header is 10 bytes (+1 protocol byte)
|
||||
size_t ddpDataLen = (data[8+offset] << 8) | data[9+offset]; // data length in bytes from DDP header
|
||||
uint8_t flags = data[0+offset];
|
||||
if ((flags & DDP_TIMECODE_FLAG) ) ddpDataLen += 4; // timecode flag adds 4 bytes to data length
|
||||
@@ -102,7 +102,7 @@ void wsEvent(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventTyp
|
||||
}
|
||||
}
|
||||
} else {
|
||||
DEBUG_PRINTF("WS multipart message: final %u index %u len %u total %u\n", info->final, info->index, len, (uint32_t)info->len);
|
||||
DEBUG_PRINTF("WS multipart message: final %u index %u len %u total %u\n", info->final, uint32_t(info->index), len, (uint32_t)info->len);
|
||||
//message is comprised of multiple frames or the frame is split into multiple packets
|
||||
//if(info->index == 0){
|
||||
//if (!wsFrameBuffer && len < 4096) wsFrameBuffer = new uint8_t[4096];
|
||||
|
||||
Reference in New Issue
Block a user