mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 01:41:12 +03:00
doc: Scrubbed ALL sensor library descriptions
In an effort to clean-up and standardize UPM library documentation, this commit updates (and in most cases, unifies) the CMake description string AND CXX header @comname string. Strings were taken from datasheets when possible, spelling mistakes were addressed, copy/paste errors where fixed, Title Case was used, etc. * Tested/updated/added @web tags * Added/updated invalid sensor images * Added/updated @man tags, added missing manufacturers Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
upm_mixed_module_init (NAME enc03r
|
||||
DESCRIPTION "Single-axis Analog Gyroscope"
|
||||
DESCRIPTION "Single-axis Analog Gyro Module"
|
||||
C_HDR enc03r.h
|
||||
C_SRC enc03r.c
|
||||
CPP_HDR enc03r.hpp
|
||||
|
@ -27,113 +27,112 @@
|
||||
#include "enc03r.h"
|
||||
|
||||
namespace upm {
|
||||
/**
|
||||
* @brief ENC03R Single Axis Gyro library
|
||||
* @defgroup enc03r libupm-enc03r
|
||||
* @ingroup seeed analog compass robok
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief ENC03R Single Axis Gyro library
|
||||
* @defgroup enc03r libupm-enc03r
|
||||
* @ingroup seeed analog compass robok
|
||||
*/
|
||||
|
||||
/**
|
||||
* @library enc03r
|
||||
* @sensor enc03r
|
||||
* @comname ENC03R Single Axis Gyro
|
||||
* @altname Grove Single Axis Analog Gyro
|
||||
* @type compass
|
||||
* @man seeed
|
||||
* @con analog
|
||||
* @kit robok
|
||||
*
|
||||
* @brief API for the ENC03R Single Axis Analog Gyro
|
||||
*
|
||||
* UPM module for the ENC03R single axis analog gyro.
|
||||
* This gyroscope measures x-axis angular velocity, that is
|
||||
* how fast the sensor is rotating around the x-axis.
|
||||
* Calibration of the sensor is necessary for accurate readings.
|
||||
*
|
||||
* @image html enc03r.jpg
|
||||
* @snippet enc03r.cxx Interesting
|
||||
*/
|
||||
class ENC03R {
|
||||
/**
|
||||
* @library enc03r
|
||||
* @sensor enc03r
|
||||
* @comname Single-axis Analog Gyro Module
|
||||
* @altname Grove Single Axis Analog Gyro
|
||||
* @type compass
|
||||
* @man seeed
|
||||
* @con analog
|
||||
* @kit robok
|
||||
* @web http://www.murata.com/en-us/products/productdetail?partno=ENC-03RC-R
|
||||
*
|
||||
* @brief API for the ENC03R Single Axis Analog Gyro
|
||||
*
|
||||
* UPM module for the ENC03R single axis analog gyro.
|
||||
* This gyroscope measures x-axis angular velocity, that is
|
||||
* how fast the sensor is rotating around the x-axis.
|
||||
* Calibration of the sensor is necessary for accurate readings.
|
||||
*
|
||||
* @image html enc03r.jpg
|
||||
* @snippet enc03r.cxx Interesting
|
||||
*/
|
||||
class ENC03R {
|
||||
public:
|
||||
|
||||
/**
|
||||
* ENC03R sensor constructor
|
||||
*
|
||||
* @param pin Analog pin to use
|
||||
* @param vref Reference voltage to use; default is 5.0 V
|
||||
*/
|
||||
* ENC03R sensor constructor
|
||||
*
|
||||
* @param pin Analog pin to use
|
||||
* @param vref Reference voltage to use; default is 5.0 V
|
||||
*/
|
||||
ENC03R(int pin, float aref=5.0);
|
||||
|
||||
/**
|
||||
* ENC03R destructor
|
||||
*/
|
||||
* ENC03R destructor
|
||||
*/
|
||||
~ENC03R();
|
||||
|
||||
/**
|
||||
* Calibrates the sensor by determining an analog reading over many
|
||||
* samples with no movement of the sensor. This must be done
|
||||
* before attempting to use the sensor.
|
||||
*
|
||||
* @param samples Number of samples to use for calibration
|
||||
*/
|
||||
* Calibrates the sensor by determining an analog reading over many
|
||||
* samples with no movement of the sensor. This must be done
|
||||
* before attempting to use the sensor.
|
||||
*
|
||||
* @param samples Number of samples to use for calibration
|
||||
*/
|
||||
void calibrate(unsigned int samples);
|
||||
|
||||
/**
|
||||
* Update the internal state with the current reading. This
|
||||
* function must be called prior to calling
|
||||
* angularVelocity().
|
||||
*
|
||||
* @param dev Device context
|
||||
*/
|
||||
* Update the internal state with the current reading. This
|
||||
* function must be called prior to calling
|
||||
* angularVelocity().
|
||||
*
|
||||
* @param dev Device context
|
||||
*/
|
||||
void update();
|
||||
|
||||
/**
|
||||
* Returns the currently stored calibration value
|
||||
*
|
||||
* @return Current calibration value
|
||||
*/
|
||||
* Returns the currently stored calibration value
|
||||
*
|
||||
* @return Current calibration value
|
||||
*/
|
||||
float calibrationValue() { return enc03r_calibration_value(m_enc03r); };
|
||||
|
||||
/**
|
||||
* Computes angular velocity based on the value and stored calibration
|
||||
* reference.
|
||||
*
|
||||
* @param val Value to use to compute angular velocity
|
||||
* @return Computed angular velocity
|
||||
*/
|
||||
* Computes angular velocity based on the value and stored calibration
|
||||
* reference.
|
||||
*
|
||||
* @param val Value to use to compute angular velocity
|
||||
* @return Computed angular velocity
|
||||
*/
|
||||
float angularVelocity();
|
||||
|
||||
/**
|
||||
* Set sensor offset. The offste is applied to the return value
|
||||
* before scaling. Default is 0.
|
||||
*
|
||||
* @param scale Scale to apply to value
|
||||
*/
|
||||
* Set sensor offset. The offste is applied to the return value
|
||||
* before scaling. Default is 0.
|
||||
*
|
||||
* @param scale Scale to apply to value
|
||||
*/
|
||||
void setOffset(float offset);
|
||||
|
||||
/**
|
||||
* Set sensor scale. The return value is scaled by this value
|
||||
* before the offset is applied. Default is 1.0.
|
||||
*
|
||||
* @param dev Device context
|
||||
* @param scale Offset to apply to value
|
||||
*/
|
||||
* Set sensor scale. The return value is scaled by this value
|
||||
* before the offset is applied. Default is 1.0.
|
||||
*
|
||||
* @param dev Device context
|
||||
* @param scale Offset to apply to value
|
||||
*/
|
||||
void setScale(float scale);
|
||||
|
||||
/**
|
||||
* Get a normalized ADC value from the sensor. The return
|
||||
* value will be between 0.0 (indicating no voltage) and 1.0
|
||||
* indicating max voltage (aref). update() must be called
|
||||
* prior to calling this function.
|
||||
*
|
||||
* @return The normalized reading from the ADC.
|
||||
*/
|
||||
* Get a normalized ADC value from the sensor. The return
|
||||
* value will be between 0.0 (indicating no voltage) and 1.0
|
||||
* indicating max voltage (aref). update() must be called
|
||||
* prior to calling this function.
|
||||
*
|
||||
* @return The normalized reading from the ADC.
|
||||
*/
|
||||
float getNormalized();
|
||||
|
||||
protected:
|
||||
enc03r_context m_enc03r;
|
||||
|
||||
private:
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user