How would you declare a digital input device?

We are trying to code for limit switches on our intake, but our declaration for the limit switches is showing up as incorrect. The lines we are using are pasted below.

frc::DigitalInput HatchLimitLeft{1};
frc::DigitalInput HatchLimitRight{2};

The error message specifically says "namespace “frc” has no member “DigitalInput.” Any help would be greatly appreciated!

Did you #include <frc/DigitalInput.h> ?

Thank you! That ended up working. Is that new for 2020, and if so where can we find these sorts of updates to C++ coding for this year?

That is not new to 2020. If you want a summary of all changes, that can be found here.

Great, thanks!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.