qoutputrange Struct
qoutputrange 类保存输出范围的具体信息。更多
头文件: | #include <qoutputrange> |
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)。
© 2025 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.