Solar balkony power plant, which includes control logic for switching between micro inverter and battery depending on the state of charge. The repository containing any drawings and manuals.
Apache License 2.0
0
stars
0
forks
source link
[BUG] not possible to use big graphics and whole screen can't be used #13
it's not possible to use the whole space of the display
graphics which larger than 255 in height or/and width can't be printed
:bangbang: To Reproduce**
:interrobang: Expected behavior
To fix this i have to change the passing parameters of the drawImage() function
// #######
// ILI9341: CONVERT char Array to Image on Screen
// #######
// Function for drawing the img
- void drawImage(const char* cImgArray, byte byHeight, byte byWidth, byte byX, byte byY) {
+ void drawImage(const char* cImgArray, uint16_t uiHeight, uint16_t uiWidth, uint16_t uiX, uint16_t uiY) {
// Transmit picture data onto screen for each line
- for (int y = 0; y < byHeight; y++) {
- for (int x = 0; x < byWidth; x++) {
- int index = y * byWidth + x;
+ for (int y = 0; y < uiHeight; y++) {
+ for (int x = 0; x < uiWidth; x++) {
+ int index = y * uiWidth + x;
uint8_t pixel = pgm_read_byte(&cImgArray[index]);
uint16_t color = convertPixelToColor(pixel);
- tft.drawPixel(byX + x, byY + y, color);
+ tft.drawPixel(uiX + x, uiY + y, color);
}
}
}
:camera: Screenshots
:computer: Desktop (please complete the following information):**
:iphone: Smartphone (please complete the following information):**
:bug: Describe the bug
:bangbang: To Reproduce**
:interrobang: Expected behavior
To fix this i have to change the passing parameters of the drawImage() function
:camera: Screenshots
:computer: Desktop (please complete the following information):**
:iphone: Smartphone (please complete the following information):**
Additional context