def toggle_trigger_measure_button_label(measure_triggered, mode_val, btn_text):
    """change the label of the trigger button"""

    if mode_val == "single":
        return "Single measure"
    else:
        if measure_triggered:
            if btn_text == "Start sweep":
                return "Stop sweep"
            else:
                return "Start sweep"
        else:
            return "Start sweep"