diff --git a/OLEDDisplay.cpp b/OLEDDisplay.cpp index 466bb687..5fc15dbe 100644 --- a/OLEDDisplay.cpp +++ b/OLEDDisplay.cpp @@ -762,7 +762,6 @@ void inline OLEDDisplay::drawInternal(int16_t xMove, int16_t yMove, int16_t widt int16_t xPos = xMove + (i / rasterHeight); int16_t yPos = ((yMove >> 3) + (i % rasterHeight)) * displayWidth; - int16_t yScreenPos = yMove + yOffset; int16_t dataPos = xPos + yPos; if (dataPos >= 0 && dataPos < displayBufferSize && diff --git a/OLEDDisplay.h b/OLEDDisplay.h index 95dcbd2b..83c966c8 100644 --- a/OLEDDisplay.h +++ b/OLEDDisplay.h @@ -273,10 +273,10 @@ class OLEDDisplay : public Print { char *logBuffer = NULL; // Send a command to the display (low level function) - virtual void sendCommand(uint8_t com) {}; + virtual void sendCommand(uint8_t com) {(void)com;}; // Connect to the display - virtual bool connect() {return true;}; + virtual bool connect() {return false;}; // Send all the init commands void sendInitCommands(); diff --git a/OLEDDisplayUi.cpp b/OLEDDisplayUi.cpp index 03eff9c4..b29b8b55 100644 --- a/OLEDDisplayUi.cpp +++ b/OLEDDisplayUi.cpp @@ -251,7 +251,7 @@ void OLEDDisplayUi::drawFrame(){ switch (this->state.frameState){ case IN_TRANSITION: { float progress = (float) this->state.ticksSinceLastStateSwitch / (float) this->ticksPerTransition; - int16_t x, y, x1, y1; + int16_t x = 0, y = 0, x1 = 0, y1 = 0; switch(this->frameAnimationDirection){ case SLIDE_LEFT: x = -(this->display->getWidth()) * progress; @@ -332,7 +332,7 @@ void OLEDDisplayUi::drawIndicator() { return; } - uint8_t posOfHighlightFrame; + uint8_t posOfHighlightFrame = 0; float indicatorFadeProgress = 0; // if the indicator needs to be slided in we want to @@ -372,6 +372,7 @@ void OLEDDisplayUi::drawIndicator() { const uint8_t *image; uint16_t x,y; + for (byte i = 0; i < this->frameCount; i++) { switch (this->indicatorPosition){ diff --git a/SSD1306Wire.h b/SSD1306Wire.h index e82d9b54..2c92327e 100644 --- a/SSD1306Wire.h +++ b/SSD1306Wire.h @@ -91,7 +91,7 @@ class SSD1306Wire : public OLEDDisplay { // If the minBoundY wasn't updated // we can savely assume that buffer_back[pos] == buffer[pos] // holdes true for all values of pos - if (minBoundY == ~0) return; + if (minBoundY == (uint8_t)(~0)) return; sendCommand(COLUMNADDR); sendCommand(minBoundX);