美文网首页
MAVlink 参数请求

MAVlink 参数请求

作者: fanaf | 来源:发表于2023-03-28 10:30 被阅读0次

    func createParamData(){
    var message = mavlink_message_t()
    var msg : UInt16 = 0
    msg = mavlink_msg_param_set_pack(droneManager.systemID, droneManager.compID, &message, drone.systemID, 1, “RTL_RETURN_ALT”, Float(param.flyHeight), UInt8(MAV_PARAM_TYPE_REAL32.rawValue))
    let buff: UnsafeMutablePointer<UInt8> = UnsafeMutablePointer.allocate(capacity: Int(msg))
    mavlink_msg_to_send_buffer(buff, &message)
    let data = Data(bytes: buff, count: Int(msg))
    buff.deallocate()
    }

    相关文章

      网友评论

          本文标题:MAVlink 参数请求

          本文链接:https://www.haomeiwen.com/subject/jtiirdtx.html