modify led_cmd
This commit is contained in:
@@ -352,13 +352,13 @@ def build_ui(node: CtrlGuiNode) -> None:
|
||||
# LED control
|
||||
with ui.column():
|
||||
with ui.row():
|
||||
color_input = ui.select(['red', 'green', 'blue', 'cyan', 'yellow', 'purple', 'white'], value='red').style('width: 100px')
|
||||
color_input = ui.select(['red', 'green', 'blue', 'cyan', 'yellow', 'purple', 'white', 'off'], value='red').style('width: 100px')
|
||||
|
||||
def led_control_() -> None:
|
||||
try:
|
||||
# TODO check input data
|
||||
|
||||
text = f"data: {{{color_input.value}, 10}}"
|
||||
text = f"{color_input.value}, 10"
|
||||
node.publish_info(text)
|
||||
ui.notify(f'Sent: {text}')
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user