mirror of
https://github.com/Steve-Tech/YAFI.git
synced 2026-04-19 16:50:36 +00:00
Fix led colours being added multiple times
This commit is contained in:
@@ -95,6 +95,8 @@ class LedsPage(Gtk.Box):
|
|||||||
all_colours = ["Red", "Green", "Blue", "Yellow", "White", "Amber"]
|
all_colours = ["Red", "Green", "Blue", "Yellow", "White", "Amber"]
|
||||||
|
|
||||||
def add_colours(strings, led_id):
|
def add_colours(strings, led_id):
|
||||||
|
# Auto and Off should already be present
|
||||||
|
if strings.get_n_items() <= 2:
|
||||||
supported_colours = ec_commands.leds.led_control_get_max_values(
|
supported_colours = ec_commands.leds.led_control_get_max_values(
|
||||||
app.cros_ec, led_id
|
app.cros_ec, led_id
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user