I wrote the C++ code below for controlling an x-drive, and it looks really repetitive, I feel like there should be a way to simplify, but I can\'t think of any that would ke