Skip to content

Commit 7bffafe

Browse files
committed
add missing teleplot functions
1 parent cd3c6b0 commit 7bffafe

1 file changed

Lines changed: 33 additions & 1 deletion

File tree

src/Printer.cpp

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,39 @@ Format Specifier
245245
if (teleplotUDP.IsInitialized())
246246
teleplotUDP.update2D(varName.c_str(), point.x, point.y);
247247
else
248-
println(">" + varName + ":" + String((int)point.x) + ":" + String((int)point.y) + "|xy");
248+
println(">%s:%i:%i|xy", varName, point.x, point.y);
249+
}
250+
251+
void teleplot(const String &varName, PointF point)
252+
{
253+
if (teleplotUDP.IsInitialized())
254+
teleplotUDP.update2D(varName.c_str(), point.x, point.y);
255+
else
256+
println(">%s:%f:%f|xy", varName, point.x, point.y);
257+
}
258+
259+
void teleplot(const String &varName, Pose pose)
260+
{
261+
if (teleplotUDP.IsInitialized())
262+
teleplotUDP.update2D(varName.c_str(), pose.x, pose.y);
263+
else
264+
println(">%s:%i:%i|xy", varName, pose.x, pose.y);
265+
}
266+
267+
void teleplot(const String &varName, PoseF pose)
268+
{
269+
if (teleplotUDP.IsInitialized())
270+
teleplotUDP.update2D(varName.c_str(), pose.x, pose.y);
271+
else
272+
println(">%s:%f:%f|xy", varName, pose.x, pose.y);
273+
}
274+
275+
void teleplot(const String &varName, PolarPoint polarPoint)
276+
{
277+
if (teleplotUDP.IsInitialized())
278+
teleplotUDP.update2D(varName.c_str(), polarPoint.x, polarPoint.y);
279+
else
280+
println(">%s:%f:%f|xy", varName, polarPoint.x, polarPoint.y);
249281
}
250282

251283
/*

0 commit comments

Comments
 (0)