And speaking of safety, old FPV flight control software didn’t handle a very common mistake. It is very easy to put the wrong propeller on a motor. For example you might accidentally put on the counterclockwise propeller on the motor that spins clockwise. The result is when you arm the quad (as in turn on the motors), it flips its shit because the quad starts moving in a completely unexpected way. The flight control software is designed to “lock the angle (attitude) of the quad in and fight any uncommanded deviation”. Well, a backwards prop produces a hell of an uncommanded deviation!! So the controller tells the motor to spin faster to compensate but all that does is make things worse as the backwards prop pushes the thing in the exact wrong way. So it becomes an out of control quad that can and will cause property damage and injury (the propellers on a quad are large, very sharp and attached to very powerful motors. Coming into contact with a spinning propeller will send you to the hospital). This was a big problem in tight spaces like races and stuff.
A while ago somebody submitted a pull request that added a safety. When first arms, if the quad starts to behave “wrong” or “unexpected”, it immediately disarms. From what I recall it was actually fairly simple to detect too… if the “error” in the PID loop got too high it means something is very wrong mechanically and it’s best shut down. Countless fingers have no doubt been saved by this patch.
It’s probably very similar detection code to what is in 3d printer firmware or espresso machine firmware. If the PID error is “unexpected” something is mechanically wrong and it needs to shut down before Bad Things happen.