示例#1
0
    def switchCallback(self, noisebox):
        strval = self.get_strval(noisebox)

        if (strval == "<-- BACK"):
            self.new_state(actions.draw_default_menu(noisebox))

        elif (strval == "START SERVER"):
            self.new_state(RotaryState_JacktripServerWaiting)
            self.new_state(actions.start_peer_session_as_server(noisebox))
        else:
            self.new_state(actions.start_peer_session_as_peer(noisebox))
示例#2
0
    def switchCallback(self, noisebox):
        """check menu value on button click and run corresponding methods"""

        strval = self.get_strval(noisebox)
        value = self.get_value(noisebox)

        if (strval == "<-- BACK"):
            self.new_state(actions.draw_default_menu(noisebox))

        elif (strval == "INPUT"):
            """Toggle input channels mono/stereo"""
            self.new_state(actions.toggle_input_channels(noisebox, value))

        elif (strval == "ADVANCED OPTIONS"):
            self.new_state(actions.jacktrip_menu(noisebox))

        elif (strval == "DEVICE INFO"):
            self.new_state(actions.show_ip_address(noisebox))

        elif (strval == "UPDATE"):
            self.new_state(actions.update(noisebox))

        elif (strval == "SWITCH OFF"):
            self.new_state(actions.shutdown(noisebox))
示例#3
0
 def switchCallback(self, noisebox):
     noisebox.oled.stop_scrolling_text()
     self.new_state(actions.draw_default_menu(noisebox))
示例#4
0
 def switchCallback(self, noisebox):
     noisebox.stop_jacktrip_session()
     self.new_state(actions.draw_default_menu(noisebox))
示例#5
0
 def switchCallback(self, noisebox):
     noisebox.stop_monitoring()
     self.new_state(actions.draw_default_menu(noisebox))