Quadcopter with IR sensor (Obstacles avoidance)

Ok so I'm researching on how to develop an obstacle avoidance system for my quadcopter and came upon this diagram in the internet:

|430x500

Arduino code for obstacle avoidancehttps://github.com/Cyrilanthony777/Obstacle_Avoidance_Multirotor/blob/master/obstr_p_IR/obstr_p_IR.ino

Based on the wiring connection for IR sensor, I notice that the channel 1 and 2 (Aileron and elevator) of the radio receiver go to digital 2 and 3 of Arduino Uno. But the code posted doesn't says anything regards to the 2 pins (digital 2 and 3) but only pin 9 and 10. I understand that pin 9 and 10 is to send a certain value of microseconds to the flight controller to perform a corrective action when the arduino uno detects a preset radiometric value (too close to target) so to avoid an collision. I am rather confused where do the signals go to and end up in when they entered pin 2 and 3. So how am I suppose to control the aileron and elevator controls of the quadcopter during manual mode?

But the code posted doesn't says anything regards to the 2 pins (digital 2 and 3)

  CH1 = pulseIn(2,HIGH,25000); 
  CH2 = pulseIn(3,HIGH,25000);

Must have missed this.