neopixel: Warn that the neopixel isn't currently supported on AVR

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-07-17 16:54:47 -04:00
parent d5cc2a7b7b
commit e3c5638147
1 changed files with 3 additions and 0 deletions

View File

@ -23,6 +23,9 @@ class PrinterNeoPixel:
self.cmd_SET_NEOPIXEL,
desc=self.cmd_SET_NEOPIXEL_help)
def build_config(self):
if self.mcu.get_constant_float('CLOCK_FREQ') <= 20000000:
raise self.printer.config_error(
"Neopixel is not supported on AVR micro-controllers")
cmd_queue = self.mcu.alloc_command_queue()
self.neopixel_send_cmd = self.mcu.lookup_command(
"neopixel_send oid=%c data=%*s", cq=cmd_queue)