\section{aversive\_\-10-03-12/modules/devices/robot/blocking\_\-detection\_\-manager/blocking\_\-detection\_\-manager.h File Reference}
\label{blocking__detection__manager_8h}\index{aversive\_\-10-03-12/modules/devices/robot/blocking\_\-detection\_\-manager/blocking\_\-detection\_\-manager.h@{aversive\_\-10-03-12/modules/devices/robot/blocking\_\-detection\_\-manager/blocking\_\-detection\_\-manager.h}}
{\tt \#include $<$control\_\-system\_\-manager.h$>$}\par
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct {\bf blocking\_\-detection}
\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf BD\_\-DEBUG}~128
\end{CompactItemize}
\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\_\-cs} (struct {\bf blocking\_\-detection} $\ast$bd, struct {\bf cs} $\ast${\bf cs})
\item 
void {\bf bd\_\-manage\_\-from\_\-pos\_\-cmd} (struct {\bf blocking\_\-detection} $\ast$bd, int32\_\-t pos, int32\_\-t cmd)
\item 
void {\bf bd\_\-manage\_\-from\_\-speed\_\-cmd} (struct {\bf blocking\_\-detection} $\ast$bd, int32\_\-t speed, int32\_\-t cmd)
\item 
uint8\_\-t {\bf bd\_\-get} (struct {\bf blocking\_\-detection} $\ast$bd)
\end{CompactItemize}


\subsection{Define Documentation}
\index{blocking\_\-detection\_\-manager.h@{blocking\_\-detection\_\-manager.h}!BD\_\-DEBUG@{BD\_\-DEBUG}}
\index{BD\_\-DEBUG@{BD\_\-DEBUG}!blocking_detection_manager.h@{blocking\_\-detection\_\-manager.h}}
\subsubsection[BD\_\-DEBUG]{\setlength{\rightskip}{0pt plus 5cm}\#define BD\_\-DEBUG~128}\label{blocking__detection__manager_8h_598877feb9675b114df9b170f39032cb}




Definition at line 29 of file blocking\_\-detection\_\-manager.h.

Referenced by bd\_\-manage\_\-from\_\-speed\_\-cmd().

\subsection{Function Documentation}
\index{blocking\_\-detection\_\-manager.h@{blocking\_\-detection\_\-manager.h}!bd\_\-get@{bd\_\-get}}
\index{bd\_\-get@{bd\_\-get}!blocking_detection_manager.h@{blocking\_\-detection\_\-manager.h}}
\subsubsection[bd\_\-get]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t bd\_\-get (struct {\bf blocking\_\-detection} $\ast$ {\em bd})}\label{blocking__detection__manager_8h_72692bb08883fd02b21b70d5dcb85af1}


get value of blocking detection \index{blocking\_\-detection\_\-manager.h@{blocking\_\-detection\_\-manager.h}!bd\_\-init@{bd\_\-init}}
\index{bd\_\-init@{bd\_\-init}!blocking_detection_manager.h@{blocking\_\-detection\_\-manager.h}}
\subsubsection[bd\_\-init]{\setlength{\rightskip}{0pt plus 5cm}void bd\_\-init (struct {\bf blocking\_\-detection} $\ast$ {\em bd})}\label{blocking__detection__manager_8h_9623e96866432935c86064d269dca2f5}


init module, give the \doxyref{cs}{p.}{structcs} as parameter

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.h@{blocking\_\-detection\_\-manager.h}!bd\_\-manage\_\-from\_\-cs@{bd\_\-manage\_\-from\_\-cs}}
\index{bd\_\-manage\_\-from\_\-cs@{bd\_\-manage\_\-from\_\-cs}!blocking_detection_manager.h@{blocking\_\-detection\_\-manager.h}}
\subsubsection[bd\_\-manage\_\-from\_\-cs]{\setlength{\rightskip}{0pt plus 5cm}void bd\_\-manage\_\-from\_\-cs (struct {\bf blocking\_\-detection} $\ast$ {\em bd}, \/  struct {\bf cs} $\ast$ {\em cs})}\label{blocking__detection__manager_8h_32bcee90708ae35ae27e7f03a72f8735}


function to be called periodicallyn, when we use \doxyref{cs}{p.}{structcs} structure \index{blocking\_\-detection\_\-manager.h@{blocking\_\-detection\_\-manager.h}!bd\_\-manage\_\-from\_\-pos\_\-cmd@{bd\_\-manage\_\-from\_\-pos\_\-cmd}}
\index{bd\_\-manage\_\-from\_\-pos\_\-cmd@{bd\_\-manage\_\-from\_\-pos\_\-cmd}!blocking_detection_manager.h@{blocking\_\-detection\_\-manager.h}}
\subsubsection[bd\_\-manage\_\-from\_\-pos\_\-cmd]{\setlength{\rightskip}{0pt plus 5cm}void bd\_\-manage\_\-from\_\-pos\_\-cmd (struct {\bf blocking\_\-detection} $\ast$ {\em bd}, \/  int32\_\-t {\em pos}, \/  int32\_\-t {\em cmd})}\label{blocking__detection__manager_8h_f4f50457878e3f343875eda3ffb10855}


function to be called periodically, when we use values directly \index{blocking\_\-detection\_\-manager.h@{blocking\_\-detection\_\-manager.h}!bd\_\-manage\_\-from\_\-speed\_\-cmd@{bd\_\-manage\_\-from\_\-speed\_\-cmd}}
\index{bd\_\-manage\_\-from\_\-speed\_\-cmd@{bd\_\-manage\_\-from\_\-speed\_\-cmd}!blocking_detection_manager.h@{blocking\_\-detection\_\-manager.h}}
\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_8h_54c56efa7a70047b7d460deaca357e47}


function to be called periodically, when we use values directly

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.h@{blocking\_\-detection\_\-manager.h}!bd\_\-reset@{bd\_\-reset}}
\index{bd\_\-reset@{bd\_\-reset}!blocking_detection_manager.h@{blocking\_\-detection\_\-manager.h}}
\subsubsection[bd\_\-reset]{\setlength{\rightskip}{0pt plus 5cm}void bd\_\-reset (struct {\bf blocking\_\-detection} $\ast$ {\em bd})}\label{blocking__detection__manager_8h_7e2b12c1ff5ef100e735cd74aeab4924}


reset the blocking

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.h@{blocking\_\-detection\_\-manager.h}!bd\_\-set\_\-current\_\-thresholds@{bd\_\-set\_\-current\_\-thresholds}}
\index{bd\_\-set\_\-current\_\-thresholds@{bd\_\-set\_\-current\_\-thresholds}!blocking_detection_manager.h@{blocking\_\-detection\_\-manager.h}}
\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_8h_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.h@{blocking\_\-detection\_\-manager.h}!bd\_\-set\_\-speed\_\-threshold@{bd\_\-set\_\-speed\_\-threshold}}
\index{bd\_\-set\_\-speed\_\-threshold@{bd\_\-set\_\-speed\_\-threshold}!blocking_detection_manager.h@{blocking\_\-detection\_\-manager.h}}
\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_8h_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.