Giter Site home page Giter Site logo

Comments (8)

benbarkay avatar benbarkay commented on August 27, 2024

Which version of dronefleet/mavlink are you using? Also, what do you mean by importing? Are you using the maven central coordinates with a build system like gradle or maven or are you going through some other process?

from mavlink.

MattAuto28 avatar MattAuto28 commented on August 27, 2024

Importing directly as packages from io.dronefleet.mavlink such as,

import io.dronefleet.mavlink.MavlinkConnection;
import io.dronefleet.mavlink.MavlinkMessage;
import io.dronefleet.mavlink.Mavlink2Message;

Using the latest version of dronefleet + Mavlink.

from mavlink.

benbarkay avatar benbarkay commented on August 27, 2024

This reveals what you have been doing in your class however does not explain how dronefleet/mavlink has gotten to your classpath or from where, and whether or not you are building it yourself or are retrieving already built binaries from maven central.

It appears that you're not using a known IDE like Intellij IDEA or Eclipse seeing as you are doing manual import labor. I highly recommend you give one of these IDEs a chance, personally vouching for Intellij IDEA. I'd suggest you try creating a gradle or maven project and use the maven central coordinates to include dronefleet/mavlink as a dependency. Otherwise, it will be tough to extract the relevant information to reproduce the situation you're in.

from mavlink.

rohawa avatar rohawa commented on August 27, 2024

I'm working on the same project as MattAuto28, We're building out Dronefleet/Mavlink using gradle and implementing it into our application. For our use case, using IDEA or IntelliJ isn't compatible.

I think our bigger issue might be related to the version of Mavlink being used (1.0.13), which seems to have had issues with Mavlink2 messages (fix:14). Does updating to 1.0.14 fix those issues or should we be using the latest build of Mavlink? I have tested 1.1.5 with our application but it breaks our current working code that is compatible with 1.0.13. It seems that there were big changes in the shift from 1.0.1x to 1.1.x

from mavlink.

benbarkay avatar benbarkay commented on August 27, 2024

@rohawa 1.0.14 or 1.0.15 might work out for you, however I'd advise to upgrade to 1.1.5 instead as it includes a lot of defect fixes and has been more thoroughly tested. It's a relatively small API change. If you're using protocol version 1 then upgrading to 1.1.5 shouldn't be a big refactor for you, you would simply have to call send1 instead of send.

If you are using protocol version 2 then the only significant API difference is that you would have to store signing configuration outside of MavlinkConnection and then pass it as arguments to send2. Besides that there are only backward compatible or very minor differences.

from mavlink.

rohawa avatar rohawa commented on August 27, 2024

I thought there were changes made to the Mavlink2Message constructor between 1.0 and 1.1. That seems to be where our build throws errors. It looks like you have to build the Message using the packet and payload vs. IDs, Flags, and payload.

I wouldn't have noticed the change to send2, thanks for pointing that out!

from mavlink.

benbarkay avatar benbarkay commented on August 27, 2024

@rohawa in 1.1.x you do not have to construct MavlinkMessage or Mavlink2Message instances yourself at all. Instead, calls to send1 or send2 accept the payload and other parameters, and constructs and sends the message instances for you.

So instead of calling connection.send(new Mavlink2Message<>(systemId, componentId, payload, ...)) you would call connection.send2(systemId, componentId, payload, ...).

from mavlink.

MattAuto28 avatar MattAuto28 commented on August 27, 2024

Great - will have to change some of the way my code interacts with the new methodology in the newer version of Dronefleet, but it looks like it should work now.

from mavlink.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.