Log in

View Full Version : Sending data to Driver station PC


Micah Chetrit
16-02-2011, 17:49
Hi all, I am attempting to send 3 things to the Driver Station PC, the Input statuses, the status of the joystick (if possible), and the Image from the camera (last years version). My code looks like this:

class MecanumDefaultCode : public IterativeRobot {
AxisCamera *camera;
DriverStationLCD *driverStation;

DriverStation *ds;

public:
MecanumDefaultCode(void){
ds = DriverStation::GetInstance();

AxisCamera &camera = AxisCamera::GetInstance();
camera.WriteResolution(AxisCamera::kResolution_320 x240);
camera.WriteCompression(0);
camera.WriteBrightness(0);
driverStation = DriverStationLCD::GetInstance();
}

void TeleopPeriodic(void){
HSLImage image;
AxisCamera &camera = AxisCamera::GetInstance();
if (camera.IsFreshImage()) {
HSLImage *image = camera.GetImage();
}
}

I have not been able to test this yet because I have been busy with autonomous. I was wondering if I did anything wrong or forgot anything?
Thanks in advance