public void queueShieldFrame(ShieldFrame frame){
  if (frame == null)   throw new NullPointerException("The passed frame is null, have you checked its validity?");
  if (!isConnected()) {
    onError(OneSheeldError.DEVICE_NOT_CONNECTED);
    return;
  }
 else   if (isUpdatingFirmware()) {
    onError(OneSheeldError.FIRMWARE_UPDATE_IN_PROGRESS);
    return;
  }
  queuedFrames.add(frame);
  callbackEntered();
}

public void queueShieldFrame ( ShieldFrame frame ) { if ( frame == null ) throw new NullPointerException ( "The passed frame is null, have you checked its validity?" ) ; if ( ! isConnected ( ) ) { onError ( OneSheeldError . DEVICE_NOT_CONNECTED ) ; return ; } else if ( isUpdatingFirmware ( ) ) { onError ( OneSheeldError . FIRMWARE_UPDATE_IN_PROGRESS ) ; return ; } queuedFrames . add ( frame ) ; callbackEntered ( ) ; }
explicitly queue a shield frame for sending after the arduino exits the callback .
