def krpc_connect(self): logger.info('Connecting to KSP...') try: Core.client().connect(ip=self.ip_input.text, rpc_port=int(self.rpc_port_input.text), stream_port=int(self.stream_port_input.text)) except (KrappErrorOSConnection, KrappErrorConnection): ErrorPopup().open()
def initialize(self, dt): Core.client().add_observer(self)
def stage(self): Core.client().stage()
def initialize(self, dt): Core.client().add_observer(self) # Register as observer
def on_enter(self, *args): Screen.on_enter(self, *args) Core.client().add_altitude_callback(self.update_altitude)