public void callbackVoltMonitor( m.Float32 msg) { Dispatcher.BeginInvoke(new Action(() => { if (abraCadabra.Visibility != Visibility.Visible) abraCadabra.Visibility = Visibility.Visible; textBlock1.Text = msg.data + "v"; })); }
private void cb(int i, m.String msg) { Dispatcher.BeginInvoke(new Action(() => { if (abraCadabra.Visibility == System.Windows.Visibility.Hidden) abraCadabra.Visibility = Visibility.Visible; })); string[] split = msg.data.Split('='); if (split.Length != 2) { Console.WriteLine("CRAP"); return; } if (split[0].Equals("BA")) { string[] perside = split[1].Split(':'); float[] vals = new[] { 0f, 0f }; for (int j = 0; j < perside.Length; j++) { float.TryParse(perside[j], out vals[j]); vals[j] /= 10.0f; } setSingle(i*2, vals[i]); setSingle(i*2+1, vals[1-i]); } /*StringBuilder sb = new StringBuilder("mc[" + i + "] = \n"); lock(telem[i]) { if (!telem[i].ContainsKey(split[0][0])) telem[i].Add(split[0][0], split[1]); else telem[i][split[0][0]] = split[1]; List<KeyValuePair<char, string>> sorted = telem[i].ToList(); sorted.Sort((x,y)=>x.Key.CompareTo(y.Key)); foreach (KeyValuePair<char, string> kvp in sorted) { sb.AppendLine("" + kvp.Key + " = " + kvp.Value); } } Console.WriteLine(sb);*/ }
private void callbackEStop(m.Bool msg) { Dispatcher.Invoke(new Action(()=>setMode(msg.data))); }
private void cb1(m.String msg) { cb(1, msg); }
private void cb0(m.String msg) { cb(0, msg); }
private void callback(m.Int32 msg) { Console.WriteLine("Tilt: " + msg.data.ToString()); }
private static void chatterCallback(m.String s) { ROS.Info("RECEIVED: " + s.data); }
private static void chatterCallback(m.String s) { Console.WriteLine("RECEIVED: " + s.data); }