cleanFrame function

List<int> cleanFrame(
  1. List<int> bytes
)

Implementation

List<int> cleanFrame(List<int> bytes) {
  List<int> temp = new List<int>.from(bytes);

  temp.removeWhere((item) => item < 1);

  if (temp.length > 3) {
    return temp.sublist(3);
  } else {
    return temp;
  }
}