     float ax;
     float ay;
     float az;
-    
+
     float temp;
-    
+
     float gx;
     float gy;
     float gz;
-    
+
     int throttle;
     int roll;
     int pitch;

        pid_i_mem_roll = pid_max_roll * -1;
    }

    pid_output_roll = (( pid_p_gain_roll * pid_error_temp ) + pid_i_mem_roll + ( pid_d_gain_roll * (pid_error_temp - pid_last_roll_d_error))) * -1; // maybe *-1 ? 
    // old version
    if(pid_output_roll > pid_max_roll) {
        pid_output_roll = pid_max_roll;

        last_channel_3 = 0;                                        //Remember current input state
        receiver_input_channel_3 = current_time - timer_3;         //Channel 3 is current_time - timer_3
    }

    //Channel 4=========================================
    if(PINB & B00001000 ){                                       //Is input 11 high?
        if(last_channel_4 == 0){                                   //Input 11 changed from 0 to 1
