Remove repeated code in cgains generation script.
Remove repeated code in cgains generation script.

Signed-off-by: Dale Lukas Peterson <40c2226bc5340f3fd9c6b1fb4a17b083b7e00087@gmail.com>

hazelnusse/robot.bicycle,hazelnusse/robot.bicycle,hazelnusse/robot.bicycle,hazelnusse/robot.bicycle,hazelnusse/robot.bicycle