mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +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;
|
break;
|
||||||
}
|
}
|
||||||
m_distancePerPulse = 1.0;
|
m_distancePerPulse = 1.0;
|
||||||
|
m_pidSource = PIDSourceParameter.kDistance;
|
||||||
|
|
||||||
UsageReporting.report(tResourceType.kResourceType_Encoder,
|
UsageReporting.report(tResourceType.kResourceType_Encoder,
|
||||||
m_index, m_encodingType.value);
|
m_index, m_encodingType.value);
|
||||||
|
|||||||
Reference in New Issue
Block a user