summaryrefslogtreecommitdiffstats
path: root/source/Concept/Framework/modules/output
diff options
context:
space:
mode:
authorsicarius <devnull@localhost>2007-02-19 21:57:03 +0100
committersicarius <devnull@localhost>2007-02-19 21:57:03 +0100
commit42a38959ff5c097463c2c95d993e5934f100d223 (patch)
tree7ad00518e3fdd85a800f5c8bf48588e7f5e1a23a /source/Concept/Framework/modules/output
parentb3196682b1d87c40156ed1b4092a7112dd0d80df (diff)
downloadrc2007-soccer-42a38959ff5c097463c2c95d993e5934f100d223.tar
rc2007-soccer-42a38959ff5c097463c2c95d993e5934f100d223.zip
Code-stuff
Diffstat (limited to 'source/Concept/Framework/modules/output')
-rwxr-xr-xsource/Concept/Framework/modules/output/display.h5
-rwxr-xr-xsource/Concept/Framework/modules/output/engine.h11
2 files changed, 11 insertions, 5 deletions
diff --git a/source/Concept/Framework/modules/output/display.h b/source/Concept/Framework/modules/output/display.h
index e221120..bbfa292 100755
--- a/source/Concept/Framework/modules/output/display.h
+++ b/source/Concept/Framework/modules/output/display.h
@@ -39,7 +39,7 @@ public:
this->settingIllumination = 76;
this->settingCursorPosition = 79;
msleep(100);
- uart1_init(103);//9600 BAUD at 16MHz Atmel
+ uart1_init(51);//19200 BAUD at 16MHz Atmel
msleep(100);
break;
default:
@@ -52,6 +52,8 @@ public:
this->settingCursorPosition = 0;
break;
}
+
+ Clear();
}
protected:
@@ -137,6 +139,7 @@ public:
void NewLine()
{
SendCommand(commandNewLine);
+ ReturnCursor();
}
bool GetCursorVisible()
diff --git a/source/Concept/Framework/modules/output/engine.h b/source/Concept/Framework/modules/output/engine.h
index 27b9905..7b7a044 100755
--- a/source/Concept/Framework/modules/output/engine.h
+++ b/source/Concept/Framework/modules/output/engine.h
@@ -58,7 +58,7 @@ public:
protected:
bool enabled;
- float curSpeed;
+ int curSpeed;
//Hardware
volatile uint8* hardwarePort;
@@ -94,16 +94,19 @@ protected:
}
public:
- float GetSpeed()
+ int GetSpeed()
{
return curSpeed;
}
- void SetSpeed(float newSpeed)
+ void SetSpeed(int newSpeed)
{
curSpeed = newSpeed;
- *pwmSpeed = (abs((int16)(newSpeed / SPEED_PER_PWM)));
+ int pwm = abs(newSpeed);
+ if(pwm > 255) pwm = 255;
+
+ *pwmSpeed = pwm;
UpdateDirection();
}