+++ corrected svn cripplement

This commit is contained in:
masterm 2007-02-19 22:02:01 +00:00
parent 42a38959ff
commit ec2a18e931
8 changed files with 40 additions and 405 deletions

View file

@ -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);
}