Modified a few lines of BARO code, help to test it, please.

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
User avatar
skypup
Posts: 7
Joined: Mon Sep 01, 2014 3:15 pm

Modified a few lines of BARO code, help to test it, please.

Post by skypup »

Here I have ask my colleagues to help test, temporarily not found BUG.

Amendment 1:
The Altitude D is 100, P is set to 8. (can be larger, but not more than 11, otherwise there will be abnormal)

Amendment 2:
IMU.cpp three is called the applyDeadband code needs to change.

// applyDeadband(accZ, ACC_Z_DEADBAND);
applyDeadband(accZ, ACC_Z_DEADBAND > 1); // Skypup 2014.09.02



// applyDeadband(baroVel, 10); // to reduce noise near zero
applyDeadband(baroVel, 6); // to reduce noise near zero Skypup 2014.09.02



// applyDeadband(alt.vario, 5);
applyDeadband(alt.vario, 3); // Skypup 2014.09.02


Video:
http://v.youku.com/v_show/id_XNzcyMzIyNDAw.html
[flash]http://player.youku.com/player.php/sid/XNzcyMzIyNDAw/v.swf[/flash]
Attachments
03.jpg
02.jpg
01.jpg
Last edited by skypup on Wed Sep 03, 2014 11:59 am, edited 1 time in total.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Modified a few lines of BARO code, help to test it, ple

Post by timecop »

I found another BUG

Code: Select all

applyDeadband(accZ, ACC_Z_DEADBAND > 1); // Skypup 2014.09.02


See if you can figure it out.

User avatar
skypup
Posts: 7
Joined: Mon Sep 01, 2014 3:15 pm

Re: Modified a few lines of BARO code, help to test it, ple

Post by skypup »

Please tell me, what it wrong. Thanks.

I have uploaded my fly test video, here.
http://v.youku.com/v_show/id_XNzcyMzIyNDAw.html

User avatar
haydent
Posts: 583
Joined: Sun Jun 17, 2012 1:35 am
Location: NSW, AU

Re: Modified a few lines of BARO code, help to test it, ple

Post by haydent »

timecop wrote:I found another BUG

Code: Select all

applyDeadband(accZ, ACC_Z_DEADBAND > 1); // Skypup 2014.09.02


See if you can figure it out.


can you even pass (is it a logic expression?) through a functions variable parameters like that... ? :?

User avatar
skypup
Posts: 7
Joined: Mon Sep 01, 2014 3:15 pm

Re: Modified a few lines of BARO code, help to test it, ple

Post by skypup »

Sorry my poor English, I'm from China.
I don't understand where is the syntax error or bugs, can you say more details? Thanks.

In addition, this code in the ARDUINO compiler to compile without error, and fly test also works.

User avatar
haydent
Posts: 583
Joined: Sun Jun 17, 2012 1:35 am
Location: NSW, AU

Re: Modified a few lines of BARO code, help to test it, ple

Post by haydent »

im not saying i know for sure, but can you explain the function of passing "ACC_Z_DEADBAND > 1" , does it only pass it if its greater than 1 , or am i confused ?

User avatar
skypup
Posts: 7
Joined: Mon Sep 01, 2014 3:15 pm

Re: Modified a few lines of BARO code, help to test it, ple

Post by skypup »

I am so sorry.
This is a terrible mistake. - -!

I want to write "ACC_Z_DEADBAND >> 1", but I am wrong.
In fact, the autopolit executed "applyDeadband(accZ, 1); // Skypup 2014.09.02"

Perhaps I am on to something. The copter fly looks good with wrong code.

User avatar
haydent
Posts: 583
Joined: Sun Jun 17, 2012 1:35 am
Location: NSW, AU

Re: Modified a few lines of BARO code, help to test it, ple

Post by haydent »

glad i could help, but i didnt think it looked that much better, it was still dipping up and down at times...

Post Reply