bugfix for 2.8.4 (issue #106), will fix issue #96

This commit is contained in:
olikraus 2016-12-12 21:10:42 +01:00
parent 1947f74f72
commit a41437eb01
3 changed files with 15 additions and 14 deletions

View File

@ -170,6 +170,19 @@ void u8g2_draw_hv_line_4dir(u8g2_t *u8g2, u8g2_uint_t x, u8g2_uint_t y, u8g2_uin
#ifdef U8G2_WITH_HVLINE_COUNT
u8g2->hv_cnt++;
#endif /* U8G2_WITH_HVLINE_COUNT */
/* additional optimization for one pixel draw */
/* requires about 60 bytes on the ATMega flash memory */
/* 20% improvement for single pixel draw test in FPS.ino */
#ifdef U8G2_WITH_ONE_PIXEL_OPTIMIZATION
if ( len == 1 )
{
y -= u8g2->tile_curr_row*8;
if ( x < u8g2->pixel_buf_width && y < u8g2->pixel_buf_height )
u8g2->ll_hvline(u8g2, x, y, len, dir);
return;
}
#endif
if ( dir == 2 )
{
@ -196,18 +209,6 @@ void u8g2_draw_hv_line_4dir(u8g2_t *u8g2, u8g2_uint_t x, u8g2_uint_t y, u8g2_uin
*/
void u8g2_DrawHVLine(u8g2_t *u8g2, u8g2_uint_t x, u8g2_uint_t y, u8g2_uint_t len, uint8_t dir)
{
/* additional optimization for one pixel draw */
/* requires about 60 bytes on the ATMega flash memory */
/* 20% improvement for single pixel draw test in FPS.ino */
#ifdef U8G2_WITH_ONE_PIXEL_OPTIMIZATION
if ( len == 1 )
{
y -= u8g2->tile_curr_row*8;
if ( x < u8g2->pixel_buf_width && y < u8g2->pixel_buf_height )
u8g2->ll_hvline(u8g2, x, y, len, dir);
return;
}
#endif
/* Make a call to the callback function (e.g. u8g2_draw_l90_r0). */

View File

@ -178,7 +178,7 @@
11 Dec 2016
U8G2_SSD1306_128X64_NONAME_1_4W_HW_SPI Uno Clip=25.8 Box=84.2 @=4.2 Pix=7.8 Old: no pixel optimization
U8G2_SSD1306_128X64_NONAME_1_4W_HW_SPI Uno Clip=26.3 Box=83.3 @=4.4 Pix=9.1 Pixel (len=1) optimization
U8G2_SSD1306_128X64_NONAME_1_4W_HW_SPI Uno Clip=25.9 Box=84.1 @=4.3 Pix=8.3 Pixel (len=1) optimization
*/

View File

@ -59,7 +59,7 @@
// Please update the pin numbers according to your setup. Use U8X8_PIN_NONE if the reset pin is not connected
//U8G2_SSD1306_128X64_NONAME_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1306_128X64_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 12, /* dc=*/ 4, /* reset=*/ 6); // Arduboy (Production, Kickstarter Edition)
//U8G2_SSD1306_128X64_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1306_128X64_NONAME_1_4W_HW_SPI u8g2(U8G2_R2, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1306_128X64_NONAME_1_3W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8);
//U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* reset=*/ 8);
//U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // All Boards without Reset of the Display