summaryrefslogtreecommitdiffhomepage
path: root/digital/asserv/src
diff options
context:
space:
mode:
authorNicolas Schodet2008-04-14 00:55:57 +0200
committerNicolas Schodet2008-04-14 00:55:57 +0200
commit9ee250e40709565b5d18656f146880574c71e4cf (patch)
tree8d068434220d26444869ea938ae9c725dc3a6df1 /digital/asserv/src
parent8e79e204e963eb10df09c58044df23f33612fe33 (diff)
* digital/asserv/src/asserv:
- when the maximum PWM value is sent over SPI to motor-power-avr, it is shifted, left, then right... This introduces a bug when the value is negative as it is truncated to the value below which can not be represented as a positive integer.
Diffstat (limited to 'digital/asserv/src')
-rw-r--r--digital/asserv/src/asserv/pwm.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/digital/asserv/src/asserv/pwm.h b/digital/asserv/src/asserv/pwm.h
index 3d738538..d980a6a6 100644
--- a/digital/asserv/src/asserv/pwm.h
+++ b/digital/asserv/src/asserv/pwm.h
@@ -25,8 +25,10 @@
*
* }}} */
-/** Define the absolute maximum PWM value. */
-#define PWM_MAX 0x3ff
+/** Define the absolute maximum PWM value.
+ * This value is lowered until the bug relatives to maximum value is fixed
+ * (rounding after shifting bug). */
+#define PWM_MAX 0x3f0
extern int16_t pwm_left, pwm_right, pwm_aux0;
extern uint8_t pwm_reverse;