Fixed C++ side of artf2604 in FRCSim - synchronized C++ codebases, updated examples.

Change-Id: I2fdc9deb4c8e249448dcbda4214fd900c2bc4ea8
This commit is contained in:
Colby Skeggs
2014-06-24 10:37:02 -07:00
parent 02e19a0147
commit ff597e6ac4
72 changed files with 763 additions and 861 deletions

View File

@@ -102,10 +102,10 @@ void LiveWindow::AddActuator(const char *subsystem, const char *name,
/**
* INTERNAL
*/
void LiveWindow::AddSensor(std::string type, int module, int channel, LiveWindowSendable *component)
void LiveWindow::AddSensor(std::string type, int channel, LiveWindowSendable *component)
{
std::ostringstream oss;
oss << type << "[" << module << "," << channel << "]";
oss << type << "[" << channel << "]";
std::string types(oss.str());
char* cc = new char[types.size() + 1];
types.copy(cc, types.size());
@@ -118,10 +118,10 @@ void LiveWindow::AddSensor(std::string type, int module, int channel, LiveWindow
/**
* INTERNAL
*/
void LiveWindow::AddActuator(std::string type, int module, int channel, LiveWindowSendable *component)
void LiveWindow::AddActuator(std::string type, int channel, LiveWindowSendable *component)
{
std::ostringstream oss;
oss << type << "[" << module << "," << channel << "]";
oss << type << "[" << channel << "]";
std::string types(oss.str());
char* cc = new char[types.size() + 1];
types.copy(cc, types.size());
@@ -129,6 +129,20 @@ void LiveWindow::AddActuator(std::string type, int module, int channel, LiveWind
AddActuator("Ungrouped", cc, component);
}
/**
* INTERNAL
*/
void LiveWindow::AddActuator(std::string type, int module, int channel, LiveWindowSendable *component)
{
std::ostringstream oss;
oss << type << "[" << module << "," << channel << "]";
std::string types(oss.str());
char* cc = new char[types.size() + 1];
types.copy(cc, types.size());
cc[types.size()]='\0';
AddActuator("Ungrouped", cc, component);
}
/**
* Tell all the sensors to update (send) their values
* Actuators are handled through callbacks on their value changing from the
@@ -184,4 +198,3 @@ void LiveWindow::InitializeLiveWindowComponents()
}
}
}