Sets the default PIDSourceParameter to be kDistance so there is no null pointer exception

Change-Id: Ice4889ea3f6fd5afe6984f9715758a178222837f
This commit is contained in:
Jonathan Leitschuh
2014-06-08 16:41:47 -04:00
parent eb00824a51
commit 85d9ead4e2

View File

@@ -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);