View Single Post
  #6   Spotlight this post!  
Unread 03-02-2014, 14:54
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: operatorControl() not being called

One problem is that you are allocating a bunch of PWMs to the same channel (0).

Code:
 // Motor constants
    int FRONT_LEFT_MOTOR_PWM = 1;
    int REAR_LEFT_MOTOR_PWM = 2;
    int FRONT_RIGHT_MOTOR_PWM = 3;
    int REAR_RIGHT_MOTOR_PWM = 4;
    int LAUNCH_PWM;
    int RIGHT_WINCH_PWM;
    int LEFT_WINCH_PWM;
    int LINE_ACTUATOR_PWM;
 
    // Motor controller configurations
    Jaguar frontLeft = new Jaguar(FRONT_LEFT_MOTOR_PWM);
    Jaguar rearLeft = new Jaguar(REAR_LEFT_MOTOR_PWM);
    Jaguar frontRight = new Jaguar(FRONT_RIGHT_MOTOR_PWM);
    Jaguar rearRight = new Jaguar(REAR_RIGHT_MOTOR_PWM);
    Jaguar launch = new Jaguar(LAUNCH_PWM);
    Jaguar rightWinch = new Jaguar(RIGHT_WINCH_PWM);
    Jaguar leftWinch = new Jaguar(LEFT_WINCH_PWM);
The RIGHT_WINCH_PWM, LEFT_WINCH_PWM and LINE_ACTUATOR_PWM are all going to be 0 because they are unassigned. When you create new Jaguar objects with 0 as the port number, the code will break. I'm not sure why we aren't seeing output complaining about the "Requested PWM channel number is out of range".

You might want to assign them unique values and try again.

Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute