There is actually easier way of figuring out how to connect motors, so they are always turning in correct direction.
If you take a closer look, three motor wires are always aligned in certain way, that is of course if all the motors you are going to use are same model. So lets just number those wires from left to right as 1 2 and 3. That is easy to figure out, place motor in front of you and count from left. Or right. doesn't matter.
Then look at your ESCs. If they are all the same, then they have same layout and lets name their outputs as A B and C.
So now you just need to make sure that adjacent motors are spinning in opposite directions. You do it like this.
Connect one motor to the esc like this: A1 B2 C3
Then next one to it, A1 B3 C2 (just two wires swapped!)
Then next one to it, A1 B2 C3 (this is same as first one)
Then next one to it, A1 B3 C2 (just two wires swapped).
The number of motors you use (maybe building hexa) does not matter, just follow the pattern:
- one motor directly (A1 B2 C3)
- next one just two wires swapped (A1 B3 C2)
And that's it. It might happen that *all* of them are spinning in wrong direction, but that is nothing bad. Just need to let LibrePilot aware of it, by checking the option "Reverse all motors" in Vehicle tab, and you are good to go.