frc-docs
frc-docs copied to clipboard
[docs] Make C++ example for advantagescope swerve states compilable
When I was initially implementing this in my codebase the example in the docs confused me because although it seemed straightforward it wouldn’t actually compile. The publisher needs a std::span of states rather than a vector as indicated by the docs. While this is definitely not the most concise implementation, (it’s ripped from our season code) it’s a lot more helpful in my opinion.