/// <summary> /// Initializes a new instance of the DashboardForm class /// </summary> /// <param name="theEventsPort">The Events Port for passing events back to the service</param> /// <param name="state">The service state</param> public ObstacleAvoidanceForm(ObstacleAvoidanceFormEvents theEventsPort, ObstacleAvoidanceDriveState state) { this.eventsPort = theEventsPort; this.InitializeComponent(); this.UpdatePIDControllersValue(state); }
/// <summary> /// Initializes a new instance of the DashboardForm class /// </summary> /// <param name="theEventsPort">The Events Port for passing events back to the service</param> /// <param name="state">The service state</param> public ObstacleAvoidanceForm(ObstacleAvoidanceFormEvents theEventsPort, ObstacleAvoidanceDriveState state) { this.eventsPort = theEventsPort; this.InitializeComponent(); this.UpdatePIDControllersValue( state.Controller.Kp, state.Controller.Ki, state.Controller.Kd); this.currentPIDSelection = 0; this.pidControllersControl = new List <Ccr.Core.Tuple <NumericUpDown, Control> >() { new Ccr.Core.Tuple <NumericUpDown, Control>(this.KpNumeric, this.KpIndicator), new Ccr.Core.Tuple <NumericUpDown, Control>(this.KiNumeric, this.KiIndicator), new Ccr.Core.Tuple <NumericUpDown, Control>(this.KdNumeric, this.KdIndicator) }; this.pidControllersControl[this.currentPIDSelection].Item1.Visible = true; }