You should have comments on parts of code that people are likely to have difficulty understanding. Comments are also useful for yourself in the future, not just other people.
Comments like the following are useless:
If I'm someone else reading this code, this doesn't help me figure out why it's inverted
It also indicates that you yourself don't know
The reason is because the motors on the left side have to spin in the opposite directions as the ones on the right in order for the wheels to go in the same direction. The polarity switch can be done in wiring as well, but some inspectors don't like that and it's generally bad practice to switch ground/power wires.
Again this indicates that you don't know what the code is doing. Maybe you do and you're just not explaining it well...
What this really does is "skim" a little of the power off the top of the left or right signal if they are above 1, so that if the driver is going really fast (with wheel speeds calculated above 1) they can still turn
You should have comments on parts of code that people are likely to have difficulty understanding. Comments are also useful for yourself in the future, not just other people. Comments like the following are useless:
I felt bad for giving so many bad examples so here are some examples of good comments (from your code):