Beispiel #1
0
def select_mode():
    mode = int(get_value("i0"))
    if mode == 0:
        disable_items(MODEL_PARAMS)
    elif mode == 1:
        disable_items(MODEL_PARAMS)
        enable_items(MODEL_PARAMS)
        disable_readonly(MODEL_PARAMS)
Beispiel #2
0
def render_call(sender, data):
    global udp

    if not udp.enable:
        enable_items(["Connect", "Address"])
        disable_items(POST_CONNECTION_COMMON_ITEMS + MODEL_PARAMS)
        set_value("i0", 0)
        setup_params("", "")
    plot_callback()
Beispiel #3
0
def connect(sender, data):
    global udp
    udp.enable = True
    address = get_value("address")
    # port = get_value("port")
    udp.connect(address)
    print(address)
    enable_items(POST_CONNECTION_COMMON_ITEMS)
    disable_items(["Connect", "Address"])
    disable_readonly(MODEL_PARAMS)
    disable_readonly(["s"])
Beispiel #4
0
def render_call(sender, data):
    global click_check, udp
    plot_callback()
    if is_item_clicked("mode"):
        click_check = True
        return
    if click_check:
        # print(get_value("i0"))
        click_check = False

    if not udp.enable:
        enable_items(["Connect", "Address"])
        disable_items(POST_CONNECTION_COMMON_ITEMS + MODEL_PARAMS)
        set_value("i0", 0)
        setup_params("", "")
Beispiel #5
0
def select_mode():
    mode = int(get_value("i0"))
    if mode == 0:
        disable_items(MODEL_PARAMS)
    elif mode == 1:
        disable_items(MODEL_PARAMS)
        enable_items(MODEL_PARAMS[:4])
        disable_readonly(["F_set", "shaker_freq"])
    elif mode == 2:
        disable_items(MODEL_PARAMS)
        enable_items(MODEL_PARAMS[4])
        disable_readonly(MODEL_PARAMS[4])
    elif mode == 3:
        disable_items(MODEL_PARAMS)
        enable_items(["f_mode2", "m"])
        disable_readonly(["f_mode2", "m"])
    elif mode == 4:
        disable_items(MODEL_PARAMS)
        enable_items(["F_set", "f_mode3"])
        disable_readonly(["F_set", "f_mode3"])
    elif mode == 5:
        disable_items(MODEL_PARAMS)
        enable_items(["F_set"])
        disable_readonly(["F_set"])
    elif mode == 6:
        disable_items(MODEL_PARAMS)
        enable_items(["a_mode5", "b_mode5", "c_mode5", "d_mode5", "g_mode5"])
        disable_readonly(["a_mode5", "b_mode5", "c_mode5", "d_mode5", "g_mode5"])
    elif mode == 7:
        disable_items(MODEL_PARAMS)
        enable_items(["v_mode6", "kD_mode6", "pow_mode6"])
        disable_readonly(["v_mode6", "kD_mode6", "pow_mode6"])
    elif mode == 8:
        disable_items(MODEL_PARAMS)
        enable_items(["m"])
        disable_readonly(["m"])