summaryrefslogtreecommitdiff
path: root/n/asserv/src/pwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'n/asserv/src/pwm.c')
-rw-r--r--n/asserv/src/pwm.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/n/asserv/src/pwm.c b/n/asserv/src/pwm.c
index 093e064..4ab8722 100644
--- a/n/asserv/src/pwm.c
+++ b/n/asserv/src/pwm.c
@@ -73,36 +73,18 @@ pwm_init (void)
static inline uint8_t
pwm_preproc (uint16_t v)
{
- // This is a try to correct the optocoupler problem...
- //v += 0x10;
if (v > 255)
return 255;
else
return v;
}
-extern int8_t speed_left, speed_right;
-
-/** Filter PWM values. */
-static inline void
-pwm_filter (void)
-{
- /* This is a try to correct vibration problem. */
- if ((speed_left > 0 && pwm_left < 0)
- || (speed_left < 0 && pwm_left > 0))
- pwm_left = 0;
- if ((speed_right > 0 && pwm_right < 0)
- || (speed_right < 0 && pwm_right > 0))
- pwm_right = 0;
-}
-
/** Update the hardware PWM values. */
static inline void
pwm_update (void)
{
uint16_t left, right;
uint8_t dir;
- pwm_filter ();
dir = PORTB & ~(_BV (PWM_LEFT_DIR) | _BV (PWM_RIGHT_DIR));
/* Set left PWM. */
if (pwm_left == 0)