diff options
author | ccolin | 2021-01-04 15:09:38 +0100 |
---|---|---|
committer | ccolin | 2021-01-04 15:09:38 +0100 |
commit | 81108c1b0fa8f710ff7417476c10c83e70ae7a15 (patch) | |
tree | d03ba3ff458f79b104b8b62181b9775c8e035342 /src/drone_controller.cc | |
parent | 0c28d9dc80e634ebfbabed5ad446b6a4f82056e3 (diff) |
properly honor default values of sphere radius and speed limit
Diffstat (limited to 'src/drone_controller.cc')
-rw-r--r-- | src/drone_controller.cc | 3 |
1 files changed, 1 insertions, 2 deletions
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); } } |