My goal is to have the heli RTL when the signal is lost. Since the ESC is directly connected to the receiver, when signal is lost, the ESC would power down. Anyway to get ESC to be controlled by the APM2? My plan is to have the ESC running in governor mode to have a fixed throttle. So APM2 doesn't really have to have any variable control to it. More or less like a toggled signal.
I kind of figured out a way to utilize the behavior of the radio signal output. According to the radio calibration screen, when I turn off the radio transmitter, Radio 5 and Radio 7 jumps to 1900. I can set the Flight Modes using Radio 5 as RTL as flight mode 6 (PWM 1750+). And also have the ESC connected (somehow) to Radio 7.
Now the question is, when I don't use the Ch7 for Auto_trim or Add_WP, where do I get the Ch7 output from APM2? Seems like the Output 5 to 8 on the APM2 has nothing controlling it. Anyway to change that?
I'm not sure if there's a way to "hack it". But if you're that keen, maybe when I'm done the function you can be a beta tester before it's released. Can you compile and upload manually yet?
You seem pretty hardcore into this, so it's probably time you learn. ;)
hehe. I "almost" clicked on a few of those source code links a few times while reading other people's hack. I'll get there, eventually.
Well, when it's time, I can walk you through it. We need more keeners with Trad Helis!
Sounds good. :)
Just installed ArduinoForVisualStudio, arduino-0100-relax-windows.zip, and the ArduCopter V2.5.3 & ArduCopter V2.5.4. Tested Compile and everything seems to be working.
Compiling 'ArduCopter' for 'Arduino Mega 2560 or Mega ADK'
Binary sketch size: 153896 bytes (of a 258048 byte maximum) (3.8062177 secs)
You're a fast learner! Are you a programmer?
I use Notepad++ to surf the code. I tried Visual Studio, but it was too "heavy" for me.
Here's my personal "workshop" on the code.
Here's the changes for the ESC function:
But it doesn't work anymore as a recent change to the motor libraries broke them. I have to recreate it in the new code. But it was working.
I studied Electrical Engineering but my work are mostly just programming for the last 20+ years. :D
I was hunting down the H_COLYAW and comparing code between V2.5.3 & V2.5.4. There were quite a bit of changes even in file structure! The H_COLYAW was in heli.pde and there are no such file in V2.5.4. There are quite a few files gone as well. Why the big change in such small revision?
I'm gonna start small and try to compile small changes and see how to upload and test first. If something goes wrong, what's the easiest way to load the original code? Just use the APM Planner to reload it?
Excellent. You might get recruited onto to team.
What type of programming did you study?
I'm a Mech. Eng. Sort of old school, I can weld and use a machine shop. But my career evolved into programming variable speed drives, PLC's and HMI's. But coding is pretty new to me, I only ever learned Basic in high school. So I'm struggling through.
The change to to the file structure was big, yeah. Randy could explain it more, but it had to do with making it "cleaner", though to me it's just way more confusing. I was just getting comfortable, but now I have to figure it out again.
It was done on a "minor" revision because it was actually supposed to be a major revision and be called 2.6. There were supposed to be performance improvements in other areas (not because of this motors stuff, other places). But the BT team didn't think it was any better so we just called it 2.5.4.
Just a few of the key players:
Chris Anderson sort of oversees the whole project.
Randy MacKay is sort of the change controller, and also does much of the mid-level coding.
Andrew "Tridge" Tridgell is a master, and does much of the really low level stuff. Deep in the way the whole code operates. He ports a lot of ideas from William Premerlani who seems to be a UAV scholar.
Jason Short previously did the bulk of the mid-level programming, and much of the PID and control loop stuff is his work.
Adam Rivera has done some really good work lately on making things more usable for end users. I really hope he gets the auto-PID tuning stuff working.
I hate to name names and leave people out, but those are the ones that I know best.
I'm pretty much just a hack and muddle my way through, learning by copying bits of code and seeing what works by trial and error.
I only studied the required courses when I was in college. There were FORTRAN and some low level programming in mainframe environment. But before all that, when I was in high school, I wrote quite a bit of machine language programming on a RCA VP111. Good times. :D
Later I learn Visual Basic and VBA for other Microsoft products at work, and then web based programming. Basically all the business area that can make money. :D
Many of us are using TortoiseGIT as a GUI, and that also requires you to install GitBash.
Just to give you a head start. I'm sure you'll figure out the rest.
The official repository is here:
But note, if you choose to fly anything you download from GIT, you are flying potentially untested code! We try not to break it, but it has happened.
Basically it works like this:
Code is developed and pushed to the GIT repository. It usually works, but sometimes it doesn't. We try to do experimental stuff in our own "clones", and then when it works, Randy pulls it into "trunk".
At some point, the window closes, and we go into a period of beta testing. Marco Robustini heads up the BT group. It's mostly quad guys. Technically I'm on it, but I don't usually fly cutting edge stuff. When the window happens, the code is frozen and pushed into a zip file here which many of the testers use instead of GIT.
If the BT group approves, it is then pushed out to the download section of MP.
Currently the window is open, and the GIT repository is untested.
Interesting! I'll take a look around.
Since I would be uploading the code directly to the heli, instead of thru APM Planner, how do I tell it to FRAME_CONFIG = HELI_FRAME?