View Single Post
  #1   Spotlight this post!  
Unread 27-01-2009, 02:45
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,168
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Victor::Set not working

I am sure this is operator error somehow but I don't see it. I initialize a new Victor instance like this:

...
#define CARD_HELICALRAMP 4
#define PWM_HELICALRAMP 3
...
pMotor = new Victor(CARD_HELICALRAMP, PWM_HELICALRAMP);
...

and use it like this:

...
pMotor->Set(fMotor);
...

The pMotor member pMotor is *Victor type and fMotor is a float. The physical output is not updating. No error messages appear on the console. Am I doing something wrong? I know the function is getting called and I know the fMotor value is in the correct range (I put a printf just before the line above).

The Set call is from a different task but that should not matter (I think). This is the only PWM I have declared at this point (no RobotDrive or anything else). Does that matter? I have only one sidecar hooked up to the DIO in slot 4. This is wired to PWM 3. Do I have to start at PWM 0 for some undocumented reason?

Any advice or help is much appreciated!
Reply With Quote