Skip to content

Commit d574a71

Browse files
committed
cleanup
1 parent 318163e commit d574a71

File tree

3 files changed

+24
-21
lines changed

3 files changed

+24
-21
lines changed

wpilibc/src/main/native/include/frc/DutyCycleEncoder.h

+9-9
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class DutyCycleEncoder : public wpi::Sendable,
9999
*
100100
* @param channel the channel to attach to
101101
* @param fullRange the value to report at maximum travel
102-
* @param expectedZero the reading where you would expect a 0 from get()
102+
* @param expectedZero the reading where you would expect a 0 from Get()
103103
*/
104104
DutyCycleEncoder(int channel, double fullRange, double expectedZero);
105105

@@ -108,7 +108,7 @@ class DutyCycleEncoder : public wpi::Sendable,
108108
*
109109
* @param dutyCycle the duty cycle to attach to
110110
* @param fullRange the value to report at maximum travel
111-
* @param expectedZero the reading where you would expect a 0 from get()
111+
* @param expectedZero the reading where you would expect a 0 from Get()
112112
*/
113113
DutyCycleEncoder(DutyCycle& dutyCycle, double fullRange, double expectedZero);
114114

@@ -117,7 +117,7 @@ class DutyCycleEncoder : public wpi::Sendable,
117117
*
118118
* @param dutyCycle the duty cycle to attach to
119119
* @param fullRange the value to report at maximum travel
120-
* @param expectedZero the reading where you would expect a 0 from get()
120+
* @param expectedZero the reading where you would expect a 0 from Get()
121121
*/
122122
DutyCycleEncoder(DutyCycle* dutyCycle, double fullRange, double expectedZero);
123123

@@ -126,7 +126,7 @@ class DutyCycleEncoder : public wpi::Sendable,
126126
*
127127
* @param dutyCycle the duty cycle to attach to
128128
* @param fullRange the value to report at maximum travel
129-
* @param expectedZero the reading where you would expect a 0 from get()
129+
* @param expectedZero the reading where you would expect a 0 from Get()
130130
*/
131131
DutyCycleEncoder(std::shared_ptr<DutyCycle> dutyCycle, double fullRange,
132132
double expectedZero);
@@ -136,7 +136,7 @@ class DutyCycleEncoder : public wpi::Sendable,
136136
*
137137
* @param digitalSource the digital source to attach to
138138
* @param fullRange the value to report at maximum travel
139-
* @param expectedZero the reading where you would expect a 0 from get()
139+
* @param expectedZero the reading where you would expect a 0 from Get()
140140
*/
141141
DutyCycleEncoder(DigitalSource& digitalSource, double fullRange,
142142
double expectedZero);
@@ -146,7 +146,7 @@ class DutyCycleEncoder : public wpi::Sendable,
146146
*
147147
* @param digitalSource the digital source to attach to
148148
* @param fullRange the value to report at maximum travel
149-
* @param expectedZero the reading where you would expect a 0 from get()
149+
* @param expectedZero the reading where you would expect a 0 from Get()
150150
*/
151151
DutyCycleEncoder(DigitalSource* digitalSource, double fullRange,
152152
double expectedZero);
@@ -156,7 +156,7 @@ class DutyCycleEncoder : public wpi::Sendable,
156156
*
157157
* @param digitalSource the digital source to attach to
158158
* @param fullRange the value to report at maximum travel
159-
* @param expectedZero the reading where you would expect a 0 from get()
159+
* @param expectedZero the reading where you would expect a 0 from Get()
160160
*/
161161
DutyCycleEncoder(std::shared_ptr<DigitalSource> digitalSource,
162162
double fullRange, double expectedZero);
@@ -199,12 +199,12 @@ class DutyCycleEncoder : public wpi::Sendable,
199199
void SetConnectedFrequencyThreshold(int frequency);
200200

201201
/**
202-
* Get the encoder value.
202+
* Get the encoder value in rotations.
203203
*
204204
* @warning This will return inaccurate values for up to 2 seconds after this
205205
* encoder is initialized unless SetAssumedFrequency() is used.
206206
*
207-
* @return the encoder value scaled by the full range input
207+
* @return the encoder value in rotations
208208
*/
209209
double Get() const;
210210

wpilibj/src/main/java/edu/wpi/first/wpilibj/DutyCycle.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ public void close() {
5454
}
5555

5656
/**
57-
* Get the frequency of the duty cycle signal. <b>Warning: This will return inaccurate values for
58-
* up to 2 seconds after the duty cycle input is initialized.</b>
57+
* Get the frequency of the duty cycle signal.
58+
*
59+
* <p><b>Warning: This will return inaccurate values for up to 2 seconds after the duty cycle
60+
* input is initialized.</b>
5961
*
6062
* @return frequency in Hertz
6163
*/

wpilibj/src/main/java/edu/wpi/first/wpilibj/DutyCycleEncoder.java

+11-10
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
* Class for supporting duty cycle/PWM encoders, such as the US Digital MA3 with PWM Output, the
1717
* CTRE Mag Encoder, the Rev Hex Encoder, and the AM Mag Encoder.
1818
*
19-
* <p>Warning: By default, position readings from {@link #get()} will be innacurate for up to 2
20-
* seconds after this encoder is initialized. Setting the frequency of the encoder's output using
21-
* {@link #setAssumedFrequency(double)} can be used to mitigate this, though users should verify the
22-
* true frequency of the specific encoder in use as it can vary between devices.
19+
* <p><b>Warning: By default, position readings from {@link #get()} will be innacurate for up to 2
20+
* seconds after this encoder is initialized.</b> Setting the frequency of the encoder's output
21+
* using {@link #setAssumedFrequency(double)} can be used to mitigate this, though users should
22+
* verify the true frequency of the specific encoder in use as it can vary between devices.
2323
*/
2424
public class DutyCycleEncoder implements Sendable, AutoCloseable {
2525
private final DutyCycle m_dutyCycle;
@@ -142,11 +142,10 @@ private double mapSensorRange(double pos) {
142142
}
143143

144144
/**
145-
* Get the encoder value since the last reset. <b> Warning: This will return inaccurate values for
146-
* up to 2 seconds after this encoder is initialized unless {@link #setAssumedFrequency(double)}
147-
* is used.</b>
145+
* Get the encoder value in rotations.
148146
*
149-
* <p>This is reported in rotations since the last reset.
147+
* <p><b> Warning: This will return inaccurate values for up to 2 seconds after this encoder is
148+
* initialized unless {@link #setAssumedFrequency(double)} is used.</b>
150149
*
151150
* @return the encoder value in rotations
152151
*/
@@ -196,8 +195,10 @@ public void setDutyCycleRange(double min, double max) {
196195
}
197196

198197
/**
199-
* Get the frequency in Hz of the duty cycle signal from the encoder. <b>Warning: This will return
200-
* inaccurate values for up to 2 seconds after this encoder is initialized.</b>
198+
* Get the frequency in Hz of the duty cycle signal from the encoder.
199+
*
200+
* <p><b>Warning: This will return inaccurate values for up to 2 seconds after this encoder is
201+
* initialized.</b>
201202
*
202203
* @return duty cycle frequency in Hz
203204
*/

0 commit comments

Comments
 (0)