Racing Shifter Code Question

I have done very little coding and just want to make sure this will work. My largest worry is that when the car is in neutral (value of -10) that it will mess up my shifting calculations. Can anyone read it and tell me if I am right/need to fix anything. The description of each step is commented next to it. I will be using hall effect sensors for each gear and a Leonardo for the connection to my computer. My other thought was instead of using a numeric value for neutral, I could write a command that if all of the 8 pins read high, then it just disregard the function and begin the loop again until it is placed into gear.

shifter_revised.ino (4 KB)

Some minor improvements:

Use the const int values instead of numbers, when addressing pins. This makes the code better readable, and safer against typos.

Why INPUT_PULLUP only for pin 11?

Use a #define for the button pressed value, then active LOW and HIGH can be changed in a single place.

Assign currentGear while reading the buttons. The scan can stop as soon as the first pressed button is found.

I’d use shifttonext for the shift counter: while (shifttonext>0) { … shifttonext–; }
Same for shifttonext<0.

I’m not sure about the neutral and reverse gear handling. Will you ever be able to switch back into neutral?