From ccb02395583f7631fb75ed99b39e7486d1eb87e8 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Sun, 25 Sep 2016 12:55:49 -0700 Subject: [PATCH] ClearTo with first and last index doesn't handle a single pixel The argument valid test needed to support that first and last could be the same --- library.json | 2 +- library.properties | 2 +- src/NeoPixelBus.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library.json b/library.json index 591bd7a7..3ddf0979 100644 --- a/library.json +++ b/library.json @@ -8,7 +8,7 @@ "type": "git", "url": "https://github.com/Makuna/NeoPixelBus" }, - "version": "2.2.2", + "version": "2.2.3", "frameworks": "arduino", "platforms": "*" } diff --git a/library.properties b/library.properties index 960165d4..8aeb35c2 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=NeoPixelBus by Makuna -version=2.2.2 +version=2.2.3 author=Michael C. Miller (makuna@live.com) maintainer=Michael C. Miller (makuna@live.com) sentence=A library that makes controlling NeoPixels (WS2811, WS2812 & SK6812) and DotStars (ADA102) easy. diff --git a/src/NeoPixelBus.h b/src/NeoPixelBus.h index bda023f0..dd4e1f03 100644 --- a/src/NeoPixelBus.h +++ b/src/NeoPixelBus.h @@ -211,7 +211,7 @@ template class NeoPixelBus { if (first < _countPixels && last < _countPixels && - first < last) + first <= last) { uint8_t temp[T_COLOR_FEATURE::PixelSize]; uint8_t* pixels = _method.getPixels();