git.droids-corp.org
/
aversive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
work on trajectory, update cobboard and ballboard too
[aversive.git]
/
modules
/
devices
/
control_system
/
filters
/
quadramp
/
quadramp.h
diff --git
a/modules/devices/control_system/filters/quadramp/quadramp.h
b/modules/devices/control_system/filters/quadramp/quadramp.h
index
69b95b3
..
7073df0
100644
(file)
--- a/
modules/devices/control_system/filters/quadramp/quadramp.h
+++ b/
modules/devices/control_system/filters/quadramp/quadramp.h
@@
-1,6
+1,6
@@
-/*
+/*
* Copyright Droids Corporation, Microb Technology, Eirbot (2005)
* Copyright Droids Corporation, Microb Technology, Eirbot (2005)
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@
-26,28
+26,28
@@
struct quadramp_filter
{
struct quadramp_filter
{
-
uint32_t
var_2nd_ord_pos;
-
uint32_t
var_2nd_ord_neg;
-
uint32_t
var_1st_ord_pos;
-
uint32_t
var_1st_ord_neg;
+
double
var_2nd_ord_pos;
+
double
var_2nd_ord_neg;
+
double
var_1st_ord_pos;
+
double
var_1st_ord_neg;
-
int32_t
previous_var;
- int32_t previous_out;
- int32_t previous_in;
+
double
previous_var;
+
int32_t previous_out;
+
int32_t previous_in;
};
/** Initialization of the filter */
void quadramp_init(struct quadramp_filter *q);
};
/** Initialization of the filter */
void quadramp_init(struct quadramp_filter *q);
-void quadramp_reset(struct quadramp_filter *
q);
+void quadramp_reset(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_2nd_order_vars(struct quadramp_filter *q,
+ double var_2nd_ord_pos,
+
double
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);
+void quadramp_set_1st_order_vars(struct quadramp_filter *q,
+ double var_1st_ord_pos,
+
double
var_1st_ord_neg);
/**
* Return 1 when (filter_input == filter_output && 1st_ord variation
/**
* Return 1 when (filter_input == filter_output && 1st_ord variation
@@
-57,10
+57,10
@@
uint8_t quadramp_is_finished(struct quadramp_filter *q);
/**
* Process the ramp
/**
* Process the ramp
- *
+ *
* \param data should be a (struct quadramp_filter *) pointer
* \param in is the input of the filter
*/
* \param data should be a (struct quadramp_filter *) pointer
* \param in is the input of the filter
*/
-int32_t quadramp_do_filter(void *
data, int32_t in);
+int32_t quadramp_do_filter(void *data, int32_t in);
#endif
#endif