aversive_10-03-12/modules/devices/control_system/filters/quadramp/quadramp.c File Reference

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <aversive.h>
#include <quadramp.h>

Go to the source code of this file.

Defines

#define NEXT(n, i)   (((n) + (i)/(n)) >> 1)

Functions

void quadramp_init (struct quadramp_filter *q)
void quadramp_set_2nd_order_vars (struct quadramp_filter *q, uint32_t var_2nd_ord_pos, uint32_t var_2nd_ord_neg)
void quadramp_set_1st_order_vars (struct quadramp_filter *q, uint32_t var_1st_ord_pos, uint32_t var_1st_ord_neg)
uint8_t quadramp_is_finished (struct quadramp_filter *q)
int32_t quadramp_do_filter (void *data, int32_t in)


Define Documentation

#define NEXT ( n,
i   )     (((n) + (i)/(n)) >> 1)

Definition at line 29 of file quadramp.c.


Function Documentation

int32_t quadramp_do_filter ( void *  data,
int32_t  in 
)

void quadramp_init ( struct quadramp_filter q  ) 

Initialization of the filter

Definition at line 31 of file quadramp.c.

References IRQ_LOCK, and IRQ_UNLOCK.

uint8_t quadramp_is_finished ( struct quadramp_filter q  ) 

Return 1 when (filter_input == filter_output && 1st_ord variation is 0 --speed is 0-- ).

Definition at line 62 of file quadramp.c.

References quadramp_filter::previous_in, quadramp_filter::previous_out, and quadramp_filter::previous_var.

void quadramp_set_1st_order_vars ( struct quadramp_filter q,
uint32_t  var_1st_ord_pos,
uint32_t  var_1st_ord_neg 
)

void quadramp_set_2nd_order_vars ( struct quadramp_filter q,
uint32_t  var_2nd_ord_pos,
uint32_t  var_2nd_ord_neg 
)


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