| | |
| | | import com.flightfeather.obd.socket.decoder.DataUnitDecoder |
| | | import com.flightfeather.obd.socket.decoder.RealTimeDataDecoder |
| | | import com.flightfeather.obd.socket.eunm.ObdDataType |
| | | import org.springframework.beans.factory.annotation.Autowired |
| | | import org.springframework.stereotype.Component |
| | | import java.lang.StringBuilder |
| | | import java.util.* |
| | | import javax.annotation.PostConstruct |
| | | |
| | | /** |
| | | * @author riku |
| | |
| | | if (data.isNotEmpty()) { |
| | | val r = when (data[0].toInt(16)) { |
| | | ObdDataType.ObdData.value -> realTimeDataDecoder.getObdData(time, serialNum, data) |
| | | ObdDataType.EngineDataFlow.value -> realTimeDataDecoder.getEngineDataFlow(time, serialNum, data) |
| | | ObdDataType.SupplementDataFlow.value -> realTimeDataDecoder.getSupplementDataFlow(time, serialNum, data) |
| | | ObdDataType.EngineDataFlow.value -> realTimeDataDecoder.getEngineDataStream(time, serialNum, data) |
| | | ObdDataType.SupplementDataFlow.value -> realTimeDataDecoder.getSupplementDataStream(time, serialNum, data) |
| | | else -> null |
| | | } |
| | | |