INSAT Mini Project
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Fork of X_NUCLEO_6180XA1 by
Revision 38:18abb7f7dcb2, committed 2015-12-03
- Comitter:
- mapellil
- Date:
- Thu Dec 03 09:45:40 2015 +0000
- Parent:
- 37:837cffa6b530
- Child:
- 39:3cce4ba37695
- Commit message:
- Fixed compilation warnings
Changed in this revision
--- a/Components/Interfaces/LightSensor.h Fri Nov 27 08:47:30 2015 +0000 +++ b/Components/Interfaces/LightSensor.h Thu Dec 03 09:45:40 2015 +0000 @@ -41,7 +41,7 @@ #define __LIGHT_SENSOR_CLASS_H /* Includes ------------------------------------------------------------------*/ -#include <GenericSensor.h> +#include "GenericSensor.h" /* Classes ------------------------------------------------------------------*/ /** An abstract class for ambient light sensors
--- a/Components/Interfaces/RangeSensor.h Fri Nov 27 08:47:30 2015 +0000 +++ b/Components/Interfaces/RangeSensor.h Thu Dec 03 09:45:40 2015 +0000 @@ -41,7 +41,7 @@ #define __RANGE_SENSOR_CLASS_H /* Includes ------------------------------------------------------------------*/ -#include <GenericSensor.h> +#include "GenericSensor.h" /* Classes ------------------------------------------------------------------*/ /** An abstract class for range sensors
--- a/Components/VL6180X/vl6180x_class.cpp Fri Nov 27 08:47:30 2015 +0000 +++ b/Components/VL6180X/vl6180x_class.cpp Thu Dec 03 09:45:40 2015 +0000 @@ -158,8 +158,8 @@ #define AN_GAIN_MULT (1<<GAIN_FIX_PREC) -static int32_t _GetAveTotalTime(VL6180xDev_t dev); -static int VL6180x_RangeSetEarlyConvergenceEestimateThreshold(VL6180xDev_t dev); +//int32_t _GetAveTotalTime(VL6180xDev_t dev); +//int VL6180x_RangeSetEarlyConvergenceEestimateThreshold(VL6180xDev_t dev); /** * ScalerLookUP scaling factor-1 to register #RANGE_SCALER lookup @@ -253,18 +253,10 @@ }; #endif /* VL6180x_SINGLE_DEVICE_DRIVER */ - - #define Fix7_2_KCPs(x) ((((uint32_t)(x))*1000)>>7) - -#if VL6180x_WRAP_AROUND_FILTER_SUPPORT || VL6180x_HAVE_DMAX_RANGING -static int _GetRateResult(VL6180xDev_t dev, VL6180x_RangeData_t *pRangeData); -#endif - #if VL6180x_WRAP_AROUND_FILTER_SUPPORT static int _filter_Init(VL6180xDev_t dev); -static int _filter_GetResult(VL6180xDev_t dev, VL6180x_RangeData_t *pData); #define _IsWrapArroundActive(dev) VL6180xDevDataGet(dev,WrapAroundFilterActive) #else #define _IsWrapArroundActive(dev) 0 @@ -273,7 +265,7 @@ #if VL6180x_HAVE_DMAX_RANGING void _DMax_OneTimeInit(VL6180xDev_t dev); - static int _DMax_InitData(VL6180xDev_t dev); +// static int _DMax_InitData(VL6180xDev_t dev); static int _DMax_Compute(VL6180xDev_t dev, VL6180x_RangeData_t *pRange); #define _IsDMaxActive(dev) VL6180xDevDataGet(dev,DMaxEnable) #else @@ -282,8 +274,8 @@ #define _IsDMaxActive(...) 0 #endif -static int VL6180x_RangeStaticInit(VL6180xDev_t dev); -static int VL6180x_UpscaleStaticInit(VL6180xDev_t dev); +//static int VL6180x_RangeStaticInit(VL6180xDev_t dev); +//static int VL6180x_UpscaleStaticInit(VL6180xDev_t dev); int VL6180X::VL6180x_WaitDeviceBooted(VL6180xDev_t dev){ uint8_t FreshOutReset; @@ -1740,7 +1732,7 @@ /* * One time init */ -int _filter_Init( VL6180xDev_t dev) { +static int _filter_Init( VL6180xDev_t dev) { int i; _FilterData(MeasurementIndex) = 0;
--- a/Components/VL6180X/vl6180x_class.h Fri Nov 27 08:47:30 2015 +0000 +++ b/Components/VL6180X/vl6180x_class.h Thu Dec 03 09:45:40 2015 +0000 @@ -93,7 +93,7 @@ /* Classes -------------------------------------------------------------------*/ /** Class representing a VL6180X sensor component */ -class VL6180X : public RangeSensor, public LightSensor +class VL6180X : public RangeSensor, public LightSensor { public: /** Constructor 1 @@ -276,7 +276,7 @@ * @param void * @return 0 on success, @a #CALIBRATION_WARNING if failed */ - int Init() + virtual int Init() { return VL6180x_InitData(Device); } @@ -434,7 +434,7 @@ * @param pRange_mm Pointer to range distance * @return 0 on success */ - int GetRange(int32_t *piData) + virtual int GetRange(int32_t *piData) { return VL6180x_RangeGetResult(Device, piData); } @@ -1035,7 +1035,7 @@ * @param *piData The pointer to variable to write in the measure in Lux * @return 0 On success */ - int GetLight(uint32_t *piData) + virtual int GetLight(uint32_t *piData) { return VL6180x_AlsGetLux(Device, piData); } @@ -1132,7 +1132,7 @@ int _DMax_InitData(VL6180xDev_t dev); /* Read function of the ID device */ - int ReadID(); + virtual int ReadID(); /* Write and read functions from I2C */ int VL6180x_WrByte(VL6180xDev_t dev, uint16_t index, uint8_t data);