Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Navx in a Command-based Java program (http://www.chiefdelphi.com/forums/showthread.php?t=155083)

droswell 10-02-2017 23:42

Navx in a Command-based Java program
 
We're able to get the navx sensor to work fine in an iterative program, but we're having trouble getting it to work in a command based program.

It compiles, but we're getting the famous "Robots don't quit" message with an error: -1029. We tried creating the object in the drivetrain subsystem, in robot.java, and in robotmap, to no avail.

Any help would be appreciated! Here's our code

Thanks!!

wj2k3 11-02-2017 00:42

Re: Navx in a Command-based Java program
 
try:

public static AHRS ahrs = new AHRS(SerialPort.Port.kMXP);

instead of:

static AHRS ahrs = new AHRS(SPI.Port.kMXP);

and add import:

import edu.wpi.first.wpilibj.SerialPort;

droswell 11-02-2017 09:52

Re: Navx in a Command-based Java program
 
Thanks! We'll give it a shot this morning.


All times are GMT -5. The time now is 19:19.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi