gon

  • *
  • 30
Unable to read ManualControlCommand through UAVTalk
« on: April 04, 2017, 04:55:28 pm »
Hi,

I can read successfully most of UAVObjects from my CC3D using UAVTalk over serial (MainPort) with an Arduino. But in particular, I'm not able to retrieve the ManualControlCommand one. I request the object and receive the data, but it's always a "0" in all its fields. If I connect the board to my computer I can see the values properly changed by my RC (in the System tab), but connected through serial it's always "0".

I'm using this lib https://github.com/MarcProe/LibrePilot.arduino. It's very strange because I can see that I'm requesting the data and receiving it with no errors. I reiterate I can get other UAVObjects with this method.

Is there any reason for not to send this data over serial or do you know any other possible cause?


On a side note, my failure rate receiving data through MainPort/Flexiport is very high. I get the request successfully 1 of 6 times aprox. I've tried different bitrates (now 57600) and different arduino boards. Is this normal?

Thanks!

Re: Unable to read ManualControlCommand through UAVTalk
« Reply #1 on: April 04, 2017, 07:04:26 pm »
Are you sure that all your UAVO ID's match?  It sounds like GCS matches firmware since GCS can see the data.  Maybe you need to recompile your program to get changes that you made to the XML files (UAVO IDs)?

gon

  • *
  • 30
Re: Unable to read ManualControlCommand through UAVTalk
« Reply #2 on: April 05, 2017, 01:44:29 pm »
Hi! Thanks for your reply,

I didn't change the XML files nor the drone's firmware. I just compiled the "next" branch 1 week ago to generate the header files without changing anything else. My CC3D's firmware is from 2016-12-12 23:37 (which I believe is the last one that the GCS offers to install). What could the problem be?

How can I check if the UAVO's ID match? (Mine actually is: 0xC2C59876)

Thanks!

Re: Unable to read ManualControlCommand through UAVTalk
« Reply #3 on: April 09, 2017, 09:34:42 am »
ManualControlCommand is where the transmitter stick positions get stored.  You must have a working RC receiver / transmitter and have it configured properly.  The easiest way to do that is to use the wizard.

gon

  • *
  • 30
Re: Unable to read ManualControlCommand through UAVTalk
« Reply #4 on: April 09, 2017, 10:46:38 am »
Yes, I knew that. My remote control works perfectly and I see these values changed when I move the sticks. But only through System View with the GCS. I can't get these values with an Arduino connected to the MainPort.

I think it's because of what you said about the UAVO's IDs. But I'm not sure if I'm doing it properly:
As I understand, the UAVO's IDs are generated with a hash function depending on their XML definition. I am compiling the "next" branch to generate the header files (with the hashed id for the actual UAVO definition). But my drone's firmware is a "production" one, built some months ago. So I guess that the XML definition of the MainControlCommand has changed since then, so the IDs don't match. What should I do? Generate the actual firmware version from the "next" branch and upload it to the drone so the IDs match again? (I should build also the GCS so it can interact with the drone also, right?).

Is that, right? Thanks!

Re: Unable to read ManualControlCommand through UAVTalk
« Reply #5 on: April 10, 2017, 05:41:28 pm »
It sounds like ManualControlCommand has changed in next.  You should build everything with the same set of XML files so it will match.  I am guessing that your Arduino code doesn't need to change, but that it does need the new XML files / hashes / UAVO IDs.

gon

  • *
  • 30
Re: Unable to read ManualControlCommand through UAVTalk
« Reply #6 on: April 10, 2017, 05:44:55 pm »
Perfect, thanks!