UAV Control via GCSReceiver object
« on: March 09, 2017, 08:41:00 am »
Hi everyone!

I am trying to control my UAV with a joystick using my own code.

My hardware configuration will be a Revo connected to an OPLink Groundstation. The Groundstation has a USB-connection to my PC. No RC should be needed. At the moment I am working with a direct USB-connection (VCP) between PC and FC.

I am writing C#-Code to translate the joystick position into PWM-values for throttle, yaw, pitch, roll (range: 1000 ... 2000). The values are put into the according channels in the GCSReceiver object. The idea is to use UAVTalk to send the data of the GCSReceiver object via a COM-Port to the Groundstation which transmits the data to the Revo. The Revo changes its internal GCSReceiver values and the UAV starts flying.

So much for the theory. My questions are: What objects and objectvalues have to be changed in Data und Metadata to acheive this? And in which chronological order do I have to do it?

Guys like JAMANTA already figured it out (https://forum.librepilot.org/index.php?topic=1973.msg16064#msg16064). But there is not much information going around on this topic.

Thanks for your help!

gon

  • *
  • 30
Re: UAV Control via GCSReceiver object
« Reply #1 on: April 05, 2017, 07:39:47 pm »
Hey! I have the same question.

I'm not finding any info about how to control the UAV through GCSReceiver. I think we need to change the UAVObject: ManualControlSettings -> Channel groups -> GCS instead of PWM. Then, change the GCSReceiver object by modifying the channel fields.

My problem appears just when I change a value in the Channel groups to GCS. Doing that, the UAV turns disarmed (even with "Always armed" activated) and the FlightStatus also says it's not connected. Changes in the GCSReceiver doesn't do anything then. What is the order of changes to make it work through the GCSReceiver? Did you get it working?

Cheers

Thanks!