summaryrefslogtreecommitdiffstats
path: root/source/Concept/Framework/modules/input
diff options
context:
space:
mode:
authormasterm <devnull@localhost>2007-02-19 23:02:01 +0100
committermasterm <devnull@localhost>2007-02-19 23:02:01 +0100
commitec2a18e931cdaa6c62a8843c29dc93c4a823a2cd (patch)
treefc5d5c1891c076091dd4e3734b2675db0c757de3 /source/Concept/Framework/modules/input
parent42a38959ff5c097463c2c95d993e5934f100d223 (diff)
downloadrc2007-soccer-ec2a18e931cdaa6c62a8843c29dc93c4a823a2cd.tar
rc2007-soccer-ec2a18e931cdaa6c62a8843c29dc93c4a823a2cd.zip
+++ corrected svn cripplement
Diffstat (limited to 'source/Concept/Framework/modules/input')
-rwxr-xr-xsource/Concept/Framework/modules/input/distance_sensor.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/source/Concept/Framework/modules/input/distance_sensor.c b/source/Concept/Framework/modules/input/distance_sensor.c
index 508eeed..262d35f 100755
--- a/source/Concept/Framework/modules/input/distance_sensor.c
+++ b/source/Concept/Framework/modules/input/distance_sensor.c
@@ -12,12 +12,8 @@ float Distance_Sensor::GetDistance()
*hardwarePort &= ~pin;//Deactivate port
*hardwareDDR &= ~pin;//Set pin input
- //(parent->GetModule<Display>(IO_DISPLAY_MAIN))->Print("pre 1", 4, 1);
-
//Wait for response
- for(int i=0;(!(PINC & pin))&&(i < 1000);i++) {asm volatile("nop");}
-
- //(parent->GetModule<Display>(IO_DISPLAY_MAIN))->Print("pre 2", 4, 1);
+ for(uint16 i = 0; (!(*hardwarePin & pin)) && (i < 1000); i++) { asm volatile("nop"); }
//Calculate duration of response
while((*hardwarePin & pin)&&(result < 300000))
@@ -26,7 +22,5 @@ float Distance_Sensor::GetDistance()
asm volatile("nop");
}
- //(parent->GetModule<Display>(IO_DISPLAY_MAIN))->Print("pre 3", 4, 1);
-
return (float(result) * DISTANCE_PER_VALUE);
}