sx1276 and adxrs610: C++11 incompatibility fixes

Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com>

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Eugene Bolshakov 2015-12-29 16:55:40 +03:00 committed by Mihai Tudor Panu
parent fad4f72357
commit ec75790516
2 changed files with 16 additions and 14 deletions

View File

@ -27,6 +27,15 @@
#include <string>
#include <mraa/aio.hpp>
// volts per degree / second (typ)
#define m_degreeCoeff 0.006
// volts per degree C (typ)
#define m_temperatureCoeff 0.009
// nominal temperature at m_centerVolts
#define m_temperatureNom 25.0
namespace upm {
/**
* @brief DFRobot ADXRS610 Gyro Beakout board
@ -159,14 +168,6 @@ namespace upm {
// aref / 2
float m_centerVolts;
// volts per degree / second (typ)
static const float m_degreeCoeff = 0.006;
// volts per degree C (typ)
static const float m_temperatureCoeff = 0.009;
// nominal temperature at m_centerVolts
static const float m_temperatureNom = 25.0;
};
}

View File

@ -42,6 +42,13 @@
#include <mraa/spi.hpp>
#include <mraa/gpio.hpp>
// Our crystal oscillator frequency (32Mhz)
#define FXOSC_FREQ 32000000.0
// Our freq stepping resolution (in Hz) if FXOSC_FREQ is 32Mhz
// (FXOSC_FREQ / 2^19) =
#define FXOSC_STEP 61.03515625
namespace upm {
/**
@ -86,12 +93,6 @@ namespace upm {
// The default chip revision
static const uint8_t chipRevision = 0x12;
// Our crystal oscillator frequency (32Mhz)
static const double FXOSC_FREQ = 32000000.0;
// Our freq stepping resolution (in Hz) if FXOSC_FREQ is 32Mhz
// (FXOSC_FREQ / 2^19) =
static const double FXOSC_STEP = 61.03515625;
// total FIFO size
static const int FIFO_SIZE = 256;