I am trying to understand the software for ArduCopter 3.2.1. I couldn’t understand how user specified inputs are converted into required rates and then required PWM for motors. Any documentation available?
The short answer is “it’s too complicated to explain in one forum post”. In fact it’s way more code than any one person could even understand entirely… it sounds like you are going to need to dig into the source code and look around some more.!
maybe poke around here: https://github.com/ArduPilot/ardupilot ( in particular the “ArduCopter” and “libraries” folders is a good place to start ). I find I use “search” a lot.
Thanks DavidBuzz for reply. I have already downloaded the code and surfing through it but didn’t understand specifically how motor PWM signals are generated.
The format from what I’ve read so far is:
hal.rcout->enable_ch(i);
hal.rcout->write(i, 1050 + i*50);
Where i is a channel, and 1050 would be the PWM output
But there is a lot to the code, so it’s hard to just read through and understand it.