mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
Fixed C++ side of artf2604 in FRCSim - synchronized C++ codebases, updated examples.
Change-Id: I2fdc9deb4c8e249448dcbda4214fd900c2bc4ea8
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user