Automatizing a quad-copter

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
japanesepolo
Posts: 2
Joined: Tue Mar 11, 2014 3:36 pm

Automatizing a quad-copter

Post by japanesepolo »

Im trying to autonomize my quad for a school project, and i figured instead of writing a whole new interface on top of the multiWII, i might be able to hijack the RC sticks and pass in my autonomous flight pattern through there. I found this code in the multiwii project

" // ------------------ STICKS COMMAND HANDLER --------------------
// checking sticks positions
uint8_t stTmp = 0;
for(i=0;i<4;i++) {
stTmp >>= 2;
if(rcData[i] > MINCHECK) stTmp |= 0x80; // check for MIN
if(rcData[i] < MAXCHECK) stTmp |= 0x40; // check for MAX
}
if(stTmp == rcSticks) {
if(rcDelayCommand<250) rcDelayCommand++;
} else rcDelayCommand = 0;
rcSticks = stTmp;
"
and Sticks Command Handler makes me feel like thats where it computes the sticks, but the code doesnt seem right.

I am assuming rcData[] goes through each of the 4 stick channels and gets the value. So if instead of it getting the value from the rx, it gets the value predefined in the program would that work?

Or am i looking at the wrong section of code.
Thanks
Alex

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Automatizing a quad-copter

Post by PatrikE »

This is the part where MWii checks for Stick Setup Commands.

You should look in RX.cpp.
The rcData[chan] set for the different Receiver types In void computeRC() .

--Oz--
Posts: 25
Joined: Tue Jan 07, 2014 6:11 pm

Re: Automatizing a quad-copter

Post by --Oz-- »

Look at APM 2.5 at witespy for $60 + $23 cn06 v2 GPS.
Have you seen Mission Planner, it is nice.
Look up a youtube video to see if it interests you, good luck with your project.

User avatar
ezio
Posts: 827
Joined: Sun Apr 01, 2012 11:03 pm
Location: Paris
Contact:

Re: Automatizing a quad-copter

Post by ezio »

Just do what MSP_SET_RAW_RC does.
Set rcSerial[] and rcSerialCount

o_lampe
Posts: 117
Joined: Sat Nov 02, 2013 5:09 pm

Re: Automatizing a quad-copter

Post by o_lampe »

Your approach to automated flying is " open loop" . Not recommended on a windy day...
Only with a GPS antenna or environment-visualization yystem you can do a reliable " closed loop".

Post Reply