public void Initialize(PositionComputer positionComputer, FiringSolution firingSolution, Led deadLed, GPSIMU forDebugPrintOut) { this.deadLed = deadLed; this.forDebugPrintOut = forDebugPrintOut; positionComputer.AttNavCreated += new PositionComputer.AttNavDataReadyDelegate(positionComputer_AttNavCreated); firingSolution.DLCCreated += new FiringSolution.DLCCreatedDelegate(firingSolution_DLCCreated); }
//Initializer (in place of Constructor, becaue the constructor just did what this does) public void Initialize(GPSIMU dataSource, Led imuLed, Led gpsLed) // dataSource is just the razorVenus, as sent when this constructor is called in Main. { // Subcribing to ReceivedLineGPS event & IMU dataSource.ReceivedLineGPS += new GPSIMU.LineGPSDelegate(dataSource_ReceivedLineGPS); dataSource.ReceivedLineIMU += new GPSIMU.LineIMUDelegate(dataSource_ReceivedLineIMU); this.imuLed = imuLed; this.gpsLed = gpsLed; forDebugPrintout = dataSource; imuLocker = new Object(); gpsLocker = new Object(); }
// Initializer, used to give the Radio, PositionComputer, and FiringSolution classes each other's events. public void Initialize(PositionComputer positionComputer, Radio xbee, Trigger trigger, Led firingLed, Led statusLed, GPSIMU forDebugPrint, Led gpsLed) { positionComputer.AttNavCreated += new PositionComputer.AttNavDataReadyDelegate(positionComputer_AttNavCreated); xbee.ReceivedAttNavEnemy += new Radio.AttNavDelegate(xbee_ReceivedAttNavEnemy); trigger.sevenTimesKeyed += new Trigger.sevenTimesKeyedDelegate(trigger_sevenTimesKeyed); this.forDebugPrint = forDebugPrint; this.killLed = firingLed; this.statusLed = statusLed; this.gpsLed = gpsLed; this.trigger = trigger; enemyLocker = new Object(); meLocker = new Object(); }