From f7234ef1be1444e0b2c15608d9ad5574def6d5fe Mon Sep 17 00:00:00 2001 From: Stephen Dade Date: Mon, 2 Sep 2024 19:21:55 +1000 Subject: [PATCH] Rover: stop circle mode if unable to track --- Rover/mode_circle.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Rover/mode_circle.cpp b/Rover/mode_circle.cpp index 1635bf099d20d6..f55ba70f4f898e 100644 --- a/Rover/mode_circle.cpp +++ b/Rover/mode_circle.cpp @@ -155,7 +155,11 @@ void ModeCircle::update() // Update depending on stage if (!reached_edge) { update_drive_to_radius(); - + } else if (dist_to_edge_m > config.radius * 0.2) { + // if more than 20% inside or outside circle radius, stop vehicle + GCS_SEND_TEXT(MAV_SEVERITY_ERROR, "Circle: vehicle unable to turn fast enough to track circle. Stopping vehicle."); + stop_vehicle(); + return; } else { update_circling(); }