From 60176a3340bd7b433b749969738d6f4abd740074 Mon Sep 17 00:00:00 2001 From: pmoegenburg Date: Wed, 15 Nov 2023 15:18:55 -0500 Subject: [PATCH] debug change --- .../motor-control/core/tasks/motion_controller_task.hpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/include/motor-control/core/tasks/motion_controller_task.hpp b/include/motor-control/core/tasks/motion_controller_task.hpp index 1a981d739..329fd88cb 100644 --- a/include/motor-control/core/tasks/motion_controller_task.hpp +++ b/include/motor-control/core/tasks/motion_controller_task.hpp @@ -230,17 +230,13 @@ class MotionControllerMessageHandler { .severity = can::ids::ErrorSeverity::unrecoverable, .error_code = can::ids::ErrorCode::motor_driver_error_detected}); // delete - // TickTypet currentTick = xTaskGetTickCount(); - // while(xTaskGetTickCount() – currentTick < pdMSTO_TICKS(1000)) vTaskDelay(pdMS_TO_TICKS(200)); // Need to act immediately?! Just decrease this?! debounce_count++; if (debounce_count > 10) { // send msg immediately, reset flags after delay?! if (controller.read_tmc_diag0()) { - handle_message( - can::messages::MotorDriverErrorEncountered{.message_index = m.message_index}); + motion_client.send_motion_controller_queue(can::messages::MotorDriverErrorEncountered{.message_index = m.message_index}); } else { - handle_message(can::messages::ResetMotorDriverErrorHandling{ - .message_index = m.message_index}); + motion_client.send_motion_controller_queue(can::messages::ResetMotorDriverErrorHandling{.message_index = m.message_index}); } diag0_debounced = false; debounce_count = 0;