Small adjustment of ABS
This commit is contained in:
		
							parent
							
								
									9bf66a4bf7
								
							
						
					
					
						commit
						05d2e90880
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -176,9 +176,9 @@ if __name__=="__main__": | |||
|         print ("Measured Distance = %.1f cm" % dist) | ||||
|          | ||||
|         # Turn on motor if get sensor signal | ||||
|         if (motorSignal=="on" and car.motorStop): | ||||
|         if ((motorSignal=="on" or dist>15) and car.motorStop): | ||||
|             car.start_motor() | ||||
|         elif ((motorSignal=="off" or dist<=5) and not car.motorStop): | ||||
|         elif ((motorSignal=="off" or dist<=10) and not car.motorStop): | ||||
|             # Stop the motor if the vehicle is too close to the item at front as well | ||||
|             car.stop_motor() | ||||
|              | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue