View Single Post
  #4   Spotlight this post!  
Unread 04-01-2011, 19:15
gvarndell's Avatar
gvarndell gvarndell is offline
Software Engineer
AKA: Addi's and Georgie's Dad
FRC #1629 (GaCo)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Grantsville, Maryland
Posts: 350
gvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond repute
Re: c++ motor control

Quote:
Originally Posted by Cody Trey View Post
RollerMotor.Set( m_rollerstick.GetY() ); //sets joystick 3 y-axis to controll the roller motor

the red section of code gives the error:
error: request for member `Set' in `((RobotDemo*)this)->RobotDemo::RollerMotor', which
is of non-class type `Jaguar*'
This is a shot in the dark from a die-hard C programmer who simply can't understand why people use C++.

Can you try this instead?

float foo = m_rollerstick.GetY();
RollerMotor.Set(foo); //sets joystick 3 y-axis to controll the roller motor
__________________
Robots never, ever, ever, ever break -- The Robot Repairman (Backyardigans)
Reply With Quote