mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-09 06:45:26 -06:00
neopixel: Update neopixel.py to add BRG color order (#5110)
Add BRG color option. Document BRG color option. Signed-off-by: Timothy Abraham <Timothyabe93@gmail.com>
This commit is contained in:
parent
090fcf928f
commit
babb067b60
2 changed files with 4 additions and 2 deletions
|
@ -24,7 +24,7 @@ class PrinterNeoPixel:
|
|||
self.oid = self.mcu.create_oid()
|
||||
self.pin = pin_params['pin']
|
||||
self.mcu.register_config_callback(self.build_config)
|
||||
formats = {v: v for v in ["RGB", "GRB", "RGBW", "GRBW"]}
|
||||
formats = {v: v for v in ["RGB", "GRB", "BRG", "RGBW", "GRBW"]}
|
||||
self.color_order = config.getchoice("color_order", formats, "GRB")
|
||||
elem_size = len(self.color_order)
|
||||
self.chain_count = config.getint('chain_count', 1, minval=1,
|
||||
|
@ -67,6 +67,8 @@ class PrinterNeoPixel:
|
|||
color_data = [green, red, blue]
|
||||
elif self.color_order == "RGB":
|
||||
color_data = [red, green, blue]
|
||||
elif self.color_order == "BRG":
|
||||
color_data = [blue, red, green]
|
||||
elif self.color_order == "GRBW":
|
||||
color_data = [green, red, blue, white]
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue