| | |
| | | import com.flightfeather.uav.socket.eunm.FactorType |
| | | import org.slf4j.LoggerFactory |
| | | import java.text.SimpleDateFormat |
| | | import java.util.* |
| | | |
| | | /** |
| | | * uav 第二层数据单元解码器 |
| | |
| | | fun getAirConfirmData(b: List<String>, deviceCode: String?): List<AirTypeData> { |
| | | val resultList = mutableListOf<AirTypeData>() |
| | | b.forEach { |
| | | FactorType.getByIndex(it.toInt(16))?.let { f-> |
| | | FactorType.getByValue(it.toInt(16))?.let { f-> |
| | | resultList.add(AirTypeData(f)) |
| | | } |
| | | } |
| | | if (!types.containsKey(deviceCode)) { |
| | | types[deviceCode] = mutableListOf() |
| | | } |
| | | types[deviceCode]?.clear() |
| | | types[deviceCode]?.addAll(resultList) |
| | | types[deviceCode] = resultList |
| | | |
| | | return resultList |
| | | } |