We're having some issues getting the code to work. It seems that this year's coding approach is different than last year's.
What are shared pointers for?
The problem arose when we were attempting to get the value of the joystick.
Code:
void Chassis::SixDrive(std::shared_ptr<Joystick>& stickPosition){
tankdrive->ArcadeDrive(stickPosition->GetX(), stickPosition->GetZ());
}
Code:
void Drivewithjoystick::Execute() {
Robot::chassis->SixDrive(Robot::oi->getDriveJoystick());
}
This is where our problem is, when referencing the drivejoystick, it seems we have a shared_ptr issue.
Declaration of the joystick
Code:
std::shared_ptr<Joystick> OI::getDriveJoystick() {
return driveJoystick;
}
Thank you!