mirror of
				https://github.com/eclipse/upm.git
				synced 2025-10-31 15:15:07 +03:00 
			
		
		
		
	Modified all iDistance sensors to return float.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
		 Serban Waltter
					Serban Waltter
				
			
				
					committed by
					
						 Mihai Tudor Panu
						Mihai Tudor Panu
					
				
			
			
				
	
			
			
			 Mihai Tudor Panu
						Mihai Tudor Panu
					
				
			
						parent
						
							ddcc4f467e
						
					
				
				
					commit
					864e1eb073
				
			| @@ -55,7 +55,7 @@ UltraSonic::~UltraSonic () { | ||||
|     mraa_gpio_close (m_pinCtx); | ||||
| } | ||||
|  | ||||
| int | ||||
| float | ||||
| UltraSonic::getDistance () { | ||||
|  | ||||
|     // output trigger signal | ||||
|   | ||||
| @@ -80,7 +80,7 @@ class UltraSonic { | ||||
|          * Divide by 58 to convert distance to centimetres.  | ||||
|          * Divide by 148 to convert distance to inches. | ||||
|          */ | ||||
|         int getDistance (); | ||||
|         float getDistance (); | ||||
|  | ||||
|         /** | ||||
|          * Return name of the component | ||||
| @@ -93,7 +93,7 @@ class UltraSonic { | ||||
|         /** | ||||
|          * Returns true while the sensor is busy waiting for the echo pulse | ||||
|          */ | ||||
|         bool working() | ||||
|         float working() | ||||
|         { | ||||
|             return m_doWork; | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user