Skip to content

Commit

Permalink
debug changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoegenburg committed Nov 14, 2023
1 parent 41c1560 commit 7d270e1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions include/motor-control/core/tasks/motion_controller_task.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ 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?!
Expand All @@ -240,9 +242,10 @@ class MotionControllerMessageHandler {
}
diag0_debounced = false;
debounce_count = 0;
} else {
// Run this by Seth
motion_client.send_motion_controller_queue(can::messages::DebounceMotorDriverError{.message_index = m.message_index});
}
// Pull queue in via constructor?! Run by Seth
motion_client.send_motion_controller_queue(can::messages::DebounceMotorDriverError{.message_index = m.message_index});
}

MotorControllerType& controller;
Expand Down

0 comments on commit 7d270e1

Please sign in to comment.