View Single Post
  #8   Spotlight this post!  
Unread 15-02-2010, 23:28
David Fort David Fort is offline
Registered User
FRC #1001
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2003
Location: Cleveland, OH
Posts: 26
David Fort is on a distinguished road
Re: How to update the Virtual compass

I trust this won't get any points for elegance, but in our case, we find the virtual compass on the driver station (straight out of the box) is updated along with the Vision Data, which at present, we don't have, but this seems to get the compass heading updated by stubbing out the vision stuff:
// this comes from the example:
// dds->sendVisionData(0.0,
// gyro->GetAngle(),
// 0.0,
// targets[0].m_xPos / targets[0].m_xMax,
// targets);

// and we are able to swing the needle thusly:
vector<Target> targets;
dds->sendVisionData(0.0, m_Gyro->GetAngle(), 0.0, 0.0, targets);


This uses DashboardDataSender.cpp from the 2010 Image Demo.

Hope it helps,
David Fort
Mentor, Team 1001
Hacksaw