LibrePilot Forum
General Category => General Discussion => Topic started by: treemark on January 30, 2019, 08:34:57 pm
-
I am working on a non-android java implementation of UavTalk and have successfully generated the UAVObjects for java, but those templates have dependencies on the following classes:
import org.openpilot.uavtalk.UAVObjectManager;
import org.openpilot.uavtalk.UAVObject;
import org.openpilot.uavtalk.UAVDataObject;
import org.openpilot.uavtalk.UAVObjectField;
Does anyone know where I can get the source for these classes? Or any non-android java implementation of UavTalk for that matter?
Mark
-
Hi,
You may find some java files here :
./ground/gcs/src/libs/juavtalk
├── build.xml
└── src
└── org
└── openpilot
└── uavtalk
├── CRC8.java
├── UAVObjectFieldDescription.java
├── UAVObject.java
├── UAVObjectMetaData.java
├── UAVObjectsInterface.java
├── UAVTalkDefinitions.java
├── UAVTalkHelper.java
└── ValueParser.java
-
Thank you for the quick reply, Unfortunately there are several classes referenced by the templates that aren't there. The best I've been able to find is this old repo.
https://github.com/cberner/openpilot.git
That has the correct class names, but they must be from a previous branch as they are missing a few fields and methods referenced in the templates. I'm guessing the -java target of uavobjgenerator hasn't been maintained for some time.
I'll kick the classes I have around a little bit and see if I can get it to deserialize some packets.
Is the original open pilot repo available somewhere?
-
Original openpilot repo is here : https://github.com/openpilot/OpenPilot
Maybe should consider update current code and made a PR (https://librepilot.atlassian.net/wiki/spaces/LPDOC/pages/84672528/Git+Workflow#GitWorkflow-Createapullrequest).
-
I've got things working reasonably well. I've successfully deserialized and re-serialized the GCSTelemetryStats object sent by the GCS in UDP mode. I'm now attempting to send those exact bytes to a CC3D via a HID usb serial connection expecting to get some sort of response, but nothing is coming back. Any idea what I'm doing wrong?
I've also looked into the librepilot2go project, looks like they took an entirely different approach by reading the various uavobject XML files at runtime. It's also horribly entangled with the android API, so not ideal for my purposes.
Strangely enough, neither librepilots or the legacy openpilot repos have any references to the missing java imports.
I'd be glad to contribute my implementation back via PR if I can get it working.
-
I think there is a serial/usb connectivity issue going on here, as I can access the pilot's serial telemetry via the main port. Not sure why I can't read anything from the USB interface. The GCS has no problem getting data from the FC, but I get nothing.
-
Default GCS connexion uses HID, you may need to configure the USB VCP (Virtual Com Port) with USBTelemetry.
(https://forum.librepilot.org/index.php?action=dlattach;topic=4561.0;attach=8072)
-
I'll try that again. Last time I did, I couldn't connect via GCS anymore and ended up having to perform the rescue procedure. Can you have it both ways?
Thank you.
Mark
-
If you use the VCP you should disable de automatic connexion in Options and connect manually GCS to the Com port.
-
That was it, thank you again.