logging code... fixed the error initializing the DriverStation Object potentially, and fixed a few of the syntax errors

'
This commit is contained in:
john sandstedt 2016-02-22 19:04:27 -05:00
parent 4eb4ccb188
commit 420a5723a7

View File

@ -31,6 +31,7 @@ class Robot: public IterativeRobot
RobotDrive drive;
Shooter shooter;
Joystick driver_stick, operator_stick;
DriverStation ds;
float power;
public:
Robot():
@ -45,6 +46,7 @@ public:
driver_stick(0), // right stick (operator)
operator_stick(1) // left stick (driver)
{
ds.GetInstance();
}
@ -59,11 +61,10 @@ private:
const std::string autoNameCustom = "My Auto";
std::string autoSelected;
void LogData()
/*void LogData()
{
static PowerDistributionPanel pdp;
static DriverStation* ds = DriverStation::GetInstance();
static DriverStation* ds = DriverStation::GetInstance();
static DriverStation ds = DriverStation::GetInstance();
static std::vector<CANTalon*> motors;
static std::ofstream logA, logB, logC;
@ -72,7 +73,7 @@ private:
SmartDashboard::PutBoolean("log A", logA.is_open());
SmartDashboard::PutBoolean("log B", logB.is_open());
SmartDashboard::PutBoolean("log C", logC.is_open());
}
}*/
void RobotInit()
{
@ -190,7 +191,6 @@ private:
void LogCSVData()
{
static PowerDistributionPanel pdp; // preparing to read from the pdp
static DriverStation* ds = DriverStation::GetInstance();
static std::vector<CANTalon*> motors;
static std::ofstream logA, logB, logC;
@ -261,11 +261,11 @@ private:
LOG("\t" << driver_stick.GetTwist());
//DriverStation Data
LOG("\t" << ds->GetAlliance());
LOG("\t" << ds->GetLocation());
LOG("\t" << ds->GetMatchTime());
LOG("\t" << ds->IsFMSAttached());
LOG("\t" << ds->IsSysBrownedOut());
LOG("\t" << ds.GetAlliance());
LOG("\t" << ds.GetLocation());
LOG("\t" << ds.GetMatchTime());
LOG("\t" << ds.IsFMSAttached());
LOG("\t" << ds.IsSysBrownedOut());
LOG(std::endl);
}
};