aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-08-06 22:25:26 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-08-06 22:25:26 -0400
commit115b8881063dee121ef65a4ee75365d3908fbb02 (patch)
treed416e0da45776b7a5c50f0ae87be4f64b0aaf112 /klippy
parent4c09d8bf029b5fac770fba9026c930805fd6ba32 (diff)
downloadkutter-115b8881063dee121ef65a4ee75365d3908fbb02.tar.gz
kutter-115b8881063dee121ef65a4ee75365d3908fbb02.tar.xz
kutter-115b8881063dee121ef65a4ee75365d3908fbb02.zip
neopixel: Use low priority for LED updates
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy')
-rw-r--r--klippy/extras/dotstar.py5
-rw-r--r--klippy/extras/neopixel.py5
2 files changed, 8 insertions, 2 deletions
diff --git a/klippy/extras/dotstar.py b/klippy/extras/dotstar.py
index 51730fb4..9c1e5e6b 100644
--- a/klippy/extras/dotstar.py
+++ b/klippy/extras/dotstar.py
@@ -5,6 +5,8 @@
# This file may be distributed under the terms of the GNU GPLv3 license.
import bus
+BACKGROUND_PRIORITY_CLOCK = 0x7fffffff00000000
+
class PrinterDotstar:
def __init__(self, config):
self.printer = config.get_printer()
@@ -36,7 +38,8 @@ class PrinterDotstar:
self.cmd_SET_LED,
desc=self.cmd_SET_LED_help)
def send_data(self, minclock=0):
- self.spi.spi_send(self.color_data, minclock=minclock, reqclock=minclock)
+ self.spi.spi_send(self.color_data, minclock=minclock,
+ reqclock=BACKGROUND_PRIORITY_CLOCK)
cmd_SET_LED_help = "Set the color of an LED"
def cmd_SET_LED(self, params):
# Parse parameters
diff --git a/klippy/extras/neopixel.py b/klippy/extras/neopixel.py
index 8379f65b..dad6f18f 100644
--- a/klippy/extras/neopixel.py
+++ b/klippy/extras/neopixel.py
@@ -4,6 +4,8 @@
#
# This file may be distributed under the terms of the GNU GPLv3 license.
+BACKGROUND_PRIORITY_CLOCK = 0x7fffffff00000000
+
class PrinterNeoPixel:
def __init__(self, config):
self.printer = config.get_printer()
@@ -41,7 +43,8 @@ class PrinterNeoPixel:
"neopixel_send oid=%c data=%*s", cq=cmd_queue)
def send_data(self, minclock=0):
self.neopixel_send_cmd.send([self.oid, self.color_data],
- minclock=minclock)
+ minclock=minclock,
+ reqclock=BACKGROUND_PRIORITY_CLOCK)
cmd_SET_LED_help = "Set the color of an LED"
def cmd_SET_LED(self, params):
# Parse parameters