Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wpilib] Make protected fields in accelerometers/gyros private #6134

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion wpilibc/src/main/native/include/frc/ADXL345_I2C.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class ADXL345_I2C : public nt::NTSendable,

void InitSendable(nt::NTSendableBuilder& builder) override;

protected:
private:
I2C m_i2c;

hal::SimDevice m_simDevice;
Expand Down
2 changes: 1 addition & 1 deletion wpilibc/src/main/native/include/frc/ADXL345_SPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class ADXL345_SPI : public nt::NTSendable,

void InitSendable(nt::NTSendableBuilder& builder) override;

protected:
private:
SPI m_spi;

hal::SimDevice m_simDevice;
Expand Down
4 changes: 1 addition & 3 deletions wpilibc/src/main/native/include/frc/AnalogGyro.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,8 @@ class AnalogGyro : public wpi::Sendable,

void InitSendable(wpi::SendableBuilder& builder) override;

protected:
std::shared_ptr<AnalogInput> m_analog;

private:
std::shared_ptr<AnalogInput> m_analog;
hal::Handle<HAL_GyroHandle> m_gyroHandle;
};

Expand Down
12 changes: 6 additions & 6 deletions wpilibj/src/main/java/edu/wpi/first/wpilibj/ADXL345_I2C.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ public static class AllAxes {
public double ZAxis;
}

protected I2C m_i2c;
private I2C m_i2c;

protected SimDevice m_simDevice;
protected SimEnum m_simRange;
protected SimDouble m_simX;
protected SimDouble m_simY;
protected SimDouble m_simZ;
private SimDevice m_simDevice;
private SimEnum m_simRange;
private SimDouble m_simX;
private SimDouble m_simY;
private SimDouble m_simZ;

/**
* Constructs the ADXL345 Accelerometer with I2C address 0x1D.
Expand Down
12 changes: 6 additions & 6 deletions wpilibj/src/main/java/edu/wpi/first/wpilibj/ADXL345_SPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ public static class AllAxes {
public double ZAxis;
}

protected SPI m_spi;
private SPI m_spi;

protected SimDevice m_simDevice;
protected SimEnum m_simRange;
protected SimDouble m_simX;
protected SimDouble m_simY;
protected SimDouble m_simZ;
private SimDevice m_simDevice;
private SimEnum m_simRange;
private SimDouble m_simX;
private SimDouble m_simY;
private SimDouble m_simZ;

/**
* Constructor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/
public class AnalogGyro implements Sendable, AutoCloseable {
private static final double kDefaultVoltsPerDegreePerSecond = 0.007;
protected AnalogInput m_analog;
private AnalogInput m_analog;
private boolean m_channelAllocated;

private int m_gyroHandle;
Expand Down