Skip to content

A simple library to parse the match data in 2018 _FIRST_ POWER UP for both Java and C++.

License

Notifications You must be signed in to change notification settings

Open-RIO/2018-MatchData

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2018 - MatchData

This simple library makes it easy to parse the match data in 2018 FIRST POWER UP for both Java and C++.

Example:

Java:

@Override
public void autonomousPeriodic() {
    MatchData.OwnedSide side = MatchData.getOwnedSide(MatchData.GameFeature.SWITCH_NEAR);
    if (side == MatchData.OwnedSide.LEFT) {
        // Do something with the left
    } else if (side == MatchData.OwnedSide.RIGHT) {
        // Do something with the right
    } else {
        // Unknown
    }
}

C++:

#include <openrio/powerup/MatchData.h>
using namespace OpenRIO::PowerUp;

void AutonomousPeriodic() {
    MatchData::OwnedSide side = MatchData::get_owned_side(MatchData::GameFeature::SWITCH_NEAR);
    if (side == MatchData::OwnedSide::LEFT) {
        // Do something with the left
    } else if (side == MatchData::OwnedSide::RIGHT) {
        // Do something with the right
    } else {
        // Unknown
    }
}

NOTE: It is recommended to store the result of getOwnedSide/get_owned_side on the first successful call to increase performance.

Download:

GradleRIO (Recommended):

Use GradleRIO 2017.01.07 or later.

Java:

dependencies {
    compile openrio.powerup.matchData()
}

C++:

model {
    components {
        frcUserProgram(NativeExecutableSpec) {
            // ETC //
            lib library: "openrio.powerup.matchData"
        }
    }
}

Eclipse Plugins:

You can find downloads for the files here.

Download MatchData-2018.01.07.jar for Java, and MatchData-2018.01.07-headers.zip for C++. Install as you would any other vendor library.

Maven:

Repository: http://dev.imjac.in/maven
Group: openrio.powerup
Artifact ID: MatchData

C++ Header Classifier: headers

About

A simple library to parse the match data in 2018 _FIRST_ POWER UP for both Java and C++.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published