if (_linkProtocol.getType(message).equals(DataTypeName.ACKNOWLEDGE)) {
final CommandId cmd = message.getData().getCommandId();
if (cmd.getId() == _linkProtocol.getId(_typeSent)) {
if (_typeSent.equals(DataTypeName.RECORDS)) {
_packageIndex = 0;
final TypedData d = _packageData[_packageIndex++];
_typeSent = d.getType();
_linkProtocol.sendPackage(d.getType(), d.getData(), false);
}
else if (_typeSent.equals(DataTypeName.WPT_DATA)) {
if (_packageIndex < _packageData.length) {
final TypedData d = _packageData[_packageIndex++];
_typeSent = d.getType();
_linkProtocol.sendPackage(d.getType(), d.getData(), false);
}
else {
final GarminData gd = new GarminData(new byte[2]);
gd.setInt(0, _linkProtocol.getId(_typeToSend));
_typeSent = DataTypeName.XFER_CMPLT;