This function performs a capacitive measurement on all enabled sensors. The measured signals for each sensor are then processed to check for user touches, releases, changes in rotor angle and changes in slider position. The function returns the status of the Library as a combination of bit fields in an uint16_t value.
unit16_t qt_measure_sensors( uint16_t current_time_ms )
Arguments |
Type |
Comment |
---|---|---|
current_time_ms |
uint16 |
The current time in milliseconds |
Return value(s) |
Bit definition |
Comments |
---|---|---|
QTLIB_NO_ACTIVITY |
0x0000 |
No activity detected on any of the sensors |
QTLIB_IN_DETECT |
0x0001 |
At least one sensor is in detect |
QTLIB_STATUS_CHANGE |
0x0002 |
At least one sensor has changed ON/OFF state since the last
call to |
QTLIB_ROTOR_SLIDER_POS_CHANGE |
0x0004 |
At least one rotor/slider has changed position since the last
call to |
QTLIB_CHANNEL_REF_CHANGE |
0x0008 |
At least one reference value has changed since last call to
|
QTLIB_BURST_AGAIN |
0x0100 |
Flag to indicate Multiple measurements needed. |
QTLIB_RESOLVE_CAL |
0x0200 |
Multiple measurements needed to resolve calibration. Call
|
QTLIB_RESOLVE_FILTERIN |
0x0400 |
Multiple measurements needed to resolve filtering. Call
|
QTLIB_RESOLVE_DI |
0x0800 |
Multiple measurements needed to resolve detect integration.
Call |
QTLIB_RESOLVE_POS_RECAL |
0x1000 |
Multiple measurements needed to resolve positive
recalibration. Call |
All sensors must be configured (using qt_enable_key or qt_enable_rotor or qt_enable_slider) and initialized by calling qt_init_sensing before calling this function.