Switched from DigitalSource to DigitalInput.
The new WPILib (2016) doesn't define Get on DigitalSource.
Change-Id: Iebff24e6a92ef9879e8908fcd56ec0350a05025e
diff --git a/frc971/wpilib/dma_edge_counting.h b/frc971/wpilib/dma_edge_counting.h
index e8bef6f..99ae80e 100644
--- a/frc971/wpilib/dma_edge_counting.h
+++ b/frc971/wpilib/dma_edge_counting.h
@@ -8,7 +8,7 @@
#include "frc971/wpilib/hall_effect.h"
-#include "DigitalSource.h"
+#include "DigitalInput.h"
#include "Encoder.h"
#include "AnalogInput.h"
#include "Utility.h"
@@ -41,7 +41,7 @@
// corresponding to those edges.
class DMAEdgeCounter : public DMASampleHandlerInterface {
public:
- DMAEdgeCounter(Encoder *encoder, DigitalSource *input)
+ DMAEdgeCounter(Encoder *encoder, DigitalInput *input)
: encoder_(encoder), input_(input) {}
int positive_count() const { return pos_edge_count_; }
@@ -75,7 +75,7 @@
bool ExtractValue(const DMASample &sample) const;
Encoder *const encoder_;
- DigitalSource *const input_;
+ DigitalInput *const input_;
// The last DMA reading we got.
DMASample prev_sample_;
@@ -101,7 +101,7 @@
// Reads a hall effect in sync with DMA samples.
class DMADigitalReader : public DMASampleHandlerInterface {
public:
- DMADigitalReader(DigitalSource *input) : input_(input) {}
+ DMADigitalReader(DigitalInput *input) : input_(input) {}
bool value() const { return value_; }
@@ -115,7 +115,7 @@
dma->Add(input_);
}
- DigitalSource *const input_;
+ DigitalInput *const input_;
bool value_;
diff --git a/frc971/wpilib/interrupt_edge_counting.h b/frc971/wpilib/interrupt_edge_counting.h
index f0b5e32..987e01d 100644
--- a/frc971/wpilib/interrupt_edge_counting.h
+++ b/frc971/wpilib/interrupt_edge_counting.h
@@ -9,7 +9,7 @@
#include "aos/common/stl_mutex.h"
#include "aos/common/macros.h"
-#include "DigitalSource.h"
+#include "DigitalInput.h"
#include "Encoder.h"
#include "AnalogInput.h"
#include "Utility.h"
@@ -109,7 +109,7 @@
// input.
class EdgeCounter : public InterruptHandler {
public:
- EdgeCounter(Encoder *encoder, DigitalSource *input)
+ EdgeCounter(Encoder *encoder, DigitalInput *input)
: encoder_(encoder), input_(input) {}
// Returns the current interrupt edge counts and encoder values.
@@ -140,7 +140,7 @@
void operator()() override;
Encoder *encoder_;
- DigitalSource *input_;
+ DigitalInput *input_;
// The following variables represent the current "shadow" state.
bool current_value_ = false;