Skip to content
Snippets Groups Projects
Commit 944b85a6 authored by Hoop77's avatar Hoop77 Committed by lenoelda
Browse files

changed gui label

parent 700fcaff
No related merge requests found
...@@ -111,7 +111,7 @@ ApplicationWindow { ...@@ -111,7 +111,7 @@ ApplicationWindow {
// --- speed --- // --- speed ---
Label { Label {
id: speedLabel id: speedLabel
text: "Platoon Speed:" text: "ACC Desired Speed:"
anchors.left: hostLabel.left anchors.left: hostLabel.left
anchors.top: innerPlatoonDistanceLabel.bottom anchors.top: innerPlatoonDistanceLabel.bottom
......
...@@ -22,16 +22,14 @@ void Ultrasonic::onInit() ...@@ -22,16 +22,14 @@ void Ultrasonic::onInit()
messageOStream.write("onInit", "START"); messageOStream.write("onInit", "START");
ussData = nh.advertise<ussDataMsg>("ussData", 1); ussData = nh.advertise<ussDataMsg>("ussData", 1);
//sensor.init(); sensor.init();
timer = networking::time::Timer::create(net); timer = networking::time::Timer::create(net);
timer->startPeriodicTimeout( timer->startPeriodicTimeout(
std::chrono::milliseconds(UltrasonicSensor::DELAY), std::chrono::milliseconds(UltrasonicSensor::DELAY),
[&] [&]
{ {
ussDataMsg msg; ussDataMsg msg;
//auto distance = streamMedianFilter.moveWindow(sensor.getDistance()); auto distance = streamMedianFilter.moveWindow(sensor.getDistance());
static int distance = 0;
distance++;
msg.distance = distance; msg.distance = distance;
msg.timestamp = ros::Time::now(); msg.timestamp = ros::Time::now();
ussData.publish(msg); ussData.publish(msg);
......
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