squix78 / esp8266-projects

Other
249 stars 193 forks source link

SSD1306::fillRect not drawing at correct y #7

Closed akileos closed 8 years ago

akileos commented 8 years ago

Hi there,

Progress is drawn on whole screen instead of being bound in box.

Original :

void SSD1306::fillRect(int x, int y, int width, int height) {
  for (int i = x; i < x + width; i++) {
    for (int j = 0; j < y + height; j++) {
      setPixel(i, j);
    }
  }
}

Should be

for (int i = x; i < x + width; i++) {
    for (int j = y; j < y + height; j++) {
      display.setPixel(i, j);
    }
akileos commented 8 years ago

Damn, wrong repo + already fixed. Sorry for the noise.