AP_ADC: fix compile warnings re float constants

This commit is contained in:
Tom Pittenger 2015-04-24 12:24:41 +09:00 committed by Randy Mackay
parent 7132b39dcf
commit f4bfc12316
2 changed files with 9 additions and 9 deletions

View File

@ -37,14 +37,14 @@
#define ADS1115_PGA_0P256B 0x06 << ADS1115_PGA_SHIFT
#define ADS1115_PGA_0P256C 0x07 << ADS1115_PGA_SHIFT
#define ADS1115_MV_6P144 0.187500
#define ADS1115_MV_4P096 0.125000
#define ADS1115_MV_2P048 0.062500 // default
#define ADS1115_MV_1P024 0.031250
#define ADS1115_MV_0P512 0.015625
#define ADS1115_MV_0P256 0.007813
#define ADS1115_MV_0P256B 0.007813
#define ADS1115_MV_0P256C 0.007813
#define ADS1115_MV_6P144 0.187500f
#define ADS1115_MV_4P096 0.125000f
#define ADS1115_MV_2P048 0.062500f // default
#define ADS1115_MV_1P024 0.031250f
#define ADS1115_MV_0P512 0.015625f
#define ADS1115_MV_0P256 0.007813f
#define ADS1115_MV_0P256B 0.007813f
#define ADS1115_MV_0P256C 0.007813f
#define ADS1115_MODE_SHIFT 8
#define ADS1115_MODE_CONTINUOUS 0x00 << ADS1115_MODE_SHIFT

View File

@ -27,7 +27,7 @@ const int8_t AP_ADC_HIL::sensorSign[6] = { 1, -1, -1,-1, 1, 1};
const float AP_ADC_HIL::gyroBias[3] = {1665,1665,1665};
const float AP_ADC_HIL::accelBias[3] = {2025,2025,2025};
// gyroScale = 1/[GyroGain*pi/180] GyroGains (0.4,0.41,0.41)
const float AP_ADC_HIL::gyroScale[3] = {143.239, 139.746, 139.746};
const float AP_ADC_HIL::gyroScale[3] = {143.239f, 139.746f, 139.746f};
const float AP_ADC_HIL::accelScale[3] = {418,418,418}; // adcPerG
AP_ADC_HIL::AP_ADC_HIL()