Simulator control surface project- advice needed (lots of digital inputs)

Do post your code (all of it, not snippets) and we can have a look at what's wrong with it.