Help with compiling custom config

So I followed the instructions on setting up a custom config, but unfortunately WAF won’t work since I am using an older version of MacOS. However, make seems to be working. I don’t know if the code was messed up, but the compiler kept throwing errors. This is what has happened so far:

  1. Threw error of motor_reverse[9] or something being out of range, did that for the other ones (10-12) as well. Went into AP_MOTORS6DOF.h and changed AP_Int8 parameter from _motor_reverse[8] to _motor_reverse[11], which resolved the issue.
  2. Then, the compiler threw errors of GROUND_IDLE in the switch case being undefined, so I looked around and figured out that I needed to change it to SPIN_WHEN_ARMED, which worked.
  3. Battery monitor was initialized incorrectly, kept throwing ‘AP’ undefined. Changed line that said “AP::battery()” in AP_MOTORS6DOF.cpp to AP__BattMonitor(), which resolved that, BUT…
  4. now it is saying that the float “_batt_current” is shadowing something in “AP_MOTORS6DOF”

At this point I am wondering if I somehow cloned or set up the git incorrectly, because there seems to be a lot of variables that were modified in one file and not in the other. Every time I fix one of these a new one crops up, and I can’t compile my custom config (again using make, because WAF isn’t working on my Computer). If somebody knows what is going on, please help. Thanks!

Ok so I resolved the issue. As it turns out, some variable names were shadowed and others changed from file to file. I went and changed “_batt_current” to “batt_current”. Additionally, some other variables in the “void AP_Motors6DOF::output_armed_stabilizing()” function were undeclared, but referenced later. I then redeclared them and set them to 0, and then didn’t change whatever the code did with them. This resolved the issue of them being undeclared and then uninitialized. My conclusion is someone pushed the code without completing it.

also, the battery monitor was initialized as AP::battery(), when it should be AP_Batt_Monitor() or something like that.

Which commit are you using?

The compiler/version also matters. The code is verified to build correctly with continuous integration tests.

I just used the part where it said “How to get the code” in the docs:
https://www.ardusub.com/developers/developers.html#making-a-custom-configuration
Also if the compiler version matters, than could it be because I was using make instead of WAF?

I also did the bit where it said to checkout the stable version^^