Anzeigeproblem von Bilder SSD1306 Oled-Display mit Adafruit_GFX beheben.

Hallo,

da ich hier schon oft geholfen wurde, möchte ich nun auch mal die jenigen helfen, wo Bilder bei einem Oled Display SSD1306 in verbindung mit der AdafruitSSD1306 / Adafruit_GFX und dem LCD_Assistant.

Folgende änderungen habe ich gemacht:

Adafruit_GFX.h sucht nach:

 void drawBitmap(int16_t x, int16_t y, 
		  const uint8_t *bitmap, int16_t w, int16_t h,
		  uint16_t color);

Ersetzt es durch:

 void drawBitmap(uint8_t x, uint8_t y, 
		  const uint8_t *bitmap, uint8_t w, uint8_t h,
		  uint8_t color);

Adafruit_GFX.cpp sucht nach:

void Adafruit_GFX::drawBitmap(int16_t x, int16_t y, 
			      const uint8_t *bitmap, int16_t w, int16_t h,
			      uint16_t color) {
  int16_t i, j, byteWidth = (w + 7) / 8;
  for(j=0; j<h; j++) {
    for(i=0; i<w; i++ ) {
      if(pgm_read_byte(bitmap + j * byteWidth + i / 8) & (128 >> (i & 7))) {
	drawPixel(x+i, y+j, color);
      }
    }
  }
}

Ersetzt es durch:

void Adafruit_GFX::drawBitmap(uint8_t x, uint8_t y, 
			const uint8_t *bitmap, uint8_t w, uint8_t h,
			uint8_t color) {
			int16_t i, j, byteWidth = (w + 7) / 8;
  for (uint8_t j=0; j<h; j++) {
    for (uint8_t i=0; i<w; i++ ) {
      if (pgm_read_byte(bitmap + i + (j/8)*w) & _BV(j%8)) {
	drawPixel(x+i, y+j, color);
      }
    }
  }
}

LG. Rene