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
Automatizing a quad-copter
Re: Automatizing a quad-copter
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() .
You should look in RX.cpp.
The rcData[chan] set for the different Receiver types In void computeRC() .
Re: Automatizing a quad-copter
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.
Have you seen Mission Planner, it is nice.
Look up a youtube video to see if it interests you, good luck with your project.
Re: Automatizing a quad-copter
Just do what MSP_SET_RAW_RC does.
Set rcSerial[] and rcSerialCount
Set rcSerial[] and rcSerialCount
Re: Automatizing a quad-copter
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".
Only with a GPS antenna or environment-visualization yystem you can do a reliable " closed loop".