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

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

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

}

void monitor_setLocalData() {
  static uint8_t i = 5; 

  comm_t payload;
  payload.key = i;
  switch (i) {
    case NRF24_KEY_THROTTLE:
      payload.val = throttle; 
      break;
    case NRF24_KEY_YAW:
      payload.val = yaw; 
      break;
    case NRF24_KEY_PITCH:
      payload.val = pitch; 
      break;
    case NRF24_KEY_ROLL:
      payload.val = roll; 
      break;
  } 
  
