Skip to content
Snippets Groups Projects
Commit 988378fa authored by fortissBot's avatar fortissBot
Browse files

adjust formula to compute speed Value for motor (transform value from mm/s to...

adjust formula to compute speed Value for motor (transform value from mm/s to the input value for the Motor Driver)
refs 7860
parent d2c94921
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,10 @@
#include "inc/libmaestro.h"
// macros
#define PWM_ADJUST_VALUE(x) (6000 + 4 * x / 66)
// 6072 is the value for 0, max. value to motor is currently 7572
// from AF3 you get a max. speed value in mm/s : 1471
// Hence, add the constant 6072 and map values -1471-1471 to -1500-1500
#define PWM_ADJUST_VALUE(x) (6072 + 1500 * x /1471)
// types
typedef unsigned char PWM_CHANNEL_T;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment