| | |
| | | import com.flightfeather.uav.socket.decoder.AirDataDecoder |
| | | import com.flightfeather.uav.socket.decoder.DataPackageDecoder |
| | | import com.flightfeather.uav.socket.eunm.AirCommandUnit |
| | | import com.flightfeather.uav.socket.eunm.UWDeviceType |
| | | import io.netty.channel.ChannelHandlerContext |
| | | import org.springframework.beans.factory.annotation.Autowired |
| | | import org.springframework.stereotype.Component |
| | |
| | | */ |
| | | fun saveToDataBase(dataPackage: AirDataPackage) { |
| | | when (dataPackage.commandUnit) { |
| | | AirCommandUnit.AirData.value -> instance.airDataRepository.saveAirData(dataPackage) |
| | | AirCommandUnit.AirData.value -> { |
| | | // 以json格式存储原始数据 |
| | | instance.airDataRepository.saveAirData(dataPackage) |
| | | } |
| | | } |
| | | } |
| | | |