Make colorwheel fast in older builds of circuitpython
This commit is contained in:
parent
357d87d23b
commit
79ae49e0a0
1 changed files with 5 additions and 1 deletions
|
|
@ -45,7 +45,11 @@ RAINBOW = (RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from _pixelbuf import colorwheel # pylint: disable=unused-import
|
# 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:
|
except ImportError:
|
||||||
# Ensure we have a wheel if not built in
|
# Ensure we have a wheel if not built in
|
||||||
def colorwheel(pos):
|
def colorwheel(pos):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue