CRIUS AIOP v2.0/v2.1 dataflash logging

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
Lecostarius
Posts: 46
Joined: Mon Oct 20, 2014 11:29 pm

CRIUS AIOP v2.0/v2.1 dataflash logging

Post by Lecostarius »

Everyone,

I put together a MultiWii version that supports logging to the dataflash chip that is part of the Crius AIOP2 V2 board. It is based on a great low-level library made by Jordi Munoz and Jose Julio.

Many different parameters can be logged in-flight, and the log can be downloaded via an extension to MultiWiiConf to the PC. You can extend the set of items to log easily if something is missing (probably GPS is the first candidate, I do not have GPS on my copter so I have not added logging for GPS yet).

The attachment contains the source code for the modified MultiWii, and also the sourcecode for the new MultiWiiConf, based on Leos graphical improvements. Unfortunately, I have never been able to compile a MultiWiiConf myself, so all I can include is the .pde file and you will need Processing installed to run MultiWiiConf (it runs great from the Processing IDE).

Also part of the attachment is the documentation, in odt format.

I hope you find this useful. Please note that although I have been flying this myself to my satisfaction, I can offer no guarantee whether the code is bug-free. There might be terrible bugs inside which cause your copter to crash. So use it at your own risk.

I would love to hear your feedback.

Best, Leco

P.S. I just discovered that I cannot attach the code as there is a file size limit of 256kB. I have now just attached the documentation. What is the recommended way to upload code?
Attachments
dataflash_library_documentation.zip
Documentation for datalogging for Crius AIOPv2
(237.28 KiB) Downloaded 211 times

Lecostarius
Posts: 46
Joined: Mon Oct 20, 2014 11:29 pm

Re: CRIUS AIOP v2.0/v2.1 dataflash logging

Post by Lecostarius »

Everyone,

attached is the code of MultiWiiConf.

Cheers,

-- Leco
Attachments
MultiWiiConf2.zip
(35.9 KiB) Downloaded 188 times

Lecostarius
Posts: 46
Joined: Mon Oct 20, 2014 11:29 pm

Re: CRIUS AIOP v2.0/v2.1 dataflash logging

Post by Lecostarius »

Everyone,

and here is the final part, the MultiWii code itself.

Cheers, Leco
Attachments
multiwii_kopter3_public.zip
(181.37 KiB) Downloaded 189 times

Lecostarius
Posts: 46
Joined: Mon Oct 20, 2014 11:29 pm

Re: CRIUS AIOP v2.0/v2.1 dataflash logging

Post by Lecostarius »

Everyone,

just to avoid confusion: this is *not* any flavor of official release. It is just something I wrote for myself and what I considered might be useful for others too, so I am sharing it.

Beginners should definitely stay away from it and rather go for one of the well-maintained and thorougly tested versions from the official repository!!

And please note that config.h is the config.h from my system, as I am flying it. I recommend you to take a fresh config.h and start changing that, rather than checking every line of my config.h whether or not you like that particular setting.


-- Leco

User avatar
Leo
Posts: 372
Joined: Wed Sep 17, 2014 7:01 am
Location: Germany
Contact:

Re: CRIUS AIOP v2.0/v2.1 dataflash logging

Post by Leo »

Thanks Leco,

I will definitely take a look at it mainly to compare the data in the flash and the data in EZ-GUI.

I'd like to know how accurate e.g. for lost data with a 3dr radio connection.

Leo

brewski
Posts: 483
Joined: Tue Apr 29, 2014 12:04 am
Location: Cleveland Qld Australia

Re: CRIUS AIOP v2.0/v2.1 dataflash logging

Post by brewski »

Lecostarius wrote:Everyone,

and here is the final part, the MultiWii code itself.

Cheers, Leco

Hi Leco,

I also have a Crius AIOP V2 & have asked many times why we can't access this EEProm as users of MP can.
Is base of MW code standard 2.3 or the 2.3 with navigation (Eos Bandi) that I currently run?

Lecostarius
Posts: 46
Joined: Mon Oct 20, 2014 11:29 pm

Re: CRIUS AIOP v2.0/v2.1 dataflash logging

Post by Lecostarius »

Hello Brewski,

it is based on the MultiWii code from the official svn repository, last August. So most likely its a standard 2.3. The details about the svn version that I used originally, and the directory in the svn that I cloned, are in the documentation (cannot check it out from here, sorry).

Cheers, Leco

User avatar
Leo
Posts: 372
Joined: Wed Sep 17, 2014 7:01 am
Location: Germany
Contact:

Re: CRIUS AIOP v2.0/v2.1 dataflash logging

Post by Leo »

Well, I've decided to skip the tests and wait for the official MW 2.4.
Then IMO after it's out the data logging code should be ported into that version.

brewski
Posts: 483
Joined: Tue Apr 29, 2014 12:04 am
Location: Cleveland Qld Australia

Re: CRIUS AIOP v2.0/v2.1 dataflash logging

Post by brewski »

Leo wrote:Well, I've decided to skip the tests and wait for the official MW 2.4.
Then IMO after it's out the data logging code should be ported into that version.

I've tried the pre 2.4 and found performance, especially GPS functionality/accuracy poor. Maybe I stuffed up but don't think so. Cleared EEProm (4096 bytes) & reflashed MW2.3 NaviB7 & back to normal. I just hope the final 2.4 is at least as good as the NaviB7. Despite the growing number of MW flyers with Crius AIOP V2/2.1 I don't like the odds of getting dataflash code embedded just for this FC.

User avatar
Leo
Posts: 372
Joined: Wed Sep 17, 2014 7:01 am
Location: Germany
Contact:

Re: CRIUS AIOP v2.0/v2.1 dataflash logging

Post by Leo »

Interesting.... Have you seen my lastest video : http://youtu.be/NJCLn0Yq908 ? I think it's quite accurate.

To the topic:
I'd like to make sure 2.4 is at a performance level that makes it fly safe with all the options I'll be wanting to use.
I'll then look into the dataflash logging options when I feel comfortable enough.

brewski
Posts: 483
Joined: Tue Apr 29, 2014 12:04 am
Location: Cleveland Qld Australia

Re: CRIUS AIOP v2.0/v2.1 dataflash logging

Post by brewski »

Yes I saw your mission using pre 2.4. Unfortunately my experience was not the same. I didn't check Solar activity that day so although I had 7 sats (by my GPS status LED) the GPS horiz accuracy may have been bad on the day I tested. I also had issues with EZ-GUI and WinGUI so was not impressed.

Lecostarius
Posts: 46
Joined: Mon Oct 20, 2014 11:29 pm

Re: CRIUS AIOP v2.0/v2.1 dataflash logging

Post by Lecostarius »

A bit unrelated but I did not want to open a new thread for that. It took me a while to figure out how the three LEDs on the CRIUS AIOP v2 board are connected, and how I can program them. Thought I can save someone else the time to look it up. Here it is:

red LED (LED A) - Arduino digital pin 13 - ATMEGA PORTB bit 7
yellow LED (LED B) - Arduino digital pin 31 - ATMEGA PORTC bit 6
green LED (LED C) - Arduino digital pin 30 - ATMEGA PORTC bit 7

The MultiWii macros LEDPIN_ON/OFF/TOGGLE switch both LED A and LED C simultaneously.
The macros STABLEPIN_ON/OFF can be used to switch the yellow LED B.
You can e.g. use Arduinos digitalWrite(30,HIGH) to switch on the green LED.

Cheers, Leco

User avatar
Leo
Posts: 372
Joined: Wed Sep 17, 2014 7:01 am
Location: Germany
Contact:

Re: CRIUS AIOP v2.0/v2.1 dataflash logging

Post by Leo »

Thanks Leco,

I will looking onto making the LED's of better use for our boards. In my opinion it is enough to only have 1 LED to signal arm. Just have to figure out what the 3rd LED could be used for :)

User avatar
Leo
Posts: 372
Joined: Wed Sep 17, 2014 7:01 am
Location: Germany
Contact:

Re: CRIUS AIOP v2.0/v2.1 dataflash logging

Post by Leo »

I'm going to bring this back.

Has anyone run this code with MW 2.4?

What is your experience with it?

Leo

Lecostarius
Posts: 46
Joined: Mon Oct 20, 2014 11:29 pm

Re: CRIUS AIOP v2.0/v2.1 dataflash logging

Post by Lecostarius »

Question: is it worth it to switch from 2.3 to 2.4?

If I would move to 2.4, I would certainly port my data logger to 2.4. But so far, I have not seen a compelling reason. Some of the discussion in the 2.4 forum even seemed to indicate that 2.4 is less stable than 2.3 was. I think you have tried it, no? What is your experience?

-- Leco

User avatar
Leo
Posts: 372
Joined: Wed Sep 17, 2014 7:01 am
Location: Germany
Contact:

Re: CRIUS AIOP v2.0/v2.1 dataflash logging

Post by Leo »

I've been using 2.4 from the get-go. As one can see in many threads here I'm having a blast with it.

However, if you have no issues with 2.3 then there surely is no need for you to change.

Lecostarius
Posts: 46
Joined: Mon Oct 20, 2014 11:29 pm

Re: CRIUS AIOP v2.0/v2.1 dataflash logging

Post by Lecostarius »

After a quick scan through 2.4 code, I would say it is no problem to run the data logger in 2.4.

The main issue is that the current design puts the logging commands all over the code, to make sure they do not spiky-fy the cycle time too much. Writing lengthy datagrams to the flash is time consuming. That means that you will have to insert the (small) code fragments that write the log datagrams into the proper locations of 2.4.

I guess, however, that a lot of the positions can be identified very rapidly by comparison with the 2.3 code.

I am making a new copter now; if I use the Crius as FC (I am considering to give the Naze32 a try, with MultiWii) I will likely use 2.4 and then I will integrate my datalogger. However, it might take time - its summer and I dont spend so much time tinkering.

But if you try yourself, I am definitely willing to help you if you run into trouble.

Cheers, Leco

User avatar
Leo
Posts: 372
Joined: Wed Sep 17, 2014 7:01 am
Location: Germany
Contact:

Re: CRIUS AIOP v2.0/v2.1 dataflash logging

Post by Leo »

I'll let you know here if I will start with the integration.

Post Reply