Compiler warnings

width and height to PlotRawImage
This commit is contained in:
penfold42 2018-07-26 14:57:57 +10:00
parent f0ee85d022
commit 2f023ab756
3 changed files with 8 additions and 8 deletions

View file

@ -27,7 +27,7 @@ extern "C"
unsigned char frame[SSD1306_128x64_BYTES];
SSD1306::SSD1306(int BSCMaster, u8 address, int width, int height, int flip, LCD_MODEL type)
SSD1306::SSD1306(int BSCMaster, u8 address, unsigned width, unsigned height, int flip, LCD_MODEL type)
: BSCMaster(BSCMaster)
, address(address)
, type(type)
@ -135,7 +135,7 @@ void SSD1306::MoveCursorByte(u8 page, u8 col)
void SSD1306::RefreshScreen()
{
int i;
unsigned i;
for (i = 0; i < height/8; i++)
{
RefreshPage(i);

View file

@ -76,7 +76,7 @@ class SSD1306
public:
// 128x32 0x3C
// 128x64 0x3D or 0x3C (if SA0 is grounded)
SSD1306(int BSCMaster = 1, u8 address = 0x3C, int width = 128, int height = 64, int flip = 0, LCD_MODEL type=LCD_UNKNOWN);
SSD1306(int BSCMaster = 1, u8 address = 0x3C, unsigned width = 128, unsigned height = 64, int flip = 0, LCD_MODEL type=LCD_UNKNOWN);
void PlotCharacter(int x, int y, char ascii, bool inverse);
void PlotText(int x, int y, char* str, bool inverse);
@ -110,8 +110,8 @@ protected:
int type;
int flip;
int contrast;
int width;
int height;
unsigned width;
unsigned height;
};
#endif

View file

@ -381,14 +381,14 @@ void InitialiseLCD()
bool logo_done = false;
if ( (height == 64) && (strcasecmp(options.GetLcdLogoName(), "1541ii") == 0) )
{
screenLCD->PlotRawImage(logo_ssd_1541ii, 0, 0, 128, 64);
screenLCD->PlotRawImage(logo_ssd_1541ii, 0, 0, width, height);
snprintf(tempBuffer, tempBufferSize, "Pi1541 V%d.%02d", versionMajor, versionMinor);
screenLCD->PrintText(0, 16, 0, tempBuffer, 0xffffffff);
logo_done = true;
}
else if (( height == 64) && (strcasecmp(options.GetLcdLogoName(), "1541classic") == 0) )
{
screenLCD->PlotRawImage(logo_ssd_1541classic, 0, 0, 128, 64);
screenLCD->PlotRawImage(logo_ssd_1541classic, 0, 0, width, height);
logo_done = true;
}
else if (f_stat(options.GetLcdLogoName(), &filLcdIcon) == FR_OK && filLcdIcon.fsize <= LCD_LOGO_MAX_SIZE)
@ -402,7 +402,7 @@ void InitialiseLCD()
u32 bytesRead;
f_read(&fp, LcdLogoFile, LCD_LOGO_MAX_SIZE, &bytesRead);
f_close(&fp);
screenLCD->PlotRawImage(LcdLogoFile, 0, 0, 128, height);
screenLCD->PlotRawImage(LcdLogoFile, 0, 0, width, height);
logo_done = true;
}
}