Add Encoder Index as a child (#857)

This commit is contained in:
sciencewhiz
2017-12-29 19:48:39 -08:00
committed by Peter Johnson
parent 02131639bc
commit c647a801ad
3 changed files with 4 additions and 2 deletions

View File

@@ -464,7 +464,8 @@ double Encoder::PIDGet() {
*/
void Encoder::SetIndexSource(int channel, Encoder::IndexingType type) {
// Force digital input if just given an index
m_indexSource = std::make_unique<DigitalInput>(channel);
m_indexSource = std::make_shared<DigitalInput>(channel);
AddChild(m_indexSource);
SetIndexSource(*m_indexSource.get(), type);
}