Declaring a CAN vs. PWM in C++

In our code we are using a Talon for the drive motors this year. However, we need to use CAN instead of PWM now. What will be the main differences in declaring the motors with this?

//
// Define Drive Motor Channels
//
const static int MOTOR_FRONT_LEFT = 0;
const static int MOTOR_REAR_LEFT = 1;
const static int MOTOR_FRONT_RIGHT = 2;
const static int MOTOR_REAR_RIGHT = 3;

Thanks for any help!

Those would be the CAN Ids of your motor controllers.

For example:

static int FRONT_LEFT_TALON_ID = 5;

static std::shared_ptr<TalonSRX> frontLeftTalon;
frontLeftTalon.reset(new TalonSRX(FRONT_LEFT_TALON_ID));

Alright, so you put the motor controllers in order of their wiring, correct?

The order doesn’t matter

The CAN IDs are assigned in the web interface of the RoboRIO.