Skip to content

Commit

Permalink
Merge pull request #72 from KurtE/scrollMargin
Browse files Browse the repository at this point in the history
Fix computation in scrollMargin
  • Loading branch information
ladyada authored May 15, 2021
2 parents 8b01d82 + d269482 commit 8eed722
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Adafruit_ILI9341.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8eed722

Please sign in to comment.