Programing issue with older robot

I am messing around with our robot from 2023 and I keep geting the error

The terminal process “cmd.exe /d /c gradlew deploy -PteamNumber=3039 --offline -Dorg.gradle.java.home=“C:\Users\Public\wpilib\2023\jdk”” terminated with exit code: 1.

has this happend to anyone else

You will need to supply more of the error stacktrace.

Likely there is a missing version of something / something has been deprecated.

(Also I personally refuse to refer to 2023 as older… That bot is a spring chicken)

2 Likes

This is kinda a shot in the dark but does the old robot’s roboRIO have the old 2023 firmware? If you’re using the up-to-date Driver Station and WPILib with out-of-date roboRIO firmware, that may be causing an issue. I seem to remember that causing more trouble than it should have for us a while back.

It could I can try it right now but in like an hour I will give an update.

I think I found It Reading Stacktraces — FIRST Robotics Competition documentation I think im in the wrong directory but I will give an update in a bit. or missing some files

1 Like

I am now getting the error

The supplied phased action failed with an exception.
A problem occurred configuring root project ‘2023-ChargedUp-Quicksilver’.
Build file ‘C:\Users\Robotics\Documents\GitHub\2023 Robots\2023-ChargedUp-Quicksilver\build.gradle’ line: 3
Plugin [id: ‘edu.wpi.first.GradleRIO’, version: ‘2023.3.1’] was not found in any of the following sources:

  • Gradle Core Plugins (plugin is not in ‘org.gradle’ namespace)
  • Plugin Repositories (could not resolve plugin artifact ‘edu.wpi.first.GradleRIO:edu.wpi.first.GradleRIO.gradle.plugin:2023.3.1’)
    Searched in the following repositories:
    MavenLocal(file:/C:/Users/Robotics/.m2/repository)
    Gradle Central Plugin Repository
    frcHome(file:/C:/Users/Public/wpilib/2023/maven/)
    Plugin [id: ‘edu.wpi.first.GradleRIO’, version: ‘2023.3.1’] was not found in any of the following sources:
  • Gradle Core Plugins (plugin is not in ‘org.gradle’ namespace)
  • Plugin Repositories (could not resolve plugin artifact ‘edu.wpi.first.GradleRIO:edu.wpi.first.GradleRIO.gradle.plugin:2023.3.1’)
    Searched in the following repositories:
    MavenLocal(file:/C:/Users/Robotics/.m2/repository)
    Gradle Central Plugin Repository

Im lost and kind of stressed so sorry if I am missing anthing

it is not popping up any errors anywhere its just not building and popping up with the first error message

That means this robot code is still on 2024 WPILib. Update it to the latest WPILib using

Are you connected to the internet when you build?

To add on to what you said, also make sure to update your vendordeps too (Pheonix, REVLib etc…).

no I was not I was connected to the robot

I was going to try to reinstall the 2023 version of Wpilib and redo the libraries and try to see if that worked, but I will try that at my lunch and then I am going to stay affter school to today for a bit

edit- (did not end up doing this I am going to update to 2024 wpilib)

so I updated all my vendordeps and the only 2 imports that don’t work are these, does anyone know what they have been changed to?

import com.revrobotics.CANSparkMax.ControlType;
import com.revrobotics.CANSparkMax.IdleMode;

See this post:

And the rest of the REV thread, there have been some changes

so I have been messing around with it and the only thing I can not find out is this

public Elevator() {
		forwardLimit.enableLimitSwitch(false);
		ReverseLimit.enableLimitSwitch(false);
        //also the setIdleMode can also not be resolved 
		elevator.setIdleMode(IdleMode.kBrake);

		elevator.setInverted(false);

// the only thing popping up as an error is the SoftLimitDirection can not be resolved

		elevator.enableSoftLimit(SoftLimitDirection.kForward, true);
		elevator.enableSoftLimit(SoftLimitDirection.kReverse, true);
		elevator.setSoftLimit(SoftLimitDirection.kForward, 88);
		elevator.setSoftLimit(SoftLimitDirection.kReverse, 0);

		// elevatorA.burnFlash();
		elevator.burnFlash();

		// elevator.setStatusFramePeriod();

		controller.setTolerance(3);
		profiledController.setTolerance(3);
	}

these are all my imports

package frc.robot.subsystems;

import com.revrobotics.CANSparkMax;
import com.revrobotics.CANSparkMax.IdleMode;      <---------
import com.revrobotics.CANSparkMax.SoftLimitDirection;   <--------- these 2 are the ones imports that are giving me errors 
import com.revrobotics.CANSparkMaxLowLevel.MotorType;
import com.revrobotics.RelativeEncoder;
import com.revrobotics.SparkMaxLimitSwitch;

import edu.wpi.first.math.MathUtil;
import edu.wpi.first.math.controller.ElevatorFeedforward;
import edu.wpi.first.math.controller.PIDController;
import edu.wpi.first.math.controller.ProfiledPIDController;
import edu.wpi.first.math.trajectory.TrapezoidProfile;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.Constants;
import frc.robot.RobotContainer;

I found it the new imports are

import com.revrobotics.CANSparkBase.IdleMode;
import com.revrobotics.CANSparkBase.SoftLimitDirection;

not

import com.revrobotics.CANSparkMax.IdleMode;     
import com.revrobotics.CANSparkMax.SoftLimitDirection

I would love to thank all of you very kind people I would have not been able to do it with you

image

1 Like