Used new WPILIB2015 macro to mark differences with the old WPILib.
Change-Id: I9e45a22096bdb108f74f9dc341037d5f64506ff5
diff --git a/y2015/wpilib/wpilib_interface.cc b/y2015/wpilib/wpilib_interface.cc
index 758ecf1..eaaeff9 100644
--- a/y2015/wpilib/wpilib_interface.cc
+++ b/y2015/wpilib/wpilib_interface.cc
@@ -127,7 +127,7 @@
arm_left_encoder_.set_encoder(::std::move(encoder));
}
- void set_arm_left_index(::std::unique_ptr<DigitalSource> index) {
+ void set_arm_left_index(::std::unique_ptr<DigitalInput> index) {
filter_.Add(index.get());
arm_left_encoder_.set_index(::std::move(index));
}
@@ -142,7 +142,7 @@
arm_right_encoder_.set_encoder(::std::move(encoder));
}
- void set_arm_right_index(::std::unique_ptr<DigitalSource> index) {
+ void set_arm_right_index(::std::unique_ptr<DigitalInput> index) {
filter_.Add(index.get());
arm_right_encoder_.set_index(::std::move(index));
}
@@ -157,7 +157,7 @@
elevator_left_encoder_.set_encoder(::std::move(encoder));
}
- void set_elevator_left_index(::std::unique_ptr<DigitalSource> index) {
+ void set_elevator_left_index(::std::unique_ptr<DigitalInput> index) {
filter_.Add(index.get());
elevator_left_encoder_.set_index(::std::move(index));
}
@@ -172,7 +172,7 @@
elevator_right_encoder_.set_encoder(::std::move(encoder));
}
- void set_elevator_right_index(::std::unique_ptr<DigitalSource> index) {
+ void set_elevator_right_index(::std::unique_ptr<DigitalInput> index) {
filter_.Add(index.get());
elevator_right_encoder_.set_index(::std::move(index));
}
@@ -187,7 +187,7 @@
wrist_encoder_.set_encoder(::std::move(encoder));
}
- void set_wrist_index(::std::unique_ptr<DigitalSource> index) {
+ void set_wrist_index(::std::unique_ptr<DigitalInput> index) {
filter_.Add(index.get());
wrist_encoder_.set_index(::std::move(index));
}
@@ -219,7 +219,12 @@
::aos::SetCurrentThreadName("SensorReader");
my_pid_ = getpid();
- ds_ = DriverStation::GetInstance();
+ ds_ =
+#ifdef WPILIB2015
+ DriverStation::GetInstance();
+#else
+ &DriverStation::GetInstance();
+#endif
wrist_encoder_.Start();
dma_synchronizer_->Start();
@@ -369,7 +374,7 @@
fridge_(".frc971.control_loops.fridge_queue.output"),
claw_(".frc971.control_loops.claw_queue.output") {}
- void set_pressure_switch(::std::unique_ptr<DigitalSource> pressure_switch) {
+ void set_pressure_switch(::std::unique_ptr<DigitalInput> pressure_switch) {
pressure_switch_ = ::std::move(pressure_switch);
}
@@ -469,7 +474,7 @@
::std::unique_ptr<BufferedSolenoid> claw_pinchers_;
::std::unique_ptr<BufferedSolenoid> grabber_latch_release_;
::std::unique_ptr<BufferedSolenoid> grabber_fold_up_;
- ::std::unique_ptr<DigitalSource> pressure_switch_;
+ ::std::unique_ptr<DigitalInput> pressure_switch_;
::std::unique_ptr<Relay> compressor_relay_;
::aos::Queue<::frc971::control_loops::FridgeQueue::Output> fridge_;