Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add loggablegyro branch #23

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import edu.wpi.first.gradlerio.deploy.roborio.RoboRIO

plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2022.3.1"
id "edu.wpi.first.GradleRIO" version "2022.4.1"
id "jacoco"
}

Expand Down
23 changes: 23 additions & 0 deletions src/main/java/frc/robot/logging/LoggableGyro.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package frc.robot.logging;

import com.kauailabs.navx.frc.AHRS;

public class LoggableGyro extends AHRS implements Loggable {
public LoggableGyro() {
super();
}

@Override
public void setupLogging(Logger logger) {
logger.addAttribute("AHRS/velocityY");
logger.addAttribute("AHRS/pitch");
logger.addAttribute("AHRS/accelerationY");
}

@Override
public void log(Logger logger) {
logger.log("AHRS/velocityY", this.getVelocityY());
logger.log("AHRS/pitch", this.getPitch());
logger.log("AHRS/accelerationY", this.getWorldLinearAccelY());
}
}
35 changes: 35 additions & 0 deletions vendordeps/navx_frc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"fileName": "navx_frc.json",
"name": "KauaiLabs_navX_FRC",
"version": "4.0.442",
"uuid": "cb311d09-36e9-4143-a032-55bb2b94443b",
"mavenUrls": [
"https://repo1.maven.org/maven2/"
],
"jsonUrl": "https://www.kauailabs.com/dist/frc/2022/navx_frc.json",
"javaDependencies": [
{
"groupId": "com.kauailabs.navx.frc",
"artifactId": "navx-java",
"version": "4.0.442"
}
],
"jniDependencies": [],
"cppDependencies": [
{
"groupId": "com.kauailabs.navx.frc",
"artifactId": "navx-cpp",
"version": "4.0.442",
"headerClassifier": "headers",
"sourcesClassifier": "sources",
"sharedLibrary": false,
"libName": "navx_frc",
"skipInvalidPlatforms": true,
"binaryPlatforms": [
"linuxathena",
"linuxraspbian",
"windowsx86-64"
]
}
]
}