• **
  • 96
Re: Full race potential of the Revolution
« Reply #15 on: July 02, 2016, 12:29:50 pm »
Let me put my question in another way: what does another firmware ( let's take Betaflight and Raceflight as they are very popular ) different than Librepilot does? I have 3 quads with the cc3d and now one with the revolution all running Eclipse.
LP / TauLabs / dRonin have modularized firmwares where it is easier to add any kind of new feature.  Different modules run as different tasks and wake up to run as needed and with priorities that mean the important stuff gets to run whenever it needs to.  Gyro task reads gyro data when it is available and writes it into a queue.  Some other task is set to wake up as soon as anything gets put in the gyro data queue.  At the other end, the ESC output task can be configured to wake up each time there is new data to send to the ESC or to wake up on a timer, every time the ESC can accept new data.

This is very similar to all the tasks that are running in a modern computer, but all that task switching does slow it down somewhat.

Other firmwares put all the code in a single big loop to avoid the delay and complexity of task switching.  This is a bit like single task DOS programs of old but it can run faster loop times.  There are many small devices today that still do this because it is the fastest way if you have a slow processor (the STM32 is not slow!) and only need to do one thing.  This single loop is a little bit of a straight jacket when you want to add something new.  It is more difficult to add a new "task" to this big loop because it must be called or at least tested once per loop, slowing down the loop for each and every thing you add.  You add a lot of things and it slows down appreciably.  It also limits how you can talk to your ESCs; once per loop.  You must slow the loop down (etc) so that it doesn't send to the ESC more often than the ESC protocol can accept.  That is one reason that other firmwares promote faster ESC protocols.

LP's task based approach can be configured to use a timer to output the ESC data smoothly at exactly the rate the ESC protocol desires or to output the ESC data synchronously for reduced jitter and lag.  LP allows the addition of things like scripting languages for complex autonomous control and sensors that need to run at widely different rates.  Personally, I like the idea of being able to add new things like these.

So another analogy.  Two cars to be driven on normal highways (or a race track if you prefer) where you will never, ever be able to go faster than 200mph.  One car can run 500mph.  The other can run 8000mph.  They both accelerate the same (to within the limits of human controlled testing), handle the same, same gas mileage.  Which do you want?  Now consider that the 500mph car has air conditioning at no power loss, GPS navigation, and a nice stereo; and the company producing it has plans for autonomous control.  Considering that these cars cost about $50 I say you should have at least one of each!  :)

Thanks for bringing up the car analogy. And that's exactly my point. I'm not talking airco, radio, convertible ETC here. Only race capabilities. So in this case we don't need them and use all "unneeded" power like airco and radio ETC to enhance race performance than the other car with all its fancy stuff but using up internal power to make it work instead of focusing on racing.

Lets take the analogy further here, same car, same options, same motor and same controller same top speed. The first car races with all the options, the second car races only focused on racing, no radio, no airco usage, nothing. The firmware of the car is only made to use maximum performance over "comfort" resulting in better handling ( like tuned PID ) and faster spool up and reaction time conversion ( Multishot vs Standard PWM ESC ).

Dronin already makes a fork out of Librepilot in terms of tuning by autotune and Raceflight a fork of Betaflight goes even further.

To be clear I'm not talking if we as a human can notice a difference that's besides the point or how easy the user interface is.

The car running the revolution FC on Librepilot ( the full option ) one behaves a lot different than the same car using the revolution FC running Raceflight with focus on racing.

So again, feel like we are running in circles here, does other firmware like Raceflight take somehow a lot more potential from the FC use because of internal written code in relation to Librepilot or is it a hype and so subjective that, well, it's a hype.