aboutsummaryrefslogtreecommitdiff
path: root/AT91SAM7S256/Source/d_output.h
diff options
context:
space:
mode:
authorNicolas Schodet2011-01-29 14:17:20 +0100
committerNicolas Schodet2011-02-09 00:56:50 +0100
commita4a22ea2a425854db01f5fc227ae223e54f75d32 (patch)
treee16ec367d876416fd10a30e1e3c815dc26119e16 /AT91SAM7S256/Source/d_output.h
parent8a96ebc7aed6c6af5ced04d13821d1eccc87acc8 (diff)
add speed and acceleration limit to absolute position regulation
When the set position is changed, absolute position regulation will run the motor as fast as possible to reach the requested position. This is not always the needed behaviour. This commit add speed and acceleration filtering to the position change.
Diffstat (limited to 'AT91SAM7S256/Source/d_output.h')
-rw-r--r--AT91SAM7S256/Source/d_output.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/AT91SAM7S256/Source/d_output.h b/AT91SAM7S256/Source/d_output.h
index 41b1cfc..ffad27b 100644
--- a/AT91SAM7S256/Source/d_output.h
+++ b/AT91SAM7S256/Source/d_output.h
@@ -39,6 +39,9 @@
#endif
+#define DEFAULT_MAX_SPEED 80
+#define DEFAULT_MAX_ACCELERATION 20
+
#define REGULATION_TIME 100 // Measured in 1 mS, regulation interval
//Constant reffering to RegMode parameter