Added support for 2017 WPILib.
Change-Id: Ib22e31d0999b123c65498c31c654e3fa7bab4798
diff --git a/frc971/wpilib/interrupt_edge_counting.cc b/frc971/wpilib/interrupt_edge_counting.cc
index 5c10b89..ec6f627 100644
--- a/frc971/wpilib/interrupt_edge_counting.cc
+++ b/frc971/wpilib/interrupt_edge_counting.cc
@@ -21,7 +21,11 @@
void EdgeCounter::operator()() {
::aos::SetCurrentThreadName("EdgeCounter_" +
+#ifdef WPILIB2017
+ ::std::to_string(input_->GetChannel()));
+#else
::std::to_string(input_->GetChannelForRouting()));
+#endif
input_->RequestInterrupts();
input_->SetUpSourceEdge(true, true);
@@ -55,7 +59,11 @@
current_value_ = hall_value;
} else {
LOG(WARNING, "Detected spurious edge on %d. Dropping it.\n",
+#ifdef WPILIB2017
+ input_->GetChannel());
+#else
input_->GetChannelForRouting());
+#endif
}
}
}