Quote:
Originally Posted by ebernerrd
I've actually gone and fixed these issues. When I write the code as you did, I get an error on SmartDashboard:  utData("Auto modes", &autonomousChooser);
The error I have is:
invalid arguments
Candidates are:
void PutData(llvm::StringRef, frc::Sendable *)
void PutData(frc::NamedSendable *)
|
autonomousChoose was defined as a pointer already "SendableChooser<Command *> *autonomousChooser"
while the other team's example was NOT a pointer (no * before the variable name).
As such, PutData is looking for a pointer to be sent to it... so you should not preceed it with & but instead just give the name of the variable (the pointer). The other team needs the & in order to give an address (pointer) to PutData. I believe if you remove the & you'll be good there.
BTW, don't forget to 'new' any pointers before using them and 'delete' them at the end in some destructor like ~Robot()