mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Sets the default PIDSourceParameter to be kDistance so there is no null pointer exception
Change-Id: Ice4889ea3f6fd5afe6984f9715758a178222837f
This commit is contained in:
@@ -99,6 +99,7 @@ public class Encoder extends SensorBase implements CounterBase, PIDSource,
|
||||
break;
|
||||
}
|
||||
m_distancePerPulse = 1.0;
|
||||
m_pidSource = PIDSourceParameter.kDistance;
|
||||
|
||||
UsageReporting.report(tResourceType.kResourceType_Encoder,
|
||||
m_index, m_encodingType.value);
|
||||
|
||||
Reference in New Issue
Block a user