Quote:
Originally Posted by mathmogul
Is subsystem1SpeedController1 an object or pointer to an object? If the suggested code is correct, then subsystem1SpeedController1 is a pointer and casting to Talon& seems strange to me anyway.
|
Here's the full code as RobotBuilder generated (minus the comments)
Code:
#include "RobotMap.h"
#include "LiveWindow/LiveWindow.h"
std::shared_ptr<SpeedController> RobotMap::subsystem1SpeedController1;
void RobotMap::init() {
LiveWindow *lw = LiveWindow::GetInstance();
subsystem1SpeedController1.reset(new Talon(0));
lw->AddActuator("Subsystem 1", "Speed Controller 1", (Talon&) subsystem1SpeedController1);
}