From 0ab39f1ce1687ca1dbc699d255bdaa6535f67d27 Mon Sep 17 00:00:00 2001
From: Fabrice Weinberg <Fabrice@weinberg.me>
Date: Fri, 15 Jul 2016 21:01:53 +0200
Subject: [PATCH] Use drawVerticalLine in fillRect

---
 OLEDDisplay.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/OLEDDisplay.cpp b/OLEDDisplay.cpp
index 2161d3e..2be2414 100644
--- a/OLEDDisplay.cpp
+++ b/OLEDDisplay.cpp
@@ -130,8 +130,8 @@ void OLEDDisplay::drawRect(int16_t x, int16_t y, int16_t width, int16_t height)
 }
 
 void OLEDDisplay::fillRect(int16_t xMove, int16_t yMove, int16_t width, int16_t height) {
-  for (int16_t i = yMove; i < yMove + height; i++) {
-    drawHorizontalLine(xMove, i, width);
+  for (int16_t x = xMove; x < xMove + width; x++) {
+    drawVerticalLine(x, yMove, height);
   }
 }
 
-- 
GitLab