EZ-Robotics / EZ-Template

Simple plug-and-play PROS template that handles drive base functions for VEX robots.
https://ez-robotics.github.io/EZ-Template/
Mozilla Public License 2.0
73 stars 35 forks source link

independent functions for arcade and tank control #14

Closed ssejrog closed 3 years ago

fishsticks89 commented 3 years ago

@Unionjackjz1 what would this entail? like a chassis_control_arcade() and a chassis_control_tank()?

ssejrog commented 3 years ago

@Unionjackjz1 what would this entail? like a chassis_control_arcade() and a chassis_control_tank()?

Maybe this is done with two functions, chassis_control_tank() and chassis_control_arcade(type, flipped), where the user can switch between single stick and split, and what joystick is used?

type would be split or single, with split as default. The default for flipped would be left stick is forward/reverse.

haven't thought of good variable names yet, so don't take those literally

ssejrog commented 3 years ago

I decided on three functions. chassis_tank(), chassis_arcade_standard(e_type) and chassis_arcade_flipped(e_type), where e_type is either k_single or k_flipped. This made it easiest to implement the curves.

With standard arcade, the left y axis is forward/reverse. The left curve will modify left y axis in single and split. The right curve will modify the turn stick in both single and split. The same thing goes for flipped arcade.

I think this is a good standard to have.