How quickly does my program execute/ how efficient is it?

Post Reply
lgibjones
Posts: 1
Joined: Mon Apr 07, 2014 3:10 am
Country: -

How quickly does my program execute/ how efficient is it?

Post by lgibjones »

Hello,

Does the Taranis have a function that allows me to test the latency between a control input and the output to the rf deck? I ask because I have identified several ways to accomplish a desired task, and I want to know which is the most efficient from a computational perspective.

Specifically, I am setting up an r/c glider with several flight modes that differ in their degree of flap offset, and I have read that in order to do this some users create a flap quasi channel (that does not correspond to an actual receiver output) that is then mixed into the output for the aileron servos, while others use a global variable that contains the mixing weights that are used to determine flap offset values for each flight mode. These approaches are different from a programming perspective, but how do they differ from a computational perspective?

I hope I have worded this clearly, please let me know if I should clarify, and thank you for any responses.

-Gib

User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: How quickly does my program execute/ how efficient is it

Post by Kilrah »

You simply don't need to care about that aspect, it's negligible.
We just had a detailed look at a possible issue which called for looking at timings with a super complex model that uses 54 mixer lines over 22 channels, this computes in just 0.7 millisecond in steady state, and 1.2ms during flight mode fade transition. So completely negligible compared to the 9ms frame rate and 30 or so ms of stick->receiver output latency. The difference between your 2 simple setups is probably a few dozen microseconds and wouldn't even show up on the debug counter.
pmullen503
Posts: 277
Joined: Sun May 06, 2012 8:37 pm
Country: -
Location: Fond du Lac, WI

Re: How quickly does my program execute/ how efficient is it

Post by pmullen503 »

I was wondering the same thing.

I have a "master model" that has all the switches, telemetry, and warnings programed in. I use that as a basis for a new model whether I need them all for a particular model or not. It makes adding a new model easy and the switches are always the same but each program is longer than it needs to be. Certain operations are written to be easy (for me) to understand but not very efficient in terms of number of mixer lines.
User avatar
dinamich
Posts: 288
Joined: Mon Apr 01, 2013 1:21 pm
Country: Slovenia
Location: Ljubljana

Re: How quickly does my program execute/ how efficient is it

Post by dinamich »

Kilrah maybe we should have the max mixer time statistics enabled all the time and not just in debug builds.
projectkk2glider@github
G550Ted
Posts: 389
Joined: Tue Dec 27, 2011 6:15 pm
Country: -
Location: Savannah, GA, USA

Re: How quickly does my program execute/ how efficient is it

Post by G550Ted »

For what purpose? They are insignificant as Kilrah stated.

Ted

Post Reply

Return to “openTx for FrSky radios”