\section{aversive\_\-10-03-12/modules/devices/robot/blocking\_\-detection\_\-manager/blocking\_\-detection\_\-manager.c File Reference}
\label{blocking__detection__manager_8c}\index{aversive\_\-10-03-12/modules/devices/robot/blocking\_\-detection\_\-manager/blocking\_\-detection\_\-manager.c@{aversive\_\-10-03-12/modules/devices/robot/blocking\_\-detection\_\-manager/blocking\_\-detection\_\-manager.c}}
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$aversive/error.h$>$}\par
{\tt \#include $<$blocking\_\-detection\_\-manager.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
void {\bf bd\_\-init} (struct {\bf blocking\_\-detection} $\ast$bd)
\item 
void {\bf bd\_\-set\_\-current\_\-thresholds} (struct {\bf blocking\_\-detection} $\ast$bd, int32\_\-t k1, int32\_\-t k2, uint32\_\-t i\_\-thres, uint16\_\-t cpt\_\-thres)
\item 
void {\bf bd\_\-set\_\-speed\_\-threshold} (struct {\bf blocking\_\-detection} $\ast$bd, uint16\_\-t speed)
\item 
void {\bf bd\_\-reset} (struct {\bf blocking\_\-detection} $\ast$bd)
\item 
void {\bf bd\_\-manage\_\-from\_\-speed\_\-cmd} (struct {\bf blocking\_\-detection} $\ast$bd, int32\_\-t speed, int32\_\-t cmd)
\end{CompactItemize}


\subsection{Function Documentation}
\index{blocking\_\-detection\_\-manager.c@{blocking\_\-detection\_\-manager.c}!bd\_\-init@{bd\_\-init}}
\index{bd\_\-init@{bd\_\-init}!blocking_detection_manager.c@{blocking\_\-detection\_\-manager.c}}
\subsubsection[bd\_\-init]{\setlength{\rightskip}{0pt plus 5cm}void bd\_\-init (struct {\bf blocking\_\-detection} $\ast$ {\em bd})}\label{blocking__detection__manager_8c_9623e96866432935c86064d269dca2f5}


init module, give the robot system to use as a parameter 

Definition at line 32 of file blocking\_\-detection\_\-manager.c.

References IRQ\_\-LOCK, and IRQ\_\-UNLOCK.\index{blocking\_\-detection\_\-manager.c@{blocking\_\-detection\_\-manager.c}!bd\_\-manage\_\-from\_\-speed\_\-cmd@{bd\_\-manage\_\-from\_\-speed\_\-cmd}}
\index{bd\_\-manage\_\-from\_\-speed\_\-cmd@{bd\_\-manage\_\-from\_\-speed\_\-cmd}!blocking_detection_manager.c@{blocking\_\-detection\_\-manager.c}}
\subsubsection[bd\_\-manage\_\-from\_\-speed\_\-cmd]{\setlength{\rightskip}{0pt plus 5cm}void bd\_\-manage\_\-from\_\-speed\_\-cmd (struct {\bf blocking\_\-detection} $\ast$ {\em bd}, \/  int32\_\-t {\em speed}, \/  int32\_\-t {\em cmd})}\label{blocking__detection__manager_8c_54c56efa7a70047b7d460deaca357e47}


function to be called periodically 

function to be called periodically

function to be called periodically

get value of blocking detection 

Definition at line 77 of file blocking\_\-detection\_\-manager.c.

References ABS, BD\_\-DEBUG, blocking\_\-detection::cpt, blocking\_\-detection::cpt\_\-thres, DEBUG, blocking\_\-detection::debug\_\-cpt, E\_\-BLOCKING\_\-DETECTION\_\-MANAGER, i, blocking\_\-detection::i\_\-thres, blocking\_\-detection::k1, blocking\_\-detection::k2, blocking\_\-detection::speed\_\-thres, and WARNING.\index{blocking\_\-detection\_\-manager.c@{blocking\_\-detection\_\-manager.c}!bd\_\-reset@{bd\_\-reset}}
\index{bd\_\-reset@{bd\_\-reset}!blocking_detection_manager.c@{blocking\_\-detection\_\-manager.c}}
\subsubsection[bd\_\-reset]{\setlength{\rightskip}{0pt plus 5cm}void bd\_\-reset (struct {\bf blocking\_\-detection} $\ast$ {\em bd})}\label{blocking__detection__manager_8c_7e2b12c1ff5ef100e735cd74aeab4924}


reset current blocking 

Definition at line 66 of file blocking\_\-detection\_\-manager.c.

References blocking\_\-detection::cpt, IRQ\_\-LOCK, and IRQ\_\-UNLOCK.\index{blocking\_\-detection\_\-manager.c@{blocking\_\-detection\_\-manager.c}!bd\_\-set\_\-current\_\-thresholds@{bd\_\-set\_\-current\_\-thresholds}}
\index{bd\_\-set\_\-current\_\-thresholds@{bd\_\-set\_\-current\_\-thresholds}!blocking_detection_manager.c@{blocking\_\-detection\_\-manager.c}}
\subsubsection[bd\_\-set\_\-current\_\-thresholds]{\setlength{\rightskip}{0pt plus 5cm}void bd\_\-set\_\-current\_\-thresholds (struct {\bf blocking\_\-detection} $\ast$ {\em bd}, \/  int32\_\-t {\em k1}, \/  int32\_\-t {\em k2}, \/  uint32\_\-t {\em i\_\-thres}, \/  uint16\_\-t {\em cpt\_\-thres})}\label{blocking__detection__manager_8c_b1b4397a1da7aa89256444f20ed38b1e}


thresholds for current-based blocking detection. If cpt\_\-thres is 0, disable it. 

Definition at line 41 of file blocking\_\-detection\_\-manager.c.

References blocking\_\-detection::cpt, blocking\_\-detection::cpt\_\-thres, blocking\_\-detection::i\_\-thres, IRQ\_\-LOCK, IRQ\_\-UNLOCK, blocking\_\-detection::k1, and blocking\_\-detection::k2.\index{blocking\_\-detection\_\-manager.c@{blocking\_\-detection\_\-manager.c}!bd\_\-set\_\-speed\_\-threshold@{bd\_\-set\_\-speed\_\-threshold}}
\index{bd\_\-set\_\-speed\_\-threshold@{bd\_\-set\_\-speed\_\-threshold}!blocking_detection_manager.c@{blocking\_\-detection\_\-manager.c}}
\subsubsection[bd\_\-set\_\-speed\_\-threshold]{\setlength{\rightskip}{0pt plus 5cm}void bd\_\-set\_\-speed\_\-threshold (struct {\bf blocking\_\-detection} $\ast$ {\em bd}, \/  uint16\_\-t {\em speed})}\label{blocking__detection__manager_8c_4c2e00aa02f6000320317cafed0248f7}


speed threshold: if speed is above it, disable \doxyref{blocking\_\-detection}{p.}{structblocking__detection}. 

Definition at line 56 of file blocking\_\-detection\_\-manager.c.

References IRQ\_\-LOCK, IRQ\_\-UNLOCK, and blocking\_\-detection::speed\_\-thres.