I am trying to port some of last year’s java code to c++ for convenience. I am having a lot of trouble.
This is the Java Code I would like to port:
package com.team3997.frc2016;
import *
public class Hardware {
/*
*
* Interfaces
*/
public static F310 kDriverGamePad = new F310(Pins.DRIVER_GAMEPAD_USB);
public static F310 kOpGamePad = new F310(Pins.OP_GAMEPAD_USB);
/*
*
* Arduino
*
*/
public static I2C kArduino = new I2C(I2C.Port.kOnboard, 168);
public static Lights kLights = new Lights(kArduino);
/*
*
* Subsystems
*/
public static Drive kDrive = new Drive(Pins.DRIVE_MOTOR_PINS[0],
Pins.DRIVE_MOTOR_PINS[1], Pins.DRIVE_MOTOR_PINS[2], Pins.DRIVE_MOTOR_PINS[3],
kDriveLeftEncoder, kDriveRightEncoder, kGyro, kDriverGamePad);
public static ChickenRun kChickenRun = new ChickenRun(kCRunMotor, kCRunIndexSensor);
public static Shooter kShooter = new Shooter(kShooterMotor1, kShooterMotor2, kFlyWheelEncoder, kOpGamePad, kChickenRun);
public static Intake kIntake = new Intake(kIntakeMotor, kIntakeExtenderSolenoid, kOpGamePad, kChickenRun);
public static Hanger kHanger = new Hanger();
/*
*
* Vision
*/
public static Vision kVision = new Vision();
/*
*
* Utilities
*/
public static FrontCamera kFrontCamera = new FrontCamera(kOpGamePad);
}
I simplified the code so it was more concise in what i wanted to do.