summaryrefslogtreecommitdiffstats
path: root/avr.cpp
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2007-04-13 19:58:03 +0200
committerneoraider <devnull@localhost>2007-04-13 19:58:03 +0200
commit7da669b97ec71f138c74d562b8a3b219d3f98a50 (patch)
tree089226274f422ae1b486cf44d36751de47bca01c /avr.cpp
parente26a1dc73313098cef235918d237f9b1a6e4cb5f (diff)
downloadrc2007-rescue-7da669b97ec71f138c74d562b8a3b219d3f98a50.tar
rc2007-rescue-7da669b97ec71f138c74d562b8a3b219d3f98a50.zip
Makefile angelegt; Grundfunktionen erweitert
Diffstat (limited to 'avr.cpp')
-rw-r--r--avr.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/avr.cpp b/avr.cpp
index a5194a4..bd3e22c 100644
--- a/avr.cpp
+++ b/avr.cpp
@@ -2,19 +2,6 @@
#include "adc.h"
#include "util.h"
-void setMotorSpeed(MOTOR *motor, int speed) {
- if(speed > 0) {
- *motor->port &= ~motor->revMask;
- *motor->port |= motor->fwdMask;
- }
- else if(speed < 0) {
- *motor->port &= ~motor->fwdMask;
- *motor->port |= motor->revMask;
- }
- else *motor->port |= motor->fwdMask|motor->revMask;
-
- *motor->pwmPort = CLAMP(0, ABS(speed), 255);
-}
int getButton() {
uint16_t val = getADCValue(7);