public ImageProcessing() { // inistialzie the dialog windows components InitializeComponent(); // setup access to the network table NetworkTable.setClientMode(); NetworkTable.setIPAddress("10.38.24.2"); table = NetworkTable.getTable("SmartDashboard"); // setup a link to the camera videl //capture = new Capture("rtsp://192.168.0.90:554/axis-media/media.amp"); capture = new Capture("rtsp://10.38.24.11:554/axis-media/media.amp"); // This is for testing via webcam image. //capture = new Capture(); #if USE_SLIDERS // show the controls lb_hMin.Visible = true; lb_hMax.Visible = true; lb_sMin.Visible = true; lb_sMax.Visible = true; lb_vMin.Visible = true; lb_vMax.Visible = true; bar_hMin.Visible = true; bar_hMax.Visible = true; bar_sMin.Visible = true; bar_sMax.Visible = true; bar_vMin.Visible = true; bar_vMax.Visible = true; lb_hMinValue.Visible = true; lb_hMaxValue.Visible = true; lb_sMinValue.Visible = true; lb_sMaxValue.Visible = true; lb_vMinValue.Visible = true; lb_vMaxValue.Visible = true; // set the scroll bars bar_hMin.Value = H_MIN; bar_hMax.Value = H_MAX; bar_sMin.Value = S_MIN; bar_sMax.Value = S_MAX; bar_vMin.Value = V_MIN; bar_vMax.Value = V_MAX; bar_Scroll((object) bar_hMin, (EventArgs) null); bar_Scroll((object) bar_hMax, (EventArgs) null); bar_Scroll((object) bar_sMin, (EventArgs) null); bar_Scroll((object) bar_sMax, (EventArgs) null); bar_Scroll((object) bar_vMin, (EventArgs) null); bar_Scroll((object) bar_vMax, (EventArgs) null); #endif // run the image processing when the operating system is idle //Application.Idle += processImageFrisbeeOriginal; Application.Idle += processImageFrisbee; }
public virtual ITable getTable(string str) { if (this.tables.containsKey((object) str)) return (ITable) this.tables.get((object) str); NetworkTable networkTable = new NetworkTable(str, this); this.tables.put((object) str, (object) networkTable); return (ITable) networkTable; }
public NetworkTableKeyListenerAdapter(string str1, string str2, NetworkTable nt, ITableListener itl) { base.\u002Ector(); NetworkTableKeyListenerAdapter keyListenerAdapter = this; this.relativeKey = str1; this.fullKey = str2; this.targetSource = nt; this.targetListener = itl; }
public void Close() { ForceStop(); if (table != null) { table.removeTableListener(this); table = null; } }
public NetworkTableSubListenerAdapter(string str, NetworkTable nt, ITableListener itl) { base.\u002Ector(); NetworkTableSubListenerAdapter subListenerAdapter = this; this.notifiedTables = new Set(); this.prefix = str; this.targetSource = nt; this.targetListener = itl; }
public void Start() { Robot.setTeam(4590); Robot.setHost("roborio-4590.local"); if (table == null) { table = Robot.getTable() as edu.wpi.first.wpilibj.networktables.NetworkTable; table.addTableListener(this); } if (!networkTableThread.IsAlive) { shouldStop = false; networkTableThread.Start(); } }