I'm not a programmer, but you might want to consider doing that, but making it controllable from a joystick button - press the button once to get "low power", press it again to get "high(er) power". Particularly if we're discussing drivetrain motors - you never know when you might want (or need) more power, and giving your drivers the flexibility to get it is not such a bad idea. (Well, OK, I don't know your drivers. Maybe it IS a bad idea...

)