add move wheel/leg

This commit is contained in:
2025-10-25 17:27:30 +08:00
parent 076d1c3bf4
commit e1504ff1b1

View File

@@ -278,6 +278,45 @@ def build_ui(node: CtrlGuiNode) -> None:
move_waist_
)).classes('self-end')
#move wheel
with ui.column():
with ui.row():
move_wheel_input_move_forward = ui.input('forward', value='0').style('width: 100px')
move_wheel_input_move_turn = ui.input('turn', value='0').style('width: 100px')
# TODO check input data
def move_wheel_() -> None:
node.file_logger.info('Running move_wheel_...')
action_name = "MoveWheel"
text = f"move_distance: {move_wheel_input_move_forward.value}\nmove_angle: {move_wheel_input_move_turn.value}\n"
# send_action_package(action_name, text)
node.rebuild_now("Remote", action_name, text)
ui.button('Move Wheel', on_click=lambda: show_confirm_dialog(
f'Confirm Move Wheel operation?\nmove_distance: {move_wheel_input_move_forward.value}\nmove_angle: {move_wheel_input_move_turn.value}',
move_wheel_
)).classes('self-end')
#move leg
with ui.column():
with ui.row():
move_leg_input_move_distance = ui.input('distance', value='0').style('width: 100px')
# TODO check input data
def move_leg_() -> None:
node.file_logger.info('Running move_leg_...')
action_name = "MoveLeg"
text = f"move_up_distance: {move_leg_input_move_distance.value}\n"
# send_action_package(action_name, text)
node.rebuild_now("Remote", action_name, text)
ui.button('Move Leg', on_click=lambda: show_confirm_dialog(
f'Confirm Move Leg operation?\nmove_up_distance: {move_leg_input_move_distance.value}',
move_leg_
)).classes('self-end')
# LED control
with ui.column():
with ui.row():