From 4695ed3a0f8a4f1668cdb0717bc4cfb8da3b6589 Mon Sep 17 00:00:00 2001 From: Jagoda Estera Ślązak Date: Sat, 8 Feb 2025 14:37:12 +0100 Subject: Use unsigned integers where negative values doesn't make sense --- src/ESP32-VirtualMatrixPanel-I2S-DMA.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/ESP32-VirtualMatrixPanel-I2S-DMA.h b/src/ESP32-VirtualMatrixPanel-I2S-DMA.h index 50706a4..8270188 100644 --- a/src/ESP32-VirtualMatrixPanel-I2S-DMA.h +++ b/src/ESP32-VirtualMatrixPanel-I2S-DMA.h @@ -134,8 +134,8 @@ public: #endif #ifdef NO_GFX - inline int16_t width() const { return _virtualResX; } - inline int16_t height() const { return _virtualResY; } + inline uint16_t width() const { return _virtualResX; } + inline uint16_t height() const { return _virtualResY; } #endif uint16_t color444(uint8_t r, uint8_t g, uint8_t b) @@ -153,8 +153,8 @@ public: virtual VirtualCoords getCoords(int16_t x, int16_t y); VirtualCoords coords; - int16_t panelResX; - int16_t panelResY; + uint16_t panelResX; + uint16_t panelResY; private: MatrixPanel_I2S_DMA *display; @@ -162,17 +162,17 @@ private: PANEL_CHAIN_TYPE panel_chain_type; PANEL_SCAN_RATE panel_scan_rate = NORMAL_TWO_SCAN; - int16_t virtualResX; ///< Display width as combination of panels - int16_t virtualResY; ///< Display height as combination of panels + uint16_t virtualResX; ///< Display width as combination of panels + uint16_t virtualResY; ///< Display height as combination of panels - int16_t _virtualResX; ///< Display width as modified by current rotation - int16_t _virtualResY; ///< Display height as modified by current rotation + uint16_t _virtualResX; ///< Display width as modified by current rotation + uint16_t _virtualResY; ///< Display height as modified by current rotation - int16_t vmodule_rows; - int16_t vmodule_cols; + uint16_t vmodule_rows; + uint16_t vmodule_cols; - int16_t dmaResX; // The width of the chain in pixels (as the DMA engine sees it) + uint16_t dmaResX; // The width of the chain in pixels (as the DMA engine sees it) int _rotate = 0; -- cgit v1.3.1