 int ppsLost = 0;
 int ppsLostCounter = 0;
 
+uint16_t throttle;
+uint16_t yaw;
+uint16_t pitch; 
+uint16_t roll; 
+
 uint8_t switches = 0; // bit flag
 
 void resetPayload() 

  if (++i > 8) {
    i = 5; 
  }
}


  static unsigned long debounce_sample_last = 0;
 
  
  throttle = joystickMapValues(analogRead(PIN_THROTTLE), 125, 515, 1000);
  yaw      = joystickMapValues(analogRead(PIN_YAW), 10, 521, 1000);
  pitch    = joystickMapValues(analogRead(PIN_PITCH), 0, 511, 1023);
  roll     = joystickMapValues(analogRead(PIN_ROLL), 0, 511, 1023);
  

  if (DEBUG) {
    //printf("val: %d\n\r ",tx_payload.throttle);
