byte originalData[] = new byte[originalLen];
System.arraycopy(data, 6 /* skipping preamble+synch+len */, originalData, 0, originalLen);
if (len < 0) {
/*logger.warn("No cross-level conversion available: negative packet length");*/
return new ConvertedRadioPacket(new byte[0], originalData);
}
byte convertedData[] = new byte[len];
System.arraycopy(data, pos, convertedData, 0, len);
return new ConvertedRadioPacket(convertedData, originalData);
}