.CurrentRegion( )

back to FEHRCS

Description

Returns the current region number that your robot is running on after running the RCS.InitializeTouchMenu(const char* team_key) command.

Parameters

None.

Returns

This function returns the region number you are running on (0 for A, 1 for B, 2 for C, 3 for D, 4 for E, 5 for F, 6 for G, 7 for H).

Examples

#include <FEHRCS.h>
#include <FEHUtility.h>
#include <FEHLCD.h>

int main(void)
{
    //initialize the RCS
    RCS.InitializeTouchMenu("E4a9di7db");

    //Get the X coordinate of the robot every 1/2 second
    while(true)
    {
        // get the current region number and display it to the screen
        LCD.WriteLine( (int)RCS.CurrentRegion() );
        Sleep( 0.5 );
    }    
}