aboutsummaryrefslogtreecommitdiff
path: root/src/drone_controller.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/drone_controller.cc')
-rw-r--r--src/drone_controller.cc3
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);
}
}