Site Tools
Sidebar
User's Manual
t2:ffb_get
ffb_get
ffb_get — Get FFB speed and duration
Description
fix32 ffb_get(<FFB_IDENTIFIER>, uint32 *duration);
Retrieve the speed and duration values of the FFB identified by <FFB_IDENTIFIER>.
If the speed and duration were programmatically set by ffb_set() , ffb_get() will return the values programmatically set. |
Parameters
- <FFB_IDENTIFIER>: An valid FFB identifier
FFB_1
,FFB_2
,FFB_3
orFFB_4
. Note: the FFB identifier is passed as direct parameter of theffb_get()
opcode, therefore stack values can't be used. - duration: Address of an uint32 variable to receive the duration value. This parameter can be
NULL
.
Return Value
The FFB speed in percentage, from 0.00 to 100.00 (%).
Examples
Example #1 ffb_get() example
main { if(ffb_get(FFB_2, NULL) > 0.0) { set_val(BUTTON_8, 100.0); } }
See Also
t2/ffb_get.txt · Last modified: 2016/11/29 10:17 by J2Kbr