From 81108c1b0fa8f710ff7417476c10c83e70ae7a15 Mon Sep 17 00:00:00 2001 From: ccolin Date: Mon, 4 Jan 2021 15:09:38 +0100 Subject: properly honor default values of sphere radius and speed limit --- src/drone_controller.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/drone_controller.cc') diff --git a/src/drone_controller.cc b/src/drone_controller.cc index 58f0359..0a98a63 100644 --- a/src/drone_controller.cc +++ b/src/drone_controller.cc @@ -262,12 +262,11 @@ void DroneController::computeCollisions(double sphere_radius) { void DroneController::computeSpeedingViolations(double speed) { - speed_violations.clear(); + speed_limit = speed; for (int i = 0; i < duration; i++) { for (Drone &d : drones) { d.setTo(i); if (d.getSpeed() > speed) { - speed_violations[i].append(d.getId()); emit speedViolation(d.getId(), d.getSpeed(), i); } } -- cgit v1.2.3-70-g09d2