Gradlerio deployed code won't work


#21

/----------------------------------------------------------------------------/
/* Copyright © 2018 FIRST. All Rights Reserved. /
/
Open Source Software - may be modified and shared by FRC teams. The code /
/
must be accompanied by the FIRST BSD license file in the root directory of /
/
the project. /
/
----------------------------------------------------------------------------*/

package frc.robot;

import edu.wpi.first.wpilibj.RobotBase;

/**
*Do NOT add any static variables to this class, or any initialization at all.
*Unless you know what you are doing, do not modify this file except to
*change the parameter class to the startRobot call.
*/
public final class Main {
-----private Main() {
-----}

/**
*Main initialization function. Do not perform any initialization here.
*

If you change your main robot class, change the parameter type.
*/
-----public static void main(String… args)
-----{
------------RobotBase.startRobot(Robot::new);
-----}
}

I tried to make it a little easier to understand this time^^^^


#22

I personally like to use three Grave Accents to makre the start and end of the preformatted section and put the code inside the section.


Put the text you want formatted here

Here’s what this looks like in the editor:

Any luck with getting an un-edited project to run on your system?


#23

Two days ago I used the code I pasted in here except with IterativeRobot instead of TimedRobot, but the code was the exact same just a different project and it’s having the same problem on both projects. I can just literally create another project and paste the exact same code in, however I would think that should have been fixed with the creation of the second project if that was the case


#24

Nope, I’m talking about creating a new project and not pasting any new code in.

The purpose is that we trust that a brand new project should run without issue. This is well-proven by many teams and WPILib developers. If you still have an issue with a fresh project, we can conclude there is some issue with your RIO, electrical setup, network communications, driver station… something that is not code.

On the other hand, if a brand new project with no alterations runs correctly, you can conclude the issue must be with the code alterations you are making.


#25

Oh ok yes I can do that and see what happens. However before I try that do you think the Riolog not saving my team number could be a problem? Personally I think my software is the problem and not the code. I feel like I must have left out some sort of information the driver station or VScode needs to fully be supported deploy.


#26

rioLOG itself is not related to the deploy process. If it had the team number incorrect, you (maybe) wouldn’t be able to receive messages from the robot.

The team number does get used during the deploy process to determine the network address to deploy to. It should be set one time when you create the project, and is stored in .wpilib/wpilib_preferences.json .

I would guess that if it’s not set properly here, the deploy process would probably fail. However as you indicated, the deploy reports successful. Based on this I would guess that the team number is set properly.


#27

That’s true and in the process of creating a brand new project just now I set the team number as you stated