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

robot: Remove stray main file code #12

Merged
merged 1 commit into from
Nov 8, 2024
Merged

Conversation

auscompgeek
Copy link
Member

The indentation for the __name__ == "__main__" check is wrong -- it should never have been in a periodic method.

Furthermore, RobotPy's wpilib.run() was deprecated in 2024. Running robot.py as main on last season's code gives this output:

$ ./robot.py sim
``wpilib.run`` is no longer used. You should run your robot code via one of
the following methods instead:

* Windows: ``py -m robotpy [arguments]``
* Linux/macOS: ``python -m robotpy [arguments]``

In a virtualenv the ``robotpy`` command can be used directly.

This removes all the code intended to be used for this old entry point.

@james-ward james-ward merged commit dae0031 into main Nov 8, 2024
8 checks passed
@james-ward james-ward deleted the davo/robot-not-main branch November 8, 2024 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants