Closed StefanJVA closed 5 years ago
Now that we have set the correct values for three different controllers, it is apparent that only the axis numbers change, while everything else stays the same. I think the best approach would be to store the axis assignments like this:
struct JoystickMapping
{
int steeringAxis;
int accelerationAxis;
int decelerationAxis;
int deadMansSwitchButton;
}
You could then define three constant values of that struct and select one at runtime.
Now that we have set the correct values for three different controllers, it is apparent that only the axis numbers change, while everything else stays the same. I think the best approach would be to store the axis assignments like this:
struct JoystickMapping { int steeringAxis; int accelerationAxis; int decelerationAxis; int deadMansSwitchButton; }
You could then define three constant values of that struct and select one at runtime.
I have spend 30 minutes fixing every suggestion that was made, only to arrive at this comment, which makes everything obsolete anyway. FML :(
Somehow the ps3 mappings on my pc seem to be different from the ones on the actual car. Therefore we have to make the ps3 mappings on Friday. So don't merge this yet! However the code can be reviewed any time.