mirror of
https://github.com/adafruit/Adafruit_ILI9341.git
synced 2026-10-26 22:10:38 +00:00
Merge pull request #72 from KurtE/scrollMargin
Fix computation in scrollMargin
This commit is contained in:
1 file changed
+1
-1
@@ -277,7 +277,7 @@ void Adafruit_ILI9341::scrollTo(uint16_t y) {
|
||||
void Adafruit_ILI9341::setScrollMargins(uint16_t top, uint16_t bottom) {
|
||||
// TFA+VSA+BFA must equal 320
|
||||
if (top + bottom <= ILI9341_TFTHEIGHT) {
|
||||
uint16_t middle = ILI9341_TFTHEIGHT - top + bottom;
|
||||
uint16_t middle = ILI9341_TFTHEIGHT - (top + bottom);
|
||||
uint8_t data[6];
|
||||
data[0] = top >> 8;
|
||||
data[1] = top & 0xff;
|
||||
|
||||
Reference in new issue
Block a user