public void RestartPoseListener() { if (pl.Listening) { pl.Stop(); } PoseStatus.status = StatusButton.Status.Neutral; pl = SetupPL(); }
void Start() { Debug.Log("Starting up! :D"); VisionPortField.text = VisionPort.ToString(); FootstepPortField.text = FootstepPort.ToString(); PosePortField.text = PosePort.ToString(); if (InitComms()) { vl = SetupVL(); pl = SetupPL(); fl = SetupFL(); } }
private LolaComms.PoseListener SetupPL() { Debug.Log("Setting up PoseListener..."); LolaComms.PoseListener pl = new LolaComms.PoseListener(PosePort); pl.onError += (errstr) => { Debug.LogError("[Pose] " + errstr); }; pl.onNewPose += (pose) => Debug.Log("[Pose] New pose: S: " + pose.stamp + " T: " + pose.t_wr_cl + ", R: " + pose.R_wr_cl); pl.Listen(); Debug.Log("PoseListener: " + (pl.Listening ? "is listening" : "is NOT listening")); return(pl); }