IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

Detailed Description

The qoutputrange class holds the specifics of an output range.

This struct was introduced in Qt 5.1.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

  • Header: qoutputrange

  • Since: Qt 5.1

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Sensors)

    target_link_libraries(mytarget PRIVATE Qt6::Sensors)

  • qmake: QT += sensors

Detailed Description

The class is defined as a simple struct.

 
Sélectionnez
struct qoutputrange
{
    qreal maximum;
    qreal minimum;
    qreal accuracy;
};

Each output range specifies a minimum and maximum value as well as an accuracy value. The accuracy value represents the resolution of the sensor. It is the smallest change the sensor can detect and is expressed using the same units as the minimum and maximum.

Sensors must often trade off range for accuracy. To allow the user to determine which of these are more important the sensor may offer several output ranges. One output range may have reduced minimum and maximum values and increased sensitivity. Another output range may have higher minimum and maximum values with reduced sensitivity. Note that higher sensitivities will be represented by smaller accuracy values.

An example of this tradeoff can be seen by examining the LIS302DL accelerometer. It has only 256 possible values to report with. These values are scaled so that they can represent either -2G to +2G (with an accuracy value of 0.015G) or -8G to +8G (with an accuracy value of 0.06G).

See Also

Member Variable Documentation

 

qreal qoutputrange::accuracy

The accuracy value represents the resolution of the sensor. It is the smallest change the sensor can detect and is expressed using the same units as the minimum and maximum.

qreal qoutputrange::maximum

This is the maximum value for this output range. The units are defined by the sensor.

qreal qoutputrange::minimum

This is the minimum value for this output range. The units are defined by the sensor.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+