User Tools

Site Tools


t2:check_active

check_active


check_active — Is I/O active longer than?

Description


bool check_active(uint8 io, uint32 ms);

Check if the I/O indexed by io is in active state for ms milli-seconds or more.

check_active() is the combination of is_active() with time_active().

Parameters


  • io: Index of an I/O.
  • ms: Time expressed in milli-seconds.

Return Value


Returns true if the I/O is active longer than ms milli-seconds, FALSE otherwise.

Examples


Example #1 check_active() example

main {
    if(check_active(BUTTON_19, 5000)) {
        set_val(BUTTON_5, 100.0);
    }
}

See Also

t2/check_active.txt · Last modified: 2016/11/18 13:16 by J2Kbr