.isLeverFlipped()

back to FEHRCS

Description

Some tasks on the FEH robot course are part of the RCS Task Relay System and will provide feedback to your robot about the state of the task. This will be indicated to your robot through the RCS by the .isLeverFlipped() function. You will be able to call RCS.isLeverFlipped() any time during the run to determine the state of the lever task.

 

Note: we do not guarantee that the task information is updated until 1 second after a change to the course is made. The information may be updated much faster than this, but it is not guaranteed to be updated until after 1 second.

Parameters

None

Returns

This function returns an integer (0 or 1) to indicate whether the lever has been flipped.

0 – Initial state OR some lever has been flipped back up
1 – At least one lever has been flipped down AND no lever has ever been flipped back up

Examples

#include <FEHRCS.h>
#include <FEHUtility.h>
int main(void)
{
    // Initialize the RCS
    RCS.InitializeTouchMenu("B7p93noDy");
    
    // Get lever from the RCS
    int window = RCS.isLeverFlipped();
}