Make colorwheel fast in older builds of circuitpython

This commit is contained in:
Roy Hooper 2020-05-16 13:58:49 -04:00
parent 357d87d23b
commit 79ae49e0a0

View file

@ -45,7 +45,11 @@ RAINBOW = (RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
try:
# Backwards compat for 5.3.0 and prior
try:
from _pixelbuf import colorwheel # pylint: disable=unused-import
except ImportError:
from _pixelbuf import wheel as colorwheel # pylint: disable=unused-import
except ImportError:
# Ensure we have a wheel if not built in
def colorwheel(pos):