 //  divided by 2 to get the number of microseconds
 #define TIMER_COUNT_DIVIDER 2 
 
-volatile boolean triggered;
-volatile uint16_t counter;
-uint16_t pulse;
-uint16_t last;
-boolean first = true;
-unsigned long timer; // the timer
-uint16_t INTERVAL = 1000; // the repeat interval
+volatile boolean triggered; //interrupt flag, must be volatile
+volatile uint16_t counter;  //hold Timer1 counter value, must be volatile
+uint16_t pulse; //pulse width
+uint16_t last;  //previous counter value
+boolean first = true; //first frame flag
+uint16_t debug_timer; //debug timer
+#define DEBUG_INTERVAL = 1000; //repeat interval
 
 // this array contains the lengths of read PPM pulses in microseconds
 uint16_t rcChannels[RC_CHANNELS_COUNT];

#ifdef FUTABA
  #define MIN_PULSE_WIDTH 1080
  #define MAX_PULSE_WIDTH 1980
	#define THRESHOLD 200
#else
	#define MIN_PULSE_WIDTH 1000
	#define MAX_PULSE_WIDTH 2000

// Use for Futaba transmitters (they have shifted center value and narrower range by default)
//#define FUTABA

// Uncomment to enable output of PPM values to serial
//#define DEBUG

#define RC_CHANNELS_COUNT 6
