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))
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))
def switchCallback(self, noisebox): noisebox.oled.stop_scrolling_text() self.new_state(actions.draw_default_menu(noisebox))
def switchCallback(self, noisebox): noisebox.stop_jacktrip_session() self.new_state(actions.draw_default_menu(noisebox))
def switchCallback(self, noisebox): noisebox.stop_monitoring() self.new_state(actions.draw_default_menu(noisebox))