upm
1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
|
Here's a list of other API changes made to the library that break source/binary compatibility between releases:
The lsm303 driver has been renamed There are a variety of LSM303 devices out there with various incompatibilities and differing capabilities. The current lsm303 driver in UPM only supports the LSM303DLH variant, so it has been renamed to lsm303dlh to avoid confusion and to make it clear which variant is actually supported.
All examples and source files have been renamed, including header files. In addition, the class name, LSM303, has been renamed to LSM303DLH. No other functionality or behavior has been changed.
Note for all drivers ported to C As a general note concerning all of the drivers that have been ported to C: external constants have likely been renamed. Previously in C++, most of these constants were defined as enums in the upm::classname namespace.
For drivers written in C, all of these constants are no longer in a class (or UPM) namespace, and instead have the driver name prefixed to the original value.
The driver name is prefixed to these constants to avoid name collisions when using multiple drivers in a given application, and to make it clear which constants belong to which driver.
For drivers that used *#define* for constants, only the prefix has been added if not already present. In some cases, names that were not very descriptive were changed, for example ADDR renamed to BMPX8X_DEFAULT_I2C_ADDR.
So for example, a constant that might once have been referred to in a C++ example as upm::MMA7660::AUTOSLEEP_64, would now be referenced as MMA7660_AUTOSLEEP_64.
This holds true for most, if not all drivers that have been ported to C. Not all of these changes are listed in this file due to the sheer number of them.
If you run into problems with constants that were working previously, and now cannot be found, this is likely the reason. Check the driver documentation and the source code to see what the new name is.
In C, constants are now usually implemented in a separate header file named drivername_defs.h or drivername_regs.h, for easier integration into the SWIG languages, and shared use between C++ and C implementations.
bmpx8x This driver has been rewritten from scratch in C, with a C++ wrapper.
All exported symbols have been renamed for consistency and to avoid symbol collisions by having a BMPX8X_ prefix. As an example, ADDR has been renamed to BMPX8X_DEFAULT_I2C_ADDR. Most C ported drivers follow this rule.
The getPressureRaw() and getTemperatureRaw() functions have been removed. This functionality was only needed internally to the driver.
The constructor no longer accepts a mode argument. Only the I2C bus and I2C address are accepted. By default, the device will be configured for it's maximum resolution BMPX8X_OSS_ULTRAHIGHRES, the previous default. You can use the new method setOversampling() to change the mode to something else if desired.
The methods related to calibration, like computeB5() are no longer exposed.
New methods, init() and reset() have been added. reset() resets the device to a freshly powered up state. init() can be used to re-initialize the device after a reset (reload calibration data) and set a default oversampling mode.
A new method, update() has been added. This method will update all internal state from the device, and must be called before querying the pressure, temperature, sea level and altitude values.
The getSeaLevelPressure() method has been split into two overloaded methods. One which requires an argument in meters (previously, a default was provided), and another which does not accept arguments at all and computes the sea level pressure based on current altitude.
The i2cReadReg_16(), i2CWriteReg() and i2cReadReg_8() have been replaced with readReg(), readRegs(), and writeReg(), in line with other I2C/SPI drivers of this type. They are marked protected (in C++) now as well. Please see the updated documentation and examples for this driver.
mma7660 This driver has been rewritten in C. Some exported symbols have been changed, for example, MMA7660_I2C_BUS was renamed to MMA7660_DEFAULT_I2C_BUS.
See updated documentation and examples for other changes.
bmx055, bmi055, bmc150, bma250e, bmg160, bmm150 This driver has been split up. The bma250e, bmg160, bmm150 drivers have been rewritten in C (with C++ wrappers) and now reside in their own libraries. The versions of these drivers that used to be present in bmx055 have been removed, and bmx055 now uses the new libraries for it's functionality. The other two composite devices, bmi055, and bmc150 are still contained within the bmx055 library, and also use the new libraries for their functionality.
In addition, for all of these drivers some private methods are no longer exposed (such as the compensation routines).
The C++ driver methods that once returned pointers to a floating point array now return std::vectors of the appropriate type. The SWIG language examples for these drivers have been modified to use these methods instead of the C pointer based SWIG methods previously used.
lcm1602/jhd1313m1 These drivers had been rewritten in C, with C++ wrappers and placed into their own libraries in the previous version of UPM, however, the original C++ implementation was kept in the lcd library for compatibility reasons with existing code. To avoid collisions with the header files, the new lcm1602 and jhd1313m1 drivers had their C++ headers renamed to use a **.hxx** suffix.
In this version of UPM, the lcm1602 and jhd1313m1 drivers have been removed from the lcd library. In addition, the header files for the new implementation have been renamed from their **.hxx** suffix to the normal **.hpp** suffix.
A change was also made to the new lcm1602 and jhd1313m1 C++ drivers. The createChar() function now accepts a byte vector std::vector<uint8_t> rather than the *char ** pointer that was used previously. This should make it easier to use with the SWIG language bindings (Python, JavaScript, and especially Java).
#include
directives in existing code.draw()
function was removed in favor of a more complete GFX library implementation.