mirror of
				https://github.com/eclipse/upm.git
				synced 2025-10-30 22:54:44 +03:00 
			
		
		
		
	Added initial interfaces and some sensors implementing them
This commit is contained in:
		 Mihai Stefanescu
					Mihai Stefanescu
				
			
				
					committed by
					
						 Serban Waltter
						Serban Waltter
					
				
			
			
				
	
			
			
			 Serban Waltter
						Serban Waltter
					
				
			
						parent
						
							85608a9f61
						
					
				
				
					commit
					e7820f2831
				
			| @@ -28,6 +28,8 @@ | ||||
|  | ||||
| #include <stdlib.h> | ||||
| #include <unistd.h> | ||||
| #include <interfaces/iHumidity.hpp> | ||||
| #include <interfaces/iTemperature.hpp> | ||||
|  | ||||
| #include "sht1x.h" | ||||
|  | ||||
| @@ -58,7 +60,7 @@ namespace upm { | ||||
|    * @snippet sht1x.cxx Interesting | ||||
|    */ | ||||
|  | ||||
|   class SHT1X { | ||||
|   class SHT1X : virtual public iHumidity, virtual public iTemperature { | ||||
|   public: | ||||
|  | ||||
|     /** | ||||
| @@ -91,7 +93,7 @@ namespace upm { | ||||
|      * | ||||
|      * @return The temperature in Celsius | ||||
|      */ | ||||
|     float getTemperature(); | ||||
|     virtual float getTemperature(); | ||||
|  | ||||
|     /** | ||||
|      * Query the relative humidity.  update() must have been called | ||||
| @@ -99,7 +101,7 @@ namespace upm { | ||||
|      * | ||||
|      * @return The relative humidity. | ||||
|      */ | ||||
|     float getHumidity(); | ||||
|     virtual float getHumidity(); | ||||
|  | ||||
|     /** | ||||
|      * Read the status register. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user