mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
Merge "Open scope for gyro methods. Fixes FirstForge artf1699."
This commit is contained in:
@@ -40,6 +40,7 @@ public:
|
||||
void SetDeadband(float volts);
|
||||
void SetPIDSourceParameter(PIDSourceParameter pidSource);
|
||||
virtual void Reset();
|
||||
void InitGyro();
|
||||
|
||||
// PIDSource interface
|
||||
double PIDGet();
|
||||
@@ -51,10 +52,10 @@ public:
|
||||
void InitTable(ITable *subTable);
|
||||
ITable * GetTable();
|
||||
|
||||
private:
|
||||
void InitGyro();
|
||||
|
||||
protected:
|
||||
AnalogInput *m_analog;
|
||||
|
||||
private:
|
||||
float m_voltsPerDegreePerSecond;
|
||||
float m_offset;
|
||||
bool m_channelAllocated;
|
||||
|
||||
@@ -29,7 +29,7 @@ public class Gyro extends SensorBase implements PIDSource, LiveWindowSendable {
|
||||
static final double kSamplesPerSecond = 50.0;
|
||||
static final double kCalibrationSampleTime = 5.0;
|
||||
static final double kDefaultVoltsPerDegreePerSecond = 0.007;
|
||||
private AnalogInput m_analog;
|
||||
protected AnalogInput m_analog;
|
||||
double m_voltsPerDegreePerSecond;
|
||||
double m_offset;
|
||||
int m_center;
|
||||
@@ -45,7 +45,7 @@ public class Gyro extends SensorBase implements PIDSource, LiveWindowSendable {
|
||||
* calculations are in progress, this is typically done when the robot is
|
||||
* first turned on while it's sitting at rest before the competition starts.
|
||||
*/
|
||||
private void initGyro() {
|
||||
public void initGyro() {
|
||||
result = new AccumulatorResult();
|
||||
if (m_analog == null) {
|
||||
System.out.println("Null m_analog");
|
||||
|
||||
Reference in New Issue
Block a user