qoutputrange Struct
qoutputrange 类包含输出范围的具体信息。更多内容...
| 头文件: | #include <qsensor.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Sensors) target_link_libraries(mytarget PRIVATE Qt6::Sensors) |
| qmake: | QT += sensors |
公共变量
详细说明
该类被定义为一个简单的结构体。
每个输出范围都指定了最小值、最大值以及精度值。精度值代表传感器的分辨率,即传感器能够检测到的最小变化量,其单位与最小值和最大值相同。
传感器通常必须在量程和精度之间进行权衡。为了让用户能够确定哪一项更为重要,传感器可能会提供多个输出量程。一个输出量程可能具有较小的最小值和最大值,但灵敏度较高;另一个输出量程可能具有较大的最小值和最大值,但灵敏度较低。请注意,较高的灵敏度将表现为较小的精度值。
通过考察 LIS302DL 加速度计,可以了解这种权衡关系。该加速度计仅有 256 个可报告的数值。 这些数值经过缩放处理,可分别表示 -2G 至 +2G(精度值为 0.015G)或 -8G 至 +8G(精度值为 0.06G)。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.