Quote:
Originally Posted by MattD
You can create an AnalogChannel and use the standard methods on it, while using the accumulator information via the Gyro class at the same time.
Code:
AnalogChannel *channel = new AnalogChannel(1);
Gyro *gyro = new Gyro(channel);
float value = channel->GetVoltage();
float angle = gyro->GetAngle();
Alternatively, you could modify the Gyro class to provide access to this information.
|
If this is so, and I want to get the Degrees per Second from the Gyro, does this line of code within the Gyro class do that? m_analog is the AnalogChannel within the Gyro class, and voltsPerDegreePerSecond is a constant I see in there.
Code:
return m_voltsPerDegreePerSecond*m_analog->GetVoltage();