button code tested and seems to work ok, now I just need a use for it :)

//The idea here is for more flexible button code that can be used for
both power on and in use.
//Main reason for writing it was so I could change the output power
while in flight.
//It is designed so that the main loop can continue to run while the
button is held down.
//I have tried to minimize the time that it takes away from the main
loop hence the complexity.