Improved hardware SPI.

Removed unnecessary setTextSize in PrintLog.
This commit is contained in:
Jeroen Vermeulen - MageHost 2020-12-31 10:17:30 +01:00
parent 3676ad3eb8
commit 8f63663c1e
1 changed files with 1 additions and 4 deletions

View File

@ -63,10 +63,8 @@ void SSD1331_InitDriver() {
// init renderer // init renderer
if (PinUsed(GPIO_SSPI_CS) && PinUsed(GPIO_SSPI_DC) && PinUsed(GPIO_SSPI_MOSI) && PinUsed(GPIO_SSPI_SCLK) && PinUsed(GPIO_OLED_RESET)) { if (PinUsed(GPIO_SSPI_CS) && PinUsed(GPIO_SSPI_DC) && PinUsed(GPIO_SSPI_MOSI) && PinUsed(GPIO_SSPI_SCLK) && PinUsed(GPIO_OLED_RESET)) {
ssd1331 = new Adafruit_SSD1331(Pin(GPIO_SSPI_CS),Pin(GPIO_SSPI_DC),Pin(GPIO_SSPI_MOSI),Pin(GPIO_SSPI_SCLK),Pin(GPIO_OLED_RESET)); ssd1331 = new Adafruit_SSD1331(Pin(GPIO_SSPI_CS),Pin(GPIO_SSPI_DC),Pin(GPIO_SSPI_MOSI),Pin(GPIO_SSPI_SCLK),Pin(GPIO_OLED_RESET));
} else if (PinUsed(GPIO_SPI_CS) && PinUsed(GPIO_SPI_DC) && PinUsed(GPIO_OLED_RESET)) {
ssd1331 = new Adafruit_SSD1331(Pin(GPIO_SPI_CS),Pin(GPIO_SPI_DC),Pin(GPIO_OLED_RESET));
} else if (PinUsed(GPIO_SPI_CS) && PinUsed(GPIO_SPI_DC)) { } else if (PinUsed(GPIO_SPI_CS) && PinUsed(GPIO_SPI_DC)) {
ssd1331 = new Adafruit_SSD1331(&SPI,Pin(GPIO_SPI_CS),Pin(GPIO_SPI_DC)); ssd1331 = new Adafruit_SSD1331(&SPI,Pin(GPIO_SPI_CS),Pin(GPIO_SPI_DC),Pin(GPIO_OLED_RESET));
} else { } else {
return; return;
} }
@ -104,7 +102,6 @@ void SSD1331PrintLog(void)
uint8_t last_row = Settings.display_rows -1; uint8_t last_row = Settings.display_rows -1;
renderer->clearDisplay(); renderer->clearDisplay();
renderer->setTextSize(Settings.display_size);
renderer->setCursor(0,0); renderer->setCursor(0,0);
for (byte i = 0; i < last_row; i++) { for (byte i = 0; i < last_row; i++) {
strlcpy(disp_screen_buffer[i], disp_screen_buffer[i +1], disp_screen_buffer_cols); strlcpy(disp_screen_buffer[i], disp_screen_buffer[i +1], disp_screen_buffer_cols);