aversive_10-03-12/modules/devices/robot/blocking_detection_manager/blocking_detection_manager.c File Reference

#include <stdio.h>
#include <string.h>
#include <aversive/error.h>
#include <blocking_detection_manager.h>

Go to the source code of this file.

Functions

void bd_init (struct blocking_detection *bd)
void bd_set_current_thresholds (struct blocking_detection *bd, int32_t k1, int32_t k2, uint32_t i_thres, uint16_t cpt_thres)
void bd_set_speed_threshold (struct blocking_detection *bd, uint16_t speed)
void bd_reset (struct blocking_detection *bd)
void bd_manage_from_speed_cmd (struct blocking_detection *bd, int32_t speed, int32_t cmd)


Function Documentation

void bd_init ( struct blocking_detection bd  ) 

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.

void bd_manage_from_speed_cmd ( struct blocking_detection bd,
int32_t  speed,
int32_t  cmd 
)

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.

void bd_reset ( struct blocking_detection bd  ) 

reset current blocking

Definition at line 66 of file blocking_detection_manager.c.

References blocking_detection::cpt, IRQ_LOCK, and IRQ_UNLOCK.

void bd_set_current_thresholds ( struct blocking_detection bd,
int32_t  k1,
int32_t  k2,
uint32_t  i_thres,
uint16_t  cpt_thres 
)

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.

void bd_set_speed_threshold ( struct blocking_detection bd,
uint16_t  speed 
)

speed threshold: if speed is above it, disable blocking_detection.

Definition at line 56 of file blocking_detection_manager.c.

References IRQ_LOCK, IRQ_UNLOCK, and blocking_detection::speed_thres.


Generated on Fri Mar 12 06:32:06 2010 for AVR by  doxygen 1.5.6