Skip to content
Snippets Groups Projects
Commit 1cb0cfd0 authored by Hoop77's avatar Hoop77
Browse files

-

parent 986bf305
Branches
No related merge requests found
......@@ -87,7 +87,12 @@ int main(int argc, char ** argv)
timer->startPeriodicTimeout(
10ms,
[&]
{ sender->send(std::to_string(conn->getMeasuredSpeed().get()), "10.5.33.26", 10150, 1ms); });
{
std::ostringstream oss;
oss << std::to_string(conn->getMeasuredSpeed().get()) << "\n"
<< std::to_string(conn->getMeasuredPIDChange().get());
sender->send(oss.str(), "10.5.33.26", 10150, 1ms);
});
sensor->start(
[&](auto distance)
......
......@@ -104,7 +104,11 @@ def receive_speed():
while True:
data, address = sock.recvfrom(30)
if data:
print(float(data[4:]))
split = data[4:].split("\n")
speed = float(split[0])
change = float(split[1])
print("Speed: " + str(speed))
print("Change: " + str(change))
if __name__ == '__main__':
conn = OdroidConnection(ODROID_HOST_ADDRESS, "/root/repos/Hochautomatisiertes-Fahren/modules/catkin_ws/src/VeloxProtocolLib/cmake-build-debug/TerminalControl")
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment